:root {
    color-scheme: light;
    --ink: #182c29;
    --muted: #73817c;
    --paper: #f7f8f4;
    --white: #fff;
    --line: #e3e8e2;
    --green: #1f6a50;
    --green-dark: #184f3d;
    --mint: #e6f1e9;
    --coral: #bd634a;
    --gold: #d5a347;
    --sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    --serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background-color: var(--paper); background-image: radial-gradient(#d9e2da 0.65px, transparent 0.65px); background-size: 18px 18px; font-family: var(--sans); font-size: 14px; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
.topbar { height: 72px; padding: 0 max(5vw, calc((100vw - 1320px) / 2)); background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: 0; }
.wordmark-mark { width: 30px; height: 30px; display: grid; place-items: center; color: #fff; background: var(--green); border-radius: 50%; font-family: var(--serif); font-size: 17px; }
.topbar-right { display: flex; gap: 24px; align-items: center; }
.module-nav { display: flex; align-items: center; gap: 5px; }
.module-link { min-height: 34px; display: inline-flex; align-items: center; padding: 0 11px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 11px; font-weight: 600; }
.module-link:hover, .module-link.is-active { color: var(--green-dark); }
.module-link.is-active { border-bottom-color: var(--green); }
.private-label, .eyebrow, .form-step { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1.2px; }
.private-label { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; display: inline-block; background: #5d9a71; border-radius: 50%; }
.topbar form { margin: 0; }
.text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.text-button:hover { color: var(--ink); }
.page-shell { width: min(1320px, 90vw); margin: 0 auto; }
.home-shell { min-height: calc(100vh - 72px); display: flex; flex-direction: column; }
.home-intro { min-height: 230px; }
.module-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding: 0 0 64px; }
.module-card { min-height: 275px; display: flex; flex-direction: column; align-items: flex-start; padding: 26px 28px; border-top: 3px solid var(--green); background: var(--white); transition: transform .18s ease, box-shadow .18s ease; }
.module-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(24,44,41,.09); }
.retirement-card { border-top-color: var(--gold); }
.module-card-index { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.module-card h2 { margin-top: 38px; font-family: var(--serif); font-size: 29px; font-weight: 500; }
.module-card p { max-width: 440px; margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.module-card-teaser { width: 100%; display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding: 12px 0; border-top: 1px solid var(--line); }
.module-card-teaser-label { color: var(--muted); font-size: 10px; }
.module-card-teaser-value { color: var(--green-dark); font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; }
.module-card-teaser-value.is-negative { color: var(--coral); }
.module-card-teaser small, .module-card-teaser-empty { color: var(--muted); font-size: 10px; }
.module-card-action { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-top: 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--green-dark); font-size: 12px; font-weight: 700; }
.retirement-card .module-card-action { color: #916d2e; }
.home-shell .page-footer { margin-top: auto; }
.retirement-intro { min-height: 190px; }
.person-create-form { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(170px, 1fr) minmax(220px, 1.2fr) auto; align-items: end; gap: 14px; padding: 18px; border-top: 3px solid var(--gold); background: var(--white); }
.person-create-heading .eyebrow { margin-bottom: 6px; }
.person-create-heading h2 { font-size: 18px; }
.person-create-form label, .person-edit-form label, .retirement-asset-form label { min-width: 0; }
.person-create-form .button { min-height: 39px; }
.retirement-people { margin-top: 34px; }
.retirement-person { padding: 25px 0 30px; border-top: 1px solid var(--line); scroll-margin-top: 18px; }
.retirement-person-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.retirement-person-heading .eyebrow { margin-bottom: 7px; }
.retirement-person-heading h2 { font-family: var(--serif); font-size: 27px; font-weight: 500; }
.retirement-total { display: flex; flex-direction: column; gap: 5px; text-align: right; }
.retirement-total span, .asset-projection span { color: var(--muted); font-size: 10px; }
.retirement-total strong { color: var(--green-dark); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.person-management { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.person-edit-form { flex: 1; display: grid; grid-template-columns: minmax(150px, 1fr) minmax(175px, .8fr) auto; align-items: end; gap: 12px; }
.person-edit-form .button { min-height: 39px; }
.person-delete-form, .asset-delete-form { flex: 0 0 auto; }
.retirement-delete-text { padding: 8px 0; color: #a84f43; }
.retirement-delete-text:hover { color: #833b33; }
.retirement-assets { padding-top: 18px; }
.retirement-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.retirement-section-heading h3 { margin: 0; font-size: 15px; }
.retirement-section-heading > span { color: var(--muted); font-size: 10px; }
.retirement-asset-row { padding: 14px 0; border-top: 1px solid var(--line); }
.asset-projection { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 11px; }
.asset-projection strong { color: var(--green-dark); font-size: 16px; font-variant-numeric: tabular-nums; }
.retirement-asset-form { display: grid; grid-template-columns: minmax(150px, 1.2fr) repeat(3, minmax(125px, 1fr)) auto; align-items: end; gap: 10px; }
.retirement-asset-form input { height: 36px; }
.retirement-asset-form .button { min-height: 36px; white-space: nowrap; }
.asset-save-button { color: var(--green-dark); background: var(--mint); }
.asset-delete-form { display: flex; justify-content: flex-end; margin-top: 4px; }
.retirement-asset-create-form { margin-top: 13px; padding: 16px 0 0; border-top: 1px dashed #cbd5cc; }
.retirement-asset-create-form .eyebrow { margin-bottom: 11px; }
.retirement-asset-create-form .retirement-asset-form { grid-template-columns: minmax(150px, 1.2fr) repeat(3, minmax(125px, 1fr)) auto; }
.retirement-empty { margin-top: 22px; }
.projection-note { margin: 20px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.page-intro { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 210px; padding: 40px 0 30px; }
.page-intro > div { min-width: 0; }
.eyebrow { margin: 0 0 12px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 9px; font-family: var(--serif); font-weight: 500; font-size: 48px; line-height: 1.05; letter-spacing: 0; }
.page-intro h1 { overflow-wrap: anywhere; }
h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: 0; }
h3 { margin: 0 0 18px; font-size: 15px; font-weight: 600; }
.muted { color: var(--muted); }
.page-intro .muted { margin: 0; font-size: 14px; }
.intro-mark { color: #9ab6a1; font-family: var(--serif); font-size: 94px; line-height: 1; transform: rotate(-25deg); margin-right: 4%; }
.overview { display: grid; grid-template-columns: 1.45fr repeat(3, 1fr); background: var(--green); color: #fff; min-height: 144px; }
.overview-main, .overview-stat { display: flex; flex-direction: column; justify-content: center; padding: 23px 30px; }
.overview-stat { border-left: 1px solid rgba(255,255,255,.18); }
.metric-label { color: rgba(255,255,255,.72); font-size: 11px; }
.metric-value { margin: 7px 0 4px; font-family: var(--serif); font-size: 34px; font-weight: 500; letter-spacing: 0; }
.metric-note { color: rgba(255,255,255,.68); font-size: 11px; }
.overview-stat strong { margin-top: 12px; font-size: 18px; font-weight: 500; }
.negative { color: #ffd4bf; }
.versions-section { padding: 37px 0 32px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 17px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.version-list { border-top: 1px solid var(--line); }
.version-item { position: relative; min-height: 57px; display: grid; grid-template-columns: minmax(0, 1fr) 30px; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.48); transition: background .16s ease; }
.version-item:hover, .version-item.selected { background: var(--white); }
.version-item.selected { box-shadow: inset 3px 0 var(--green); }
.version-select { min-width: 0; display: grid; grid-template-columns: 16px minmax(160px, 1fr) minmax(180px, .7fr) 20px; align-items: center; gap: 12px; }
.version-dot { width: 8px; height: 8px; border: 1px solid #aeb9b1; border-radius: 50%; }
.version-dot.is-valid { border-color: var(--green); background: var(--green); }
.version-name { font-weight: 600; }
.version-name small { margin-left: 9px; color: var(--green); font-size: 10px; font-weight: 500; }
.version-date { color: var(--muted); font-size: 12px; }
.version-arrow { color: var(--muted); text-align: right; }
.version-actions { position: relative; justify-self: end; z-index: 2; }
.version-actions summary { width: 28px; height: 28px; display: grid; place-items: center; list-style: none; color: var(--muted); border: 1px solid transparent; cursor: pointer; font-size: 14px; }
.version-actions summary::-webkit-details-marker { display: none; }
.version-actions summary:hover, .version-actions[open] summary { color: var(--ink); border-color: var(--line); background: var(--white); }
.version-action-panel { position: absolute; top: calc(100% + 7px); right: 0; width: min(310px, 82vw); display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); background: var(--white); box-shadow: 0 12px 30px rgba(24,44,41,.14); }
.version-action-panel > form { min-width: 0; margin: 0; }
.version-action-panel .button { width: 100%; justify-content: center; }
.version-edit-form { display: grid; gap: 11px; }
.version-duplicate-button { color: var(--green-dark); background: var(--mint); }
.version-action-panel .version-save-button { color: #fff; background: var(--green); }
.version-action-panel .version-save-button:hover { color: #fff; background: var(--green-dark); }
.version-delete-form { padding-top: 12px; border-top: 1px solid var(--line); }
.version-delete-button { color: #8e4836; background: #fbede7; }
.version-delete-button:hover { background: #f7ded4; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(270px, .75fr); gap: 48px; padding: 10px 0 58px; }
.workspace-grid > *, .flow-section { min-width: 0; }
.flow-section .section-heading { margin-bottom: 20px; }
.sankey-section { margin: 24px 0 30px; padding: 20px 0 0; border-top: 1px solid var(--line); }
.sankey-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.sankey-heading .eyebrow { margin-bottom: 6px; }
.sankey-heading h3 { margin: 0; font-size: 16px; }
.sankey-viewport { width: 100%; overflow-x: auto; }
.sankey-chart { display: block; max-width: none; font-family: var(--sans); }
.sankey-link { fill: none; mix-blend-mode: multiply; transition: stroke-opacity .15s ease; }
.sankey-node rect { stroke: rgba(24,44,41,.18); stroke-width: .7px; }
.sankey-label { fill: var(--ink); font-size: 10px; font-weight: 600; }
.sankey-value { fill: var(--muted); font-size: 9px; font-weight: 500; }
.sankey-legend { display: flex; flex-wrap: wrap; gap: 9px 16px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.sankey-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sankey-swatch { width: 8px; height: 8px; display: inline-block; border-radius: 1px; }
.sankey-swatch.income { background: #2c805e; }
.sankey-swatch.salary { background: #233f36; }
.sankey-swatch.expense { background: #c36d53; }
.sankey-swatch.transfer { background: #d1a348; }
.sankey-swatch.balance { background: #75867d; }
.sankey-swatch.deficit { background: #a84f43; }
.sankey-fallback { margin: 14px 0; color: var(--muted); font-size: 12px; }
.salary-chip { max-width: 100%; display: inline-flex; align-items: center; gap: 7px; color: var(--green-dark); background: var(--mint); border-radius: 2px; padding: 8px 10px; font-size: 11px; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.flow-table-wrap { width: 100%; min-width: 0; overflow-x: auto; }
.flow-table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.57); }
.flow-table th { height: 37px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 600; text-align: left; }
.flow-table td { height: 54px; border-bottom: 1px solid var(--line); font-size: 12px; }
.flow-table th:first-child, .flow-table td:first-child { padding-left: 12px; }
.flow-table .category-group-heading th { height: auto; padding: 11px 12px; border-top: 8px solid var(--paper); border-bottom: 1px solid var(--line); background: var(--mint); }
.category-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.category-heading-name { color: var(--ink); font-size: 12px; font-weight: 700; }
.category-totals { display: flex; align-items: center; justify-content: flex-end; gap: 14px; font-size: 10px; white-space: nowrap; }
.category-total-income { color: var(--green); }
.category-total-outflow { color: var(--coral); }
.category-net { color: var(--ink); font-size: 11px; }
.category-net.negative { color: var(--coral); }
.flow-title { font-weight: 600; white-space: nowrap; }
.kind-label { display: inline-block; white-space: nowrap; font-size: 10px; color: var(--muted); }
.kind-income { color: var(--green); }
.amount-cell { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount-editor { display: inline-flex; justify-content: flex-end; align-items: center; gap: 4px; }
.amount-sign { color: var(--muted); font-size: 10px; }
.amount-input { width: 108px; height: 32px; padding: 0 6px; text-align: right; font-variant-numeric: tabular-nums; }
.amount-positive, .amount-input.amount-positive { color: var(--green); font-weight: 600; }
.amount-save { width: 27px; height: 27px; color: var(--green); border: 1px solid transparent; background: transparent; cursor: pointer; font-size: 15px; }
.amount-save:hover { border-color: var(--line); background: var(--mint); }
.flow-table td:last-child { width: 34px; text-align: center; }
.icon-button { width: 27px; height: 27px; color: #88948d; border: 0; background: transparent; cursor: pointer; font-size: 19px; }
.icon-button:hover { color: var(--coral); }
.empty-state { padding: 24px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.42); font-size: 13px; }
.standing-orders { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.standing-orders .section-heading { align-items: center; }
.standing-orders .section-heading h3 { margin: 0; font-size: 19px; }
.order-summary { display: flex; align-items: baseline; gap: 12px; color: var(--muted); font-size: 11px; }
.order-summary strong { color: var(--green-dark); font-size: 14px; font-variant-numeric: tabular-nums; }
.order-list { border-top: 1px solid var(--line); }
.order-row { min-height: 70px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.45); }
.order-description { min-width: 0; display: grid; grid-template-columns: 1fr; gap: 3px; }
.order-type { color: var(--green); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.order-description strong { font-size: 12px; }
.order-detail { color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.order-amount { white-space: nowrap; color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.entry-form { margin-top: 32px; padding-top: 21px; border-top: 1px solid var(--line); }
.form-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.form-heading h3 { margin: 0; }
.form-step { font-size: 9px; }
.entry-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 14px; }
label { display: flex; flex-direction: column; gap: 6px; color: #4d5c56; font-size: 11px; font-weight: 600; }
input, select { width: 100%; min-width: 0; height: 39px; padding: 0 10px; color: var(--ink); border: 1px solid #dce3dc; border-radius: 2px; outline: 0; background: #fff; font-size: 12px; }
input:focus, select:focus { border-color: #6d9b7c; box-shadow: 0 0 0 2px rgba(74,133,91,.12); }
input::placeholder { color: #a7b0aa; }
.button { min-height: 39px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; border: 0; border-radius: 2px; cursor: pointer; font-weight: 600; font-size: 11px; transition: background .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.add-button { align-self: end; }
.form-hint { margin: 12px 0 0; color: var(--coral); font-size: 11px; }
.side-column { display: flex; flex-direction: column; gap: 23px; }
.side-form { padding: 21px; background: #fff; border-top: 3px solid var(--gold); box-shadow: 0 5px 18px rgba(36,61,49,.035); }
.side-form .eyebrow { margin-bottom: 8px; }
.side-form h3 { margin-bottom: 17px; }
.side-form > label { margin-bottom: 12px; }
.date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.date-fields input { padding: 0 6px; font-size: 11px; }
.optional { color: #9aa49d; font-weight: 400; }
.button-secondary { width: 100%; color: #fff; background: var(--ink); }
.button-secondary:hover { background: #2d4942; }
.account-note { padding: 4px 2px 0; }
.account-note .eyebrow { margin-bottom: 9px; }
.account-note h3 { margin-bottom: 8px; }
.account-note p:not(.eyebrow) { max-width: 290px; margin-bottom: 14px; font-size: 12px; line-height: 1.65; }
.account-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.account-pills span { padding: 6px 8px; color: #53645b; border: 1px solid var(--line); background: rgba(255,255,255,.65); font-size: 10px; }
.settings-panel { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.settings-panel summary { padding: 14px 0; cursor: pointer; color: #52615a; font-size: 12px; font-weight: 600; }
.compact-form { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 17px; border-bottom: 1px solid var(--line); }
.check-label { display: flex; flex-direction: row; align-items: center; font-weight: 400; }
.check-label input { width: 14px; height: 14px; }
.button-small { min-height: 32px; align-self: start; color: var(--green-dark); background: var(--mint); }
.managed-list { padding: 8px 0 14px; }
.managed-title { margin: 12px 0 4px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.managed-row { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 11px; }
.managed-row form { margin: 0; }
.managed-row .icon-button { width: 30px; height: 30px; }
.settings-hint { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.page-footer { display: flex; justify-content: space-between; padding: 18px 0 26px; border-top: 1px solid var(--line); color: #8b9790; font-size: 9px; letter-spacing: .8px; }
.alert { margin: 12px 0; padding: 12px 14px; color: #8e4836; border-left: 3px solid var(--coral); background: #fbede7; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background-color: var(--paper); }
.login-shell { width: min(100%, 420px); padding: 38px 40px 32px; background: rgba(255,255,255,.92); border-top: 3px solid var(--green); box-shadow: 0 18px 60px rgba(29,56,42,.09); animation: arrive .55s ease both; }
.login-shell .wordmark { margin-bottom: 60px; }
.login-shell .eyebrow { margin-bottom: 14px; }
.login-shell h1 { font-size: 37px; }
.login-copy { margin-bottom: 26px; font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-form label { font-size: 11px; }
.login-form input { height: 44px; }
.login-form .button { margin-top: 5px; height: 44px; }
.login-foot { margin: 26px 0 0; color: #9aa39d; font-size: 10px; }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 900px) {
    .topbar { padding-inline: 5vw; }
    .person-create-form { grid-template-columns: minmax(130px, .7fr) repeat(2, minmax(140px, 1fr)); }
    .person-create-form .button { grid-column: 3; justify-self: end; }
    .retirement-asset-form, .retirement-asset-create-form .retirement-asset-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .retirement-asset-form .button { justify-self: start; }
    .workspace-grid { grid-template-columns: minmax(0, 1.4fr) minmax(245px, .8fr); gap: 28px; }
    .overview { grid-template-columns: 1.3fr 1fr 1fr; }
    .overview-stat:last-child { display: none; }
    .overview-main, .overview-stat { padding-inline: 20px; }
}
@media (max-width: 680px) {
    .topbar { height: 62px; padding: 0 5vw; }
    .topbar { gap: 7px; }
    .module-nav { gap: 0; }
    .module-link { min-height: 30px; padding-inline: 6px; font-size: 10px; }
    .topbar-right { gap: 8px; }
    .private-label { display: none; }
    .page-shell { width: 90vw; }
    .page-intro { min-height: 173px; padding: 30px 0 23px; }
    h1 { font-size: 41px; }
    .page-intro .muted { max-width: 270px; font-size: 12px; line-height: 1.55; }
    .intro-mark { margin-right: 0; font-size: 68px; }
    .overview { grid-template-columns: 1fr 1fr; }
    .overview-main { grid-column: 1 / -1; min-height: 126px; }
    .overview-stat { min-height: 83px; border-top: 1px solid rgba(255,255,255,.18); }
    .overview-stat:nth-child(3) { border-left: 1px solid rgba(255,255,255,.18); }
    .overview-stat:last-child { display: flex; grid-column: 1 / -1; min-height: 70px; }
    .overview-stat:last-child strong { margin-top: 6px; }
    .versions-section { padding-top: 29px; }
    .version-item { grid-template-columns: minmax(0, 1fr) 28px; gap: 5px; padding: 10px 9px; }
    .version-select { grid-template-columns: 12px minmax(0, 1fr) 16px; gap: 8px; }
    .version-date { grid-column: 2; grid-row: 2; font-size: 10px; }
    .version-arrow { grid-column: 3; grid-row: 1 / span 2; }
    .version-name { font-size: 12px; }
    .version-name small { display: block; margin: 3px 0 0; }
    .workspace-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 8px; }
    .module-cards { grid-template-columns: minmax(0, 1fr); gap: 13px; padding-bottom: 40px; }
    .module-card { min-height: 225px; padding: 22px; }
    .module-card h2 { margin-top: 24px; }
    .retirement-intro { min-height: 165px; }
    .retirement-intro h1 { font-size: 32px; }
    .person-create-form { grid-template-columns: minmax(0, 1fr); gap: 11px; padding: 15px; }
    .person-create-form .button { grid-column: auto; justify-self: stretch; }
    .retirement-person-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .retirement-person-heading h2 { margin-bottom: 0; }
    .retirement-total { text-align: left; }
    .person-management { align-items: stretch; flex-direction: column; }
    .person-edit-form { grid-template-columns: minmax(0, 1fr); }
    .person-edit-form .button { width: 100%; }
    .person-delete-form { align-self: flex-start; }
    .retirement-asset-row { padding: 12px 0; }
    .retirement-asset-form, .retirement-asset-create-form .retirement-asset-form { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .retirement-asset-form .button { width: 100%; }
    .asset-projection { align-items: flex-start; flex-direction: column; gap: 4px; }
    .asset-delete-form { justify-content: flex-start; }
    .flow-section .section-heading { align-items: stretch; flex-direction: column; gap: 10px; }
    .sankey-heading { align-items: flex-start; }
    .salary-chip { align-self: flex-start; padding: 7px; font-size: 9px; }
    .flow-table { display: block; width: 100%; min-width: 0; }
    .flow-table thead { display: none; }
    .flow-table .category-group { display: block; }
    .flow-table .category-group-heading { display: block; }
    .flow-table .category-group-heading th { display: block; }
    .flow-table .category-group tr:not(.category-group-heading) { display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; padding: 7px 8px 7px 0; }
    .flow-table .category-group td { display: block; height: auto; padding-top: 3px; padding-bottom: 3px; border: 0; white-space: normal; }
    .flow-table .category-group td:first-child { grid-column: 1; grid-row: 1; padding-left: 12px; }
    .flow-table .category-group td:nth-child(2) { grid-column: 1; grid-row: 2; padding-left: 12px; }
    .flow-table .category-group td.amount-cell { grid-column: 1; grid-row: 3; padding-left: 12px; text-align: left !important; }
    .flow-table .category-group td:last-child { grid-column: 2; grid-row: 1 / span 3; align-self: start; width: auto; padding: 0; }
    .flow-table .category-group td:last-child form { margin: 0; }
    .flow-table .amount-editor { justify-content: flex-start; }
    .flow-table .flow-title { white-space: normal; overflow-wrap: anywhere; }
    .category-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
    .category-totals { justify-content: flex-start; gap: 9px; white-space: normal; flex-wrap: wrap; }
    .standing-orders .section-heading { align-items: stretch; flex-direction: column; gap: 8px; }
    .order-summary { align-items: baseline; flex-direction: row; justify-content: space-between; gap: 8px; }
    .order-row { gap: 10px; padding-inline: 8px; }
    .entry-fields { grid-template-columns: 1fr; }
    .entry-fields label, .add-button { width: 100%; }
    .side-column { gap: 22px; }
    .page-footer { font-size: 8px; }
}
@media (max-width: 380px) {
    .topbar { gap: 5px; padding-inline: 16px; }
    .topbar .wordmark { flex: 0 0 auto; gap: 0; font-size: 0; }
    .topbar .wordmark-mark { flex: 0 0 30px; font-size: 17px; }
    .module-nav { flex: 1; justify-content: center; min-width: 0; }
    .module-link { padding-inline: 5px; font-size: 9px; }
    .topbar-right { flex: 0 0 auto; gap: 0; }
    .topbar-right .text-button { padding-inline: 0; font-size: 10px; }
    .page-shell { width: calc(100vw - 32px); }
    .retirement-intro h1 { font-size: 30px; }
    .overview-main, .overview-stat { padding-inline: 13px; }
    .overview-stat strong { font-size: 15px; }
    .side-form { padding: 16px; }
    .date-fields { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
