/* Averlen web — one shared system for the connected app and sample preview.
   Neutral surfaces, a pine navigation rail, and restrained semantic accents. */
:root {
  color-scheme: light;
  --bg: #f5f6f3; --card: #fff; --elevated: #fff; --text: #202b27;
  --muted: #6a756f; --line: #e4e8e2; --soft: #f8f9f6;
  --green: #287454; --wash: #edf4ed; --positive-wash: #edf4ed;
  --blue: #496f93; --chart: #688eac; --blue-wash: #edf3f8;
  --amber: #896629; --amber-wash: #f6f2e7;
  --negative: #ad5946; --negative-wash: #f8eee9;
  --rail: #132e27; --rail-text: #edf3ec; --rail-muted: #a3b8ad;
  --gap: 24px; --pad: 28px; --radius: 18px; --radius-sm: 12px;
  --shadow: 0 2px 4px #18332602;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px; font-synthesis: none;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #101714; --card: #19221e; --elevated: #202c25; --text: #edf1eb;
  --muted: #a0ada3; --line: #2c3830; --soft: #1e2922;
  --green: #a3cfaf; --wash: #253c2d; --positive-wash: #253c2d;
  --blue: #a0bbd2; --chart: #9bbad0; --blue-wash: #23333e;
  --amber: #d7bd85; --amber-wash: #2c2a20;
  --negative: #e9a28d; --negative-wash: #382c25;
  --rail: #0d211a; --rail-text: #edf3ec; --rail-muted: #a3b8ad;
  --shadow: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: default; opacity: .48; }
a { color: var(--green); }
a, button, input, select { transition: background-color .16s, border-color .16s, color .16s, box-shadow .16s; }
:where(button, a, input, select):focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { font-size: 34px; line-height: 1.15; letter-spacing: -1.25px; font-weight: 550; margin: 0; }
h2 { margin: 0; font-size: 17px; line-height: 1.4; font-weight: 600; letter-spacing: -.35px; }
h3 { font-size: 15px; font-weight: 600; line-height: 1.5; margin: 12px 0 8px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip:focus { position: fixed; top: 12px; left: 12px; background: var(--card); padding: 16px; z-index: 100; border-radius: 8px; }

/* Application frame */
.layout { display: grid; grid-template-columns: 224px minmax(0,1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 32px 18px 20px; display: flex; flex-direction: column; background: var(--rail); color: var(--rail-text); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; font-size: 25px; font-weight: 600; letter-spacing: -.9px; padding: 0 12px; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.workspace-label { font-size: 10px; font-weight: 600; letter-spacing: 1.6px; color: var(--rail-muted); margin: 52px 14px 16px; }
nav { display: grid; gap: 6px; }
nav a, .settings-link { color: var(--rail-muted); display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 500; }
nav a:hover, .settings-link:hover { background: #ffffff09; color: var(--rail-text); }
nav a[aria-current=page], .settings-link[aria-current=page] { background: #d7eadb; color: #173a29; }
nav a[aria-current=page] { font-weight: 650; }
nav a[aria-current=page]::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-left: auto; }
.sidebar :focus-visible { outline-color: #d7eadb; }
.sidebar-bottom { margin-top: auto; padding-top: 36px; }
.sidebar-note { margin: 0 14px 40px; color: var(--rail-text); }
.sidebar-note-mark { display: block; font-size: 27px; font-weight: 300; color: #bad4bf; margin-bottom: 14px; }
.sidebar-note p { font-size: 17px; font-weight: 450; letter-spacing: -.25px; line-height: 1.55; margin: 0 0 10px; }
.sidebar-note small { font-size: 10px; color: var(--rail-muted); }
.profile { display: flex; gap: 10px; align-items: center; margin-top: 18px; padding: 22px 10px 0; border-top: 1px solid #ffffff18; min-width: 0; }
.profile>div { min-width: 0; }
.profile strong { display: block; font-size: 12px; font-weight: 550; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.profile small { display: block; color: var(--rail-muted); font-size: 10px; margin-top: 3px; }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; background: var(--wash); color: var(--green); border-radius: 50%; font-size: 20px; font-weight: 550; }
.profile .avatar { width: 34px; height: 34px; font-size: 12px; background: #ffffff10; color: #d7eadb; border: 1px solid #ffffff18; }
.workspace { min-width: 0; }
.preview-banner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 10px 40px; border-bottom: 1px solid var(--line); font-size: 11px; background: var(--card); color: var(--muted); }
.preview-banner>span { display: flex; align-items: center; gap: 14px; }
.preview-banner strong { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-weight: 600; white-space: nowrap; }
.status-dot { width: 5px; height: 5px; background: var(--green); border-radius: 50%; }
.preview-banner .text-button { font-size: 11px; white-space: nowrap; }
[data-mode=live] .preview-banner { display: none; }
.topbar { max-width: 1392px; margin: auto; padding: 36px 40px 30px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.eyebrow, .overline, .section-label { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 650; color: var(--muted); }
.eyebrow { margin-bottom: 10px; }
.page-subtitle { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.toolbar { display: flex; align-items: center; gap: 10px; }
.toolbar select { font-size: 12px; min-height: 42px; padding: 10px 32px 10px 14px; border-radius: 9px; }
.icon-button { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); font-size: 24px; }
.icon-button svg { width: 18px; height: 18px; }
.icon-button:hover { background: var(--wash); border-color: var(--green); }
main { max-width: 1392px; margin: 0 auto; padding: 0 40px 36px; outline: none; }
footer { padding: 0 40px 28px; max-width: 1392px; margin: auto; display: flex; justify-content: space-between; gap: 16px; font-size: 10px; line-height: 1.6; color: var(--muted); }
.intro { margin: 0 0 24px; color: var(--muted); line-height: 1.7; font-size: 14px; }
[data-page=trends] .grid { align-items: stretch; }
.grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: var(--gap); align-items: start; }
.stack { display: grid; gap: var(--gap); align-content: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--pad); box-shadow: var(--shadow); min-width: 0; }
.full { grid-column: 1 / -1; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-heading>div { min-width: 0; }
.section-heading .text-button { white-space: nowrap; }
.card-subtitle, .subtle { color: var(--muted); font-size: 12px; line-height: 1.65; }
.card-subtitle { margin: 6px 0 0; }
.subtle { margin: 0; }
.text-button { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 7px 0; color: var(--green); font-size: 12px; font-weight: 600; text-decoration: none; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--text); text-decoration: none; font-size: 12px; font-weight: 600; }
.button:hover:not(:disabled) { background: var(--wash); border-color: var(--green); }
.button.primary { background: var(--green); color: var(--card); border-color: transparent; }
.button.primary:hover:not(:disabled) { background: color-mix(in srgb,var(--green) 87%,var(--text)); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.positive { color: var(--green); }
.right { text-align: right; }

/* Home: one primary financial story, with supporting detail beside it. */
.home-layout { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); gap: var(--gap); grid-template-areas: 'overview categories' 'attention categories' 'recent recent'; align-items: start; }
.home-layout.no-attention { grid-template-areas: 'overview categories' 'recent recent'; }
.compact-breakdown .home-categories { align-self: start; }
.home-overview { grid-area: overview; padding: 30px 32px 24px; }
.overview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.overview-heading .overline { font-size: 12px; letter-spacing: .2px; text-transform: none; font-weight: 500; }
.period-tag { font-size: 10px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); padding: 4px 9px; border-radius: 5px; white-space: nowrap; }
.hero-number { font-size: clamp(44px,4.4vw,68px); letter-spacing: -3px; font-weight: 500; line-height: 1.14; margin: 12px 0 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.overview-context { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.delta-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px; font-size: 11px; font-weight: 550; color: var(--blue); background: var(--blue-wash); }
.delta-pill.quiet { color: var(--muted); background: var(--soft); }
.overview-context>.subtle { font-size: 11px; }
.pace-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 30px 0 18px; }
.pace-heading h2 { font-size: 13px; letter-spacing: -.1px; }
.pace-heading .card-subtitle { font-size: 11px; margin-top: 3px; }
.projected { text-align: right; display: grid; gap: 3px; flex-shrink: 0; }
.projected span { font-size: 10px; letter-spacing: .3px; color: var(--muted); }
.projected strong { font-size: 20px; font-weight: 550; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; margin-top: 26px; }
.overview-stats { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; gap: 0; }
.overview-stats .stat-tile { padding-right: 20px; }
.overview-stats .stat-tile+.stat-tile { padding-left: 24px; border-left: 1px solid var(--line); }
.stat-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.stat-label svg { width: 15px; height: 15px; }
.stat-value { font-size: 27px; letter-spacing: -.8px; margin-top: 8px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.home-categories { grid-area: categories; padding-bottom: 0; align-self: stretch; display: flex; flex-direction: column; }
.allocation-bar { display: flex; height: 9px; gap: 3px; overflow: hidden; border-radius: 5px; margin: 0 0 19px; }
.allocation-bar span { background: var(--category-color); min-width: 2px; }
.category-list { flex: 1; }
.category-row { width: 100%; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 12px; background: none; border: 0; text-align: left; padding: 17px 0; color: var(--text); }
.category-row+.category-row { border-top: 1px solid var(--line); }
.category-icon { position: relative; overflow: hidden; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb,var(--category-color) 10%,var(--card)); color: var(--category-color); }
.category-icon svg { width: 17px; height: 17px; }
.category-name { font-size: 12px; font-weight: 550; }
.category-track { height: 3px; background: var(--soft); border-radius: 4px; margin-top: 9px; overflow: hidden; }
.category-fill { height: 100%; background: var(--category-color); border-radius: 4px; }
.category-amount { font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums; }
.category-share { font-size: 10px; color: var(--muted); margin-top: 4px; text-align: right; }
.category-row:hover .category-name { color: var(--green); }
.card-link { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); margin-top: 16px; padding: 19px 0; text-decoration: none; font-size: 12px; font-weight: 550; }
.card-link:hover { color: var(--text); }
.card-link span { font-size: 18px; }
.attention { width: 100%; text-align: left; background: var(--amber-wash); border: 1px solid color-mix(in srgb,var(--amber) 16%,var(--line)); border-radius: var(--radius); padding: 20px 24px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 16px; align-items: center; }
.home-attention { grid-area: attention; }
.attention .insight-icon { color: var(--amber); background: color-mix(in srgb,var(--amber) 10%,transparent); }
.attention-label { display: block; color: var(--amber); font-weight: 650; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 5px; }
.attention-copy strong { font-size: 13px; font-weight: 550; display: block; }
.attention-copy small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.chevron { font-size: 22px; color: var(--muted); }
.attention:hover { border-color: var(--amber); }
.home-recent { grid-area: recent; }
.home-recent .tx-row { padding: 16px 4px; }
.insight-icon { width: 38px; height: 38px; background: var(--wash); color: var(--green); border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }

/* Charts: the lines, labels, and focus states carry the information. */
.chart { width: 100%; height: 200px; display: block; overflow: visible; stroke: none; }
.chart .gridline { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.chart text { fill: var(--muted); font-size: 10px; font-family: inherit; }
.chart .spending-line { stroke: var(--chart); stroke-width: 2.5; fill: none; vector-effect: non-scaling-stroke; }
.chart .typical-line { stroke: var(--muted); stroke-width: 1.3; stroke-dasharray: 4 5; fill: none; opacity: .5; vector-effect: non-scaling-stroke; }
.pace-dot { fill: var(--chart); stroke: var(--card); stroke-width: 2; }
.pace-plot { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px 12px; padding-right: 6px; }
.pace-y-axis { position: relative; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.pace-y-axis span { position: absolute; left: 0; transform: translateY(-50%); }
.pace-chart { height: 174px; }
.pace-x-axis { grid-column: 2; position: relative; height: 15px; color: var(--muted); font-size: 10px; }
.pace-x-axis span { position: absolute; transform: translateX(-50%); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 10px; color: var(--muted); margin-top: 15px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend .swatch { display: inline-block; width: 15px; height: 0; border-top: 2px solid var(--chart); border-radius: 0; }
.chart-legend .swatch.dashed { border-top: 2px dashed var(--muted); }
.chart-axis { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; margin-top: 14px; }
.bars { position: relative; height: 256px; --plot: 213px; display: flex; gap: 12px; align-items: end; padding-top: 20px; margin-top: 12px; }
.bar-group { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 10px; min-width: 0; }
.bar-button { border: 0; padding: 0 4px; width: 100%; max-width: 40px; height: calc(var(--plot) * var(--h)); min-height: 3px; background: color-mix(in srgb,var(--chart) 25%,var(--card)); border-radius: 4px 4px 0 0; }
.bar-button:hover, .bar-button.selected { background: var(--chart); }
.bars.has-selection .bar-button:not(.selected):not(:hover) { opacity: .6; }
.bar-month { font-size: 10px; color: var(--muted); line-height: 13px; }
.typical-rule { position: absolute; left: 0; right: 0; bottom: calc(23px + var(--plot) * var(--t)); border-top: 1px dashed var(--muted); pointer-events: none; z-index: 1; opacity: .6; }
.legend { font-size: 11px; color: var(--muted); margin: 22px 0 0; line-height: 1.7; }
.change-row { width: 100%; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 12px; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 18px 0; color: var(--text); text-align: left; }
.change-row:last-child { border: 0; }
.change-row strong { display: block; font-size: 12px; font-weight: 550; }
.change-row small { display: block; font-size: 10px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.change-amount { font-size: 14px; font-weight: 550; text-align: right; font-variant-numeric: tabular-nums; }
.change-amount small { font-weight: 400; }
.comparison-label { font-size: 10px; color: var(--muted); text-align: right; }
.driver-track { display: block; height: 3px; border-radius: 4px; background: var(--soft); margin-top: 10px; overflow: hidden; max-width: 260px; }
.driver-track span { display: block; height: 100%; background: var(--chart); border-radius: 4px; opacity: .6; }
.report-card { display: flex; align-items: center; gap: 18px; }
.report-card>div:nth-child(2) { flex: 1; }
.report-card h2 { margin-bottom: 7px; }

/* Activity */
.summary-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.summary-strip .card { padding: 22px 26px; }
.summary-strip .stat-label svg { width: 16px; height: 16px; }
.summary-strip .stat-value { margin-top: 15px; font-size: 32px; letter-spacing: -1px; }
.summary-strip.tight { gap: 10px; }
.summary-strip.tight .card { padding: 16px; border-radius: 10px; }
.summary-strip.tight .stat-label { font-size: 11px; }
.summary-strip.tight .stat-value { font-size: 23px; margin-top: 8px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.filters select { font-size: 12px; min-width: 150px; }
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-wrap input { width: 100%; padding-left: 42px; font-size: 12px; }
.search-wrap svg { position: absolute; top: 13px; left: 14px; color: var(--muted); width: 17px; height: 17px; }
select, input { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 11px 14px; min-height: 44px; max-width: 100%; }
input::placeholder { color: var(--muted); opacity: .85; }
.result-count { font-size: 11px; color: var(--muted); margin: 0 0 24px; }
.table-header { display: grid; grid-template-columns: 38px minmax(0,1fr) 180px 130px; gap: 13px; padding: 0 4px 14px; border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.table-header>span:first-child { grid-column: 1 / 3; }
.transaction-list { display: grid; }
.tx-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 13px; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 17px 4px; text-align: left; color: var(--text); width: 100%; }
.tx-row:last-child { border-bottom: 0; }
.tx-row:hover { background: var(--soft); }
.tx-row:hover .merchant { color: var(--green); }
.merchant { font-size: 13px; font-weight: 550; display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.tx-meta { font-size: 11px; color: var(--muted); display: block; margin-top: 4px; line-height: 1.5; }
.tx-meta .meta-note:not(:first-child)::before { content: ' · '; }
.tx-amount { text-align: right; font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }
.activity .tx-row { grid-template-columns: 38px minmax(0,1fr) 180px 130px; }
.table-category { font-size: 12px; color: var(--muted); }
.day-group+.day-group { margin-top: 8px; }
.day-header { display: flex; justify-content: space-between; gap: 12px; padding: 16px 4px 8px; font-size: 10px; color: var(--muted); font-weight: 500; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.merchant-logo { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; border-radius: 6px; opacity: 0; }
.logo-loaded .merchant-logo { opacity: 1; }
.logo-loaded svg { visibility: hidden; }

/* Wealth and planning */
.wealth-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: var(--gap); align-items: start; }
.wealth-column { display: grid; gap: var(--gap); min-width: 0; }
.section-label { margin: 4px 0 -12px; }
.section-label small { display: block; font-size: 10px; letter-spacing: 0; text-transform: none; font-weight: 400; margin-top: 4px; }
.wealth-hero { text-align: left; display: grid; justify-items: start; gap: 4px; background: var(--wash); border-color: color-mix(in srgb,var(--green) 18%,var(--line)); }
.wealth-hero-top { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; gap: 12px; }
.wealth-hero-top .overline { color: var(--green); }
.wealth-hero-top small { display: block; margin-top: 7px; font-size: 11px; }
.wealth-hero .hero-number { margin: 18px 0 8px; font-size: clamp(42px,4vw,62px); }
.share-pill { display: inline-flex; align-items: center; gap: 5px; border: 1px solid color-mix(in srgb,var(--green) 18%,transparent); border-radius: 6px; padding: 7px 9px; background: transparent; color: var(--green); font-size: 10px; font-weight: 550; }
.share-pill svg { width: 13px; height: 13px; }
.change-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px; font-size: 11px; font-weight: 500; color: var(--muted); background: var(--soft); }
.change-badge.up, .change-chip.up { color: var(--green); background: var(--positive-wash); }
.change-badge.down, .change-chip.down { color: var(--negative); background: var(--negative-wash); }
.wealth-hero .change-badge { padding-left: 0; background: none; }
.change-chip { font-size: 11px; font-weight: 550; padding: 5px 8px; border-radius: 5px; color: var(--muted); background: var(--soft); }
.metric-pills { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 0; width: 100%; margin-top: 24px; padding-top: 22px; border-top: 1px solid color-mix(in srgb,var(--green) 18%,transparent); }
.metric-pill { text-align: left; }
.metric-pill+.metric-pill { padding-left: 24px; border-left: 1px solid color-mix(in srgb,var(--green) 18%,transparent); }
.metric-pill span { display: block; font-size: 11px; color: var(--muted); }
.metric-pill strong { display: block; font-size: 24px; font-weight: 500; letter-spacing: -.6px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.metric-pill.asset { color: var(--green); }
.metric-pill.liability { color: var(--negative); }
.segmented { display: flex; gap: 3px; background: var(--bg); padding: 4px; border-radius: 8px; flex-shrink: 0; }
.segmented button { background: none; border: 0; border-radius: 5px; padding: 8px 12px; font-size: 11px; font-weight: 550; color: var(--muted); }
.segmented button[aria-pressed=true] { background: var(--card); color: var(--green); box-shadow: 0 1px 4px #0001; }
.lens-toggle { margin-top: 20px; }
.history-wrap { position: relative; }
.history-chart { display: block; width: 100%; height: 220px; overflow: visible; touch-action: pan-y; cursor: crosshair; }
.history-line { fill: none; stroke: var(--green); stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.history-area { fill: url(#wealth-area); stroke: none; }
.projection-chart .history-area { fill: color-mix(in srgb,var(--green) 10%,transparent); }
.zero-rule, .goal-line { stroke: var(--muted); stroke-dasharray: 4 3; opacity: .5; vector-effect: non-scaling-stroke; }
.goal-line { stroke: var(--amber); opacity: .8; }
.scrub-rule { stroke: var(--muted); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.history-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--card); pointer-events: none; }
#history-title { min-height: 49px; }
.scrub-value { display: block; font-size: 20px; font-weight: 550; font-variant-numeric: tabular-nums; }
.projection-chart { display: block; width: 100%; height: 150px; margin-top: 22px; }
.plan-cards { display: grid; gap: 12px; }
.plan-card, .notice-card { width: 100%; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 14px; text-align: left; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; }
.plan-card:hover, .ledger-row:hover, .settings-row:hover, .profile-card:hover { background: var(--soft); }
.plan-card:hover { border-color: var(--green); }
.plan-card strong, .notice-card strong { display: block; font-size: 14px; font-weight: 550; }
.plan-card small, .notice-card .subtle { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.plan-card .plan-kicker { margin: 0 0 5px; font-weight: 500; }
.plan-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--wash); color: var(--green); }
.plan-icon svg { width: 18px; height: 18px; }
.plan-icon.status-needsAttention { background: var(--amber-wash); color: var(--amber); }
.plan-icon.status-offTrack { background: var(--negative-wash); color: var(--negative); }
b.status-onTrack { color: var(--green); } b.status-needsAttention { color: var(--amber); } b.status-offTrack { color: var(--negative); }
.row-chevron { color: var(--muted); font-size: 20px; line-height: 1; opacity: .6; }
.notice-card p { margin: 0; }
.accounts-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 -10px; }
.accounts-heading .section-label { margin: 0; }
.accounts-heading .button { min-height: 34px; padding: 8px 11px; font-size: 10px; }
.ledger { padding: 0; overflow: hidden; }
.ledger-group+.ledger-group { border-top: 1px solid var(--line); }
.ledger-head { display: flex; align-items: center; gap: 8px; padding: 16px 22px; background: var(--soft); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 550; color: var(--muted); }
.ledger-head svg { width: 14px; height: 14px; }
.ledger-head strong { margin-left: auto; font-weight: 550; font-variant-numeric: tabular-nums; }
.ledger-row { width: 100%; display: grid; grid-template-columns: 32px minmax(0,1fr) auto 10px; align-items: center; gap: 10px; padding: 15px 22px; background: none; border: 0; color: var(--text); text-align: left; }
.ledger-row+.ledger-row { border-top: 1px solid var(--line); }
.ledger-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; }
.ledger-icon svg { width: 15px; height: 15px; }
.ledger-group.asset .ledger-icon { background: var(--positive-wash); color: var(--green); }
.ledger-group.liability .ledger-icon { background: var(--negative-wash); color: var(--negative); }
.ledger-name { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-row>strong { font-size: 12px; font-weight: 550; font-variant-numeric: tabular-nums; }
.toggle-row { display: flex; align-items: center; gap: 10px; font-size: 13px; margin: 4px 0 14px; }
.toggle-row input { width: 18px; height: 18px; min-height: 18px; accent-color: var(--green); }
.retirement-status { display: flex; align-items: center; gap: 14px; }
.retirement-status small { display: block; font-size: 12px; font-weight: 550; color: var(--muted); }
.retirement-status strong { display: block; font-size: 20px; margin-top: 2px; }
.retirement-status.status-onTrack small { color: var(--green); } .retirement-status.status-needsAttention small { color: var(--amber); } .retirement-status.status-offTrack small { color: var(--negative); }
.loan-card { border: 1px solid var(--line); border-radius: 12px; padding: 6px 18px 14px; margin-top: 16px; }
.loan-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0 6px; }
.loan-head small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.loan-card .success-note { margin-top: 10px; }
.debt-stats { margin-top: 6px; }
.inline-form { display: flex; align-items: flex-end; gap: 12px; margin-top: 18px; }
.inline-form .form-field { flex: 1; margin: 0; }

/* Settings, dialogs, and forms */
.settings-stack, .settings-column { display: grid; gap: 20px; min-width: 0; }
.settings-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--gap); align-items: start; }
.settings-column>.section-label { margin: 4px 0 -8px; }
.profile-card { width: 100%; display: grid; grid-template-columns: 52px minmax(0,1fr) auto; align-items: center; gap: 18px; text-align: left; color: var(--text); }
.profile-card strong { display: block; font-size: 20px; font-weight: 550; letter-spacing: -.5px; }
.profile-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.plan-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; padding: 4px 8px; border-radius: 5px; background: var(--wash); color: var(--green); font-size: 10px; font-weight: 550; }
.plan-badge svg { width: 12px; height: 12px; }
.settings-card { padding: 2px 0; overflow: hidden; }
.settings-row { width: 100%; display: grid; grid-template-columns: 36px minmax(0,1fr) 14px; align-items: center; gap: 14px; padding: 20px 24px; border: 0; background: none; color: var(--text); text-align: left; text-decoration: none; }
.settings-row+.settings-row { border-top: 1px solid var(--line); }
.settings-row strong { display: block; font-size: 13px; font-weight: 550; }
.settings-row small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.settings-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--wash); color: var(--green); }
.settings-icon svg { width: 17px; height: 17px; }
.sign-out { width: 100%; color: var(--negative); }
.settings-footer { text-align: center; color: var(--muted); font-size: 10px; margin: 0; }
.category-chip { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.category-chip .swatch { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.account-gate { max-width: 720px; margin: 20px auto; }
.account-email { overflow-wrap: anywhere; text-align: right; }
.definition { display: flex; justify-content: space-between; gap: 18px; font-size: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.definition:last-child { border: 0; }
.definition span { color: var(--muted); }
.definition strong { font-weight: 550; min-width: 0; text-align: right; overflow-wrap: anywhere; }
dialog { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 20px; padding: 28px; width: min(560px,calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; box-shadow: 0 24px 80px #0003; }
dialog::backdrop { background: #0b1e1770; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 24px; }
.dialog-value { font-size: 44px; line-height: 1.2; font-weight: 500; letter-spacing: -1.8px; margin: 18px 0 24px; overflow-wrap: anywhere; }
.dialog-label { display: block; font-size: 12px; color: var(--muted); margin: 24px 0 10px; }
.dialog-subhead { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 26px 0 4px; }
dialog select, #delete-confirmation { width: 100%; }
.note { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 20px 0 0; }
.form-field { display: grid; gap: 8px; margin: 18px 0; min-width: 0; }
.form-field label { font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1.5; }
.form-field input, .form-field select { width: 100%; min-width: 0; background: var(--elevated); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
.form-grid .form-field { margin: 14px 0; }
.form-error { font-size: 12px; color: var(--negative); line-height: 1.6; }
.form-error:empty { display: none; }
.success-note { background: var(--wash); padding: 14px; border-radius: 9px; font-size: 12px; color: var(--green); line-height: 1.7; margin: 18px 0 0; }
.preview-note { padding: 12px 14px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); border-radius: 8px; font-size: 11px; line-height: 1.8; margin: 20px 0; }
.danger { color: var(--negative); border-color: color-mix(in srgb,var(--negative) 32%,var(--line)); background: transparent; }
.danger-zone { border-color: color-mix(in srgb,var(--negative) 22%,var(--line)); }
.danger-zone h2 { color: var(--negative); }
.report-categories { margin-top: 20px; }
.loading-state { min-height: 55dvh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; }
.loading-state img { border-radius: 14px; }
.loading-state h2 { margin: 6px 0 0; font-size: 20px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sign-in: shared brand story with a quiet, focused account form. */
.auth-mode { display: block; }
.auth-mode .sidebar, .auth-mode .topbar, .auth-mode footer { display: none; }
.auth-mode .workspace { padding-bottom: 0; }
.auth-mode main { padding: 20px; max-width: 1600px; }
.auth-shell { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: clamp(40px,6vw,100px); align-items: center; min-height: calc(100dvh - 90px); }
.auth-story { background: #15372b; color: #e9f0df; padding: 40px 46px; min-height: 760px; height: 100%; border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.auth-story .brand { padding: 0; font-size: 26px; }
.auth-story-copy { margin-top: 64px; position: relative; z-index: 1; }
.auth-story .overline { color: #b6ccb4; font-size: 9px; letter-spacing: 1.8px; }
.auth-story h2 { font-size: clamp(42px,4.9vw,74px); font-weight: 450; line-height: 1.04; letter-spacing: -3px; margin: 22px 0; }
.auth-story p { font-size: 13px; color: #b8cbbb; line-height: 1.9; margin: 0; }
.perspective-art { position: relative; flex: 1; min-height: 285px; margin-top: 20px; display: grid; align-items: center; }
.perspective-orbit { position: absolute; border: 1px solid #c8e0a51a; width: 540px; height: 260px; border-radius: 50%; transform: rotate(-31deg); right: -100px; top: 0; }
.orbit-two { transform: rotate(-31deg) scale(.83); }
.orbit-three { transform: rotate(-31deg) scale(.66); }
.perspective-center { width: 100%; position: relative; z-index: 1; padding: 25px 26px; border: 1px solid #d5eadb25; border-radius: 14px; background: #204b3b; box-shadow: 0 20px 40px #081d161a; }
.perspective-center>span { display: block; font-size: 8px; letter-spacing: 1.4px; color: #bdcdb4; }
.perspective-center>strong { display: block; font-size: 24px; line-height: 1.2; letter-spacing: -.5px; font-weight: 450; margin-top: 10px; }
.perspective-center svg { display: block; width: 100%; height: 80px; margin: 18px 0 10px; overflow: visible; }
.art-line { stroke: #c9df9e; stroke-width: 2; vector-effect: non-scaling-stroke; }
.art-baseline { stroke: #d5eadb20; stroke-dasharray: 3 5; stroke-width: 1; }
.perspective-center circle { fill: #c9df9e; stroke: #204b3b; stroke-width: 3; }
.perspective-center small { font-size: 9px; color: #b8cbbb; }
.auth-story-footer { display: flex; flex-wrap: wrap; gap: 22px; color: #b8cbbb; font-size: 10px; border-top: 1px solid #d5eadb20; padding-top: 22px; margin-top: 28px; }
.auth-story-footer span { display: inline-flex; align-items: center; gap: 8px; }
.auth-story-footer svg { width: 14px; height: 14px; }
.auth-form { width: min(100%,410px); padding: 34px 0; background: none; border: 0; box-shadow: none; border-radius: 0; }
.auth-form>.overline { font-size: 9px; letter-spacing: 1.8px; }
.auth-form>h1 { font-size: 38px; letter-spacing: -1.4px; margin: 14px 0 12px; }
.auth-form>.subtle { font-size: 13px; }
.auth-form>label { display: block; font-size: 12px; font-weight: 500; margin: 16px 0 8px; color: var(--muted); }
.auth-form>input { width: 100%; font-size: 14px; padding: 13px 14px; }
.auth-form>.button, .auth-form form>.button { width: 100%; margin-top: 12px; padding: 13px 18px; min-height: 48px; font-size: 13px; }
.auth-form .apple-button { background: var(--text); color: var(--card); border-color: transparent; }
.auth-form .apple-button:hover:not(:disabled) { background: color-mix(in srgb,var(--text) 85%,var(--card)); }
.auth-divider { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 10px; margin: 22px 0; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.login-assistance { text-align: right; margin-top: 6px; }
.login-assistance .text-button, .auth-form form>.text-button { font-size: 11px; }
.auth-form form>.text-button { display: block; margin-left: auto; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 14px; align-items: center; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 18px; font-size: 10px; }
.auth-links a { text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-links .text-button { font-size: 10px; }
.auth-form .note { font-size: 11px; line-height: 1.8; }
.auth-form>input:disabled { opacity: .6; cursor: not-allowed; }

/* Responsive rules are kept together so later component rules cannot mask them. */
@media(min-width:701px) {
  #account-settings { display: none; }
  .activity .tx-meta .meta-category { display: none; }
  .activity .tx-meta .meta-note::before { content: none; }
}
@media(min-width:1500px) {
  .topbar { padding-top: 44px; padding-bottom: 34px; }
  .home-overview { padding: 34px 36px 28px; }
  .pace-chart { height: 204px; }
}
@media(max-height:790px) and (min-width:701px) { .sidebar-note { display: none; } }
@media(max-width:1200px) {
  :root { --gap: 20px; --pad: 24px; }
  .layout { grid-template-columns: 194px minmax(0,1fr); }
  .sidebar { padding: 28px 12px 18px; }
  .brand { font-size: 23px; gap: 9px; }
  .topbar { padding: 30px 28px 26px; }
  main { padding: 0 28px 32px; }
  footer { padding: 0 28px 24px; }
  .preview-banner { padding-left: 28px; padding-right: 28px; }
  .home-layout { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); }
  .home-overview { padding: 26px 24px 22px; }
  .category-row { gap: 10px; }
  .wealth-layout { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); }
  .activity .tx-row { grid-template-columns: 38px minmax(0,1fr) 130px 110px; }
  .table-header { grid-template-columns: 38px minmax(0,1fr) 130px 110px; }
  .plan-card { padding: 18px; gap: 12px; }
  .ledger-head, .ledger-row { padding-left: 18px; padding-right: 18px; }
  .auth-story { padding: 34px; }
  .auth-story h2 { letter-spacing: -2px; }
}
@media(max-width:1000px) {
  .home-layout { grid-template-columns: minmax(0,1fr); grid-template-areas: 'overview' 'attention' 'categories' 'recent'; }
  .home-layout.no-attention { grid-template-areas: 'overview' 'categories' 'recent'; }
  .grid, .wealth-layout, .settings-columns { grid-template-columns: minmax(0,1fr); }
  .home-categories .category-row { padding: 15px 0; }
  .home-recent .section-heading { margin-bottom: 16px; }
  .summary-strip { gap: 12px; }
  .summary-strip .card { padding: 20px; }
  .summary-strip .stat-value { font-size: 27px; }
  .home-overview .hero-number { font-size: 60px; }
  .pace-chart { height: 194px; }
  .auth-shell { gap: 40px; }
  .auth-story { padding: 28px; min-height: 730px; }
  .auth-story h2 { font-size: 47px; }
  .auth-form { padding-right: 20px; }
  .auth-form>h1 { font-size: 34px; }
  .banner-detail { max-width: 280px; font-size: 10px; }
}
@media(max-width:700px) {
  :root { --gap: 16px; --pad: 22px; --radius: 15px; --radius-sm: 11px; }
  .layout { display: block; }
  .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 20; height: auto; padding: 7px 12px max(7px,env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
  .sidebar>.brand, .workspace-label, .sidebar-bottom { display: none; }
  nav { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; }
  nav a { flex-direction: column; gap: 4px; padding: 9px 4px; min-height: 55px; font-size: 10px; color: var(--muted); border-radius: 9px; }
  nav a:hover { color: var(--green); background: var(--wash); }
  nav a[aria-current=page] { background: var(--wash); color: var(--green); }
  nav a[aria-current=page]::after { display: none; }
  nav svg { width: 19px; height: 19px; }
  .sidebar :focus-visible { outline-color: var(--green); }
  .workspace { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .preview-banner { padding: 9px 20px; gap: 12px; }
  .preview-banner>span { display: block; }
  .preview-banner strong { font-size: 10px; }
  .banner-detail { display: block; font-size: 9px; max-width: 240px; line-height: 1.6; margin-top: 3px; }
  .preview-banner .text-button { font-size: 10px; }
  .topbar { padding: 26px 20px 24px; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
  .page-heading { min-width: 0; }
  .eyebrow { font-size: 8px; letter-spacing: 1.3px; margin-bottom: 9px; }
  h1 { font-size: 29px; letter-spacing: -1px; }
  .page-subtitle { font-size: 11px; margin-top: 8px; }
  .toolbar { gap: 7px; }
  .toolbar select { min-height: 38px; padding: 8px 25px 8px 10px; font-size: 11px; max-width: 164px; }
  .icon-button { width: 38px; height: 38px; }
  .icon-button svg { width: 17px; height: 17px; }
  main { padding: 0 16px 28px; }
  footer { padding: 0 20px 20px; font-size: 9px; }
  .home-overview { padding: 24px 22px 22px; }
  .home-overview .hero-number { font-size: 53px; letter-spacing: -2.5px; }
  .overview-context { gap: 7px 10px; }
  .overview-context .subtle { font-size: 10px; }
  .delta-pill { font-size: 10px; }
  .pace-heading { margin-top: 28px; }
  .pace-heading .card-subtitle { font-size: 10px; }
  .projected strong { font-size: 18px; }
  .pace-chart { height: 159px; }
  .chart-legend { font-size: 9px; gap: 14px; }
  .overview-stats .stat-value { font-size: 25px; }
  .overview-stats .stat-tile+.stat-tile { padding-left: 20px; }
  .stat-label { font-size: 11px; }
  .attention { padding: 18px 20px; gap: 12px; }
  .attention-copy strong { font-size: 13px; }
  .attention-copy small { font-size: 10px; }
  .section-heading { gap: 12px; margin-bottom: 20px; }
  .section-heading .text-button { font-size: 11px; }
  h2 { font-size: 16px; }
  .card-subtitle { font-size: 11px; }
  .summary-strip { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
  .summary-strip .card { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 22px; border: 0; border-radius: 0; box-shadow: none; }
  .summary-strip .card+.card { border-top: 1px solid var(--line); }
  .summary-strip .stat-value { margin: 0; font-size: 24px; }
  .summary-strip.tight { grid-template-columns: 1fr; gap: 0; }
  .summary-strip.tight .card { padding: 14px 16px; }
  .summary-strip.tight .stat-value { margin: 0; font-size: 22px; }
  .filters { gap: 9px; }
  .search-wrap { flex-basis: 100%; }
  .filters select { flex: 1; min-width: 0; font-size: 12px; padding: 11px; }
  input[type=search], .form-field input, .form-field select, .auth-form>input { font-size: 16px; }
  .table-header { display: none; }
  .activity .tx-row { grid-template-columns: 34px minmax(0,1fr) auto; }
  .table-category { display: none; }
  .tx-row { gap: 10px; }
  .activity.card { padding: 20px 18px; }
  .merchant { font-size: 12px; }
  .tx-amount { font-size: 12px; }
  .tx-meta { font-size: 10px; }
  .category-icon { width: 34px; height: 34px; }
  .bars { gap: 7px; height: 220px; --plot: 177px; }
  .bar-month { font-size: 9px; }
  .comparison-label { max-width: 100px; }
  .report-card { flex-wrap: wrap; gap: 14px; }
  .report-card>.button { margin-left: 52px; }
  .wealth-hero .hero-number { font-size: 48px; letter-spacing: -2px; }
  .wealth-hero-top .overline { font-size: 10px; }
  .metric-pill strong { font-size: 23px; }
  .history-chart { height: 190px; }
  .plan-card, .notice-card { padding: 20px; gap: 12px; }
  .notice-card { grid-template-columns: 40px minmax(0,1fr); }
  .notice-card>.button { grid-column: 1 / -1; }
  .accounts-heading { flex-wrap: wrap; }
  .inline-form { flex-wrap: wrap; }
  .settings-row { padding: 18px 20px; }
  .profile-card { gap: 14px; }
  .profile-card strong { font-size: 18px; }
  .account-gate { margin: 8px 0; }
  dialog { padding: 22px; border-radius: 16px; }
  .dialog-value { font-size: 38px; }
  .form-grid { gap: 0 12px; }
  .auth-mode main { padding: 0 22px 36px; }
  .auth-shell { display: block; min-height: 0; max-width: 430px; margin: 0 auto; }
  .auth-story { min-height: 0; border-radius: 0; padding: 28px 0 8px; background: none; color: var(--text); }
  .auth-story .brand { font-size: 25px; }
  .auth-story-copy, .perspective-art, .auth-story-footer { display: none; }
  .auth-form { padding: 32px 0 0; width: 100%; }
  .auth-form>h1 { font-size: 36px; }
  .auth-links { font-size: 10px; }
}
@media(max-width:420px) {
  .topbar { position: relative; display: grid; grid-template-columns: 1fr; gap: 18px; }
  .toolbar { width: 100%; }
  .toolbar select { margin-right: auto; max-width: none; }
  .toolbar:has(select[hidden]) { position: absolute; top: 48px; right: 20px; width: auto; }
  .page-heading:has(+ .toolbar select[hidden]) h1 { padding-right: 88px; }
  .page-heading:has(+ .toolbar select[hidden]) .page-subtitle { max-width: none; }
  .hero-number { overflow-wrap: anywhere; }
  .home-overview .hero-number { font-size: 48px; }
  .overview-context { align-items: flex-start; flex-direction: column; gap: 7px; }
  .stat-value, .overview-stats .stat-value { font-size: 23px; }
  .overview-stats .stat-label { font-size: 10px; }
  .stat-label svg { width: 13px; height: 13px; }
  .attention { grid-template-columns: 32px minmax(0,1fr) auto; padding: 17px; gap: 10px; }
  .attention .insight-icon { width: 32px; height: 32px; }
  .bars { gap: 5px; }
  .bar-month { font-size: 8px; }
  .change-row { gap: 10px; }
  .change-amount { font-size: 13px; }
  .change-row small { font-size: 9px; }
  .ledger-row { gap: 8px; padding-left: 16px; padding-right: 16px; }
  .wealth-hero .hero-number { font-size: 43px; }
  .auth-links { gap: 10px; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
