:root { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #243a35; background: #f6f7f3; font-synthesis: none; }
* { box-sizing: border-box; }
html { min-height: 100%; overflow-y: auto; }
body { min-height: 100%; margin: 0; }
a { color: #226952; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 3px solid #bd791d; outline-offset: 4px; }
input:focus, select:focus, textarea:focus, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 1px solid #bd791d; outline-offset: -1px; }
.site-shell { max-width: 1440px; margin: auto; padding: 0 44px; }
.topbar { min-height: 94px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #dce3dc; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: #1d4135; font-weight: 750; font-size: 21px; text-decoration: none; letter-spacing: -.5px; }
.brand-mark { display: block; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; object-fit: contain; }
.brand-divider { color: #b5bfb4; font-weight: 400; margin: 0 5px; }
.brand-subtitle { color: #66756b; font-size: 13px; font-weight: 450; letter-spacing: 0; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: #69786e; font-size: 13px; text-decoration: none; padding: 8px 0; }
.nav-links a.active { color: #235b44; border-bottom: 2px solid #235b44; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 44px 0 28px; }
.eyebrow { color: #6c7d63; font-size: 10px; letter-spacing: 2px; font-weight: 750; margin: 0 0 10px; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 3.2vw, 44px); font-weight: 400; letter-spacing: -1.2px; }
h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.3px; }
.intro { color: #67766d; font-size: 14px; margin: 13px 0 0; line-height: 1.6; }
.status-pill { display: flex; gap: 8px; align-items: center; white-space: nowrap; padding: 10px 13px; border: 1px solid #d9e4d8; border-radius: 30px; color: #4e6a52; background: #edf3e9; font-size: 11px; }
.status-dot { width: 6px; height: 6px; background: #5a835b; border-radius: 50%; }
.demo-notice { margin-bottom: 26px; border: 1px solid #e3e5d6; background: #f0f1e7; color: #606647; border-radius: 9px; padding: 13px 17px; font-size: 12px; line-height: 1.6; }
.onboarding { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(0, 1.6fr); gap: 28px; align-items: center; padding: 20px 24px; margin-bottom: 24px; background: #f9fbf6; }
.onboarding h2 { margin-bottom: 8px; }
.onboarding .muted { margin: 0; }
.onboarding-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; list-style: none; padding: 0; margin: 0; }
.onboarding-steps li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.onboarding-steps li > span { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border-radius: 50%; color: #fff; background: #497351; font-size: 11px; font-weight: 700; }
.onboarding-steps strong, .onboarding-steps small { display: block; }
.onboarding-steps strong { color: #304a3b; font-size: 11px; margin: 2px 0 5px; }
.onboarding-steps small { color: #718071; font-size: 10px; line-height: 1.5; }
.planner-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { background: #fff; border: 1px solid #e0e6df; border-radius: 13px; box-shadow: 0 3px 12px #29493003; }
.comparison-panel > .comparison-toolbar { margin-bottom: 12px; }
.comparison-toolbar .comparison-heading-tools { width: 100%; }
.comparison-toolbar .comparison-action-controls { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; gap: 8px; flex-wrap: wrap; }
.comparison-panel .comparison-toolbar .comparison-action-controls > * { order: 0; }
.comparison-toolbar .comparison-heading-tools { flex-wrap: wrap; overflow: visible; }
.comparison-toolbar .comparison-heading-tools > .comparison-maximize-button { order: 4; flex: 0 0 auto; }
.comparison-toolbar .comparison-action-controls > label { margin: 0; }
.comparison-toolbar .today-money-toggle { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.comparison-toolbar .today-money-toggle input { width: 13px; height: 13px; margin: 0; }
.grid-toolbar-group { display: inline-flex; align-items: center; gap: 5px; padding: 4px 5px; border: 1px solid #dce5da; border-radius: 5px; }
.assumptions { padding: 23px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.small-badge { font-size: 9px; font-weight: 700; color: #72826d; background: #f1f4ec; border-radius: 4px; padding: 5px 7px; letter-spacing: 1px; }
.muted { color: #758077; font-size: 12px; line-height: 1.6; }
.assumptions > .muted { margin: 12px 0 23px; }
label { display: flex; justify-content: space-between; font-size: 12px; color: #43584c; margin: 20px 0 8px; font-weight: 550; }
label span { color: #7b887e; }
input { width: 100%; border: 1px solid #d6dfd5; border-radius: 7px; padding: 12px; color: #273e30; background: #fcfdfb; font-size: 15px; font-variant-numeric: tabular-nums; }
.field-help { color: #798276; font-size: 10px; line-height: 1.6; margin: 7px 0 0; }
.salary-help strong { color: #315c42; font-weight: 700; font-variant-numeric: tabular-nums; }
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #245a43; color: white; border: 0; border-radius: 7px; padding: 13px 16px; font-size: 12px; font-weight: 600; }
.primary-button:hover { background: #193f30; }
.account-action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 18px 0 4px; }
.account-action-button { display: inline-flex; width: auto !important; min-width: 148px; align-items: center; justify-content: center; margin: 0 !important; text-decoration: none; }
.assumptions .primary-button { width: 100%; margin-top: 25px; }
.text-button { display: block; margin: 14px auto 0; background: none; border: 0; color: #637967; padding: 5px; font-size: 11px; }
.calculation-status { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid #edf0e9; color: #7a8579; font-size: 10px; line-height: 1.6; }
.results { display: grid; gap: 20px; min-width: 0; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.summary-card { padding: 21px 19px; background: #fff; border: 1px solid #e0e6df; border-radius: 11px; min-width: 0; }
.summary-card:first-child { background: #e9f0e3; border-color: #dce6d2; }
.summary-card p { color: #647361; font-size: 11px; margin: 0 0 13px; }
.summary-card strong { font-size: clamp(18px, 2vw, 27px); font-weight: 550; letter-spacing: -.7px; display: block; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.summary-card .summary-date { font-size: clamp(16px, 1.7vw, 22px); line-height: 1.4; }
.summary-card > span { font-size: 10px; color: #7b8775; display: block; margin-top: 10px; }
.chart-panel { padding: 25px 25px 17px; }
.chart-panel h2, .table-panel h2 { font-size: 16px; }
.chart-legend { display: flex; align-items: center; gap: 8px; color: #6b7c6c; font-size: 10px; }
.chart-legend span { width: 16px; height: 3px; background: #497351; }
.chart-legend-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.cash-chart { display: block; width: 100%; height: auto; margin: 18px 0 -6px; }
.grid-line { stroke: #edf0e9; stroke-width: 1; }
.zero-line { stroke: #a7b4a6; stroke-dasharray: 5 5; }
.cash-line { fill: none; stroke: #497351; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.pension-line { stroke: #45a99d; }
.pension-legend span { background: #45a99d; }
.isa-line { stroke: #39748b; }
.isa-legend span { background: #39748b; }
.investment-line { stroke: #7753a1; }
.investment-legend span { background: #7753a1; }
.active-scenario { background: #f2f7ef; }
.comparison-panel { position: relative; }
.comparison-panel .table-scroll { border-top: 0; }
.comparison-panel > .panel-heading { position: relative; z-index: 8000; padding-right: 48px; flex-wrap: wrap; }
.comparison-panel > .panel-heading > :first-child { flex: 0 0 100%; }
.comparison-mode-banner { position: sticky; top: 0; left: 0; z-index: 5999; display: flex; width: max-content; min-width: 100%; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 12px; border-bottom: 1px solid #244d38; background: #315b45; color: #fff; font-size: 11px; letter-spacing: .12em; }
.comparison-mode-banner strong { font-weight: 850; }
.comparison-mode-banner button { padding: 3px 8px; border: 1px solid #dcebd9; border-radius: 4px; background: transparent; color: #fff; font: inherit; font-size: 10px; font-weight: 750; letter-spacing: 0; }
.comparison-mode-banner button:hover, .comparison-mode-banner button:focus-visible { background: #46755a; outline: none; }
.comparison-heading-tools { display: flex; flex: 1 1 100%; align-items: center; align-content: center; justify-content: flex-start; gap: 8px 12px; flex-wrap: nowrap; min-width: 0; max-width: 100%; height: fit-content; overflow: hidden; }
.comparison-action-controls { display: contents; }
.comparison-action-controls > .toolbar-button { order: 1; }
.comparison-action-controls > .snapshot-revert-select { order: 1; }
.comparison-action-controls > .comparison-maximize-button { order: 4; }
.comparison-heading-tools > .matrix-search-controls { order: 2; }
.comparison-heading-tools > .matrix-search-controls { flex: 1 1 80px; }
.comparison-heading-tools > .history-controls { order: 3; flex: 0 0 auto; margin-left: auto; }
.toolbar-button { min-height: 27px; padding: 5px 9px; border: 1px solid #b7cbb8; border-radius: 5px; background: #f7faf5; color: #315b45; font-size: 10px; font-weight: 750; line-height: 1.1; white-space: nowrap; cursor: pointer; }
.toolbar-button:hover, .toolbar-button:focus-visible { border-color: #8cae8f; background: #eaf2e7; color: #244d38; outline: none; }
.admin-nav-button { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 5px 10px; border: 1px solid #b7cbb8; border-radius: 5px; background: #f7faf5; color: #315b45; font-size: 10px; font-weight: 750; line-height: 1.1; text-decoration: none; white-space: nowrap; }
.admin-nav-button:hover, .admin-nav-button:focus-visible { border-color: #8cae8f; background: #eaf2e7; color: #244d38; outline: none; }
.admin-alert-flashing { border-color: #b52b2b; color: #8d1717; background: #ffd9d9; animation: admin-alert-pulse 5s steps(2, end) 1; }
.admin-alert-count { display: inline-flex; min-width: 15px; height: 15px; align-items: center; justify-content: center; border-radius: 999px; background: #b52b2b; color: #fff; font-size: 9px; }
@keyframes admin-alert-pulse { 50% { background: #fff; border-color: #e6b4b4; color: #a35b5b; } }
@media (prefers-reduced-motion: reduce) { .admin-alert-flashing { animation: none; } }
.grid-print-years-label { display: inline-flex; align-items: center; gap: 5px; margin: 0; color: #536655; font-size: 10px; font-weight: 750; white-space: nowrap; }
.grid-print-years-label > span { color: #315b45; font-size: 10px; font-weight: 850; }
.grid-print-years { min-height: 27px; padding: 4px 5px; border: 1px solid #b7cbb8; border-radius: 5px; background: #f7faf5; color: #315b45; font: inherit; font-size: 10px; }
.delayed-tooltip-target { position: relative; }
.delayed-tooltip { position: absolute; top: calc(100% + 8px); left: 50%; z-index: 6200; width: max-content; max-width: min(420px, calc(100vw - 24px)); padding: 8px 10px; transform: translateX(-50%); border: 1px solid #315b45; border-radius: 5px; background: #315b45; color: #fff; font-size: 11px; font-weight: 650; line-height: 1.35; white-space: normal; text-align: left; pointer-events: none; box-shadow: 0 4px 12px rgb(0 0 0 / 16%); }
.comparison-maximize-button { position: static; z-index: auto; display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; padding: 0; border: 1px solid #d7e1d5; border-radius: 5px; background: #f7faf5; color: #647568; font-size: 18px; font-weight: 650; line-height: 1; }
.comparison-maximize-button:hover, .comparison-maximize-button:focus-visible { border-color: #b5c7b2; background: #edf4ea; color: #315b45; }
.maximize-icon { display: block; transform: translateY(-1px); }
.history-controls { display: inline-flex; align-items: center; gap: 4px; }
.figure-mode-toggle { font-size: 10px; }
.history-button { position: relative; width: 25px; height: 25px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #647568; font-size: 20px; line-height: 1; }
.history-tooltip { position: absolute; top: calc(100% + 6px); left: 50%; z-index: 10; padding: 4px 7px; transform: translateX(-50%); border-radius: 4px; background: #315b45; color: #fff; font-size: 10px; font-weight: 650; white-space: nowrap; pointer-events: none; }
.history-button:hover, .history-button:focus-visible { background: #edf4ea; color: #315b45; outline: none; }
.history-button:disabled { color: #bdc7bd; cursor: not-allowed; }
.page-history-controls { flex: 0 0 auto; }
.year-ahead-heading-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 14px; }
.forecast-tab-control { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.forecast-tab-control-maximized { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; gap: 0; min-width: 0; padding: 0 24px 24px; overflow-x: hidden; overflow-y: auto; background: #fff; }
.forecast-tab-control-maximized .forecast-tabs { flex: 0 0 auto; margin: 0 -24px; padding: 0 24px; background: #fff; }
.forecast-tab-control-maximized > [role="tabpanel"] { flex: 1 1 auto; min-height: 0; overflow: auto; border-radius: 0; }
.forecast-tab-control-maximized > .comparison-panel { display: flex; flex-direction: column; overflow: hidden; }
.forecast-tab-control-maximized .bot-table-scroll { flex: 1 1 auto; min-height: 0; max-height: none; }
.forecast-tab-control-living-costs { height: min(960px, max(320px, calc(100dvh - 220px))); min-height: 0; gap: 0; overflow: hidden; }
.forecast-tab-control-living-costs > .forecast-tabs { flex: 0 0 auto; background: #f6f7f3; }
.forecast-tab-control-living-costs > .living-costs-layout { flex: 1 1 auto; min-height: 0; padding-top: 20px; overflow: hidden; }
.forecast-tab-control-living-costs > .living-costs-layout .living-costs-panel { min-height: 0; height: 100%; overflow-x: hidden; overflow-y: auto; }
.forecast-tab-control-year-ahead { height: min(960px, max(320px, calc(100dvh - 220px))); min-height: 0; gap: 0; overflow: hidden; }
.forecast-tab-control-year-ahead > .forecast-tabs { flex: 0 0 auto; background: #f6f7f3; }
.forecast-tab-control-year-ahead > .year-ahead-panel { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; margin-top: 0; overflow: hidden; }
.forecast-tab-control-year-ahead > .year-ahead-panel .table-scroll { flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.forecast-tab-control-maximized.forecast-tab-control-year-ahead { height: auto; }
.forecast-tab-control-maximized.forecast-tab-control-year-ahead > .year-ahead-panel { margin-top: 0; }
.matrix-detail-toggle { margin-left: 12px; padding: 2px 4px; border: 0; border-radius: 0; background: transparent; color: #7b8794; font: inherit; font-size: 10px; font-weight: 700; line-height: 1; cursor: pointer; }
.matrix-detail-toggle:hover, .matrix-detail-toggle:focus-visible { background: transparent; color: #66727f; outline: none; }
.comparison-matrix tr:has(.property-type-flag) .matrix-detail-toggle { margin-left: 3px; }
.matrix-add-button { display: inline-block; width: 16px; height: 14px; margin-left: 8px; padding: 0 3px; border: 0; background: transparent; color: #7b8794; font: inherit; font-size: 14px; font-weight: 700; line-height: 14px; vertical-align: middle; cursor: pointer; box-sizing: border-box; }
.matrix-add-button:hover, .matrix-add-button:focus-visible { color: #536655; outline: none; }
.matrix-delete-button { display: inline-block; width: 12px; height: 14px; margin-left: 6px; padding: 0 1px; border: 0; background: transparent; color: #9b6d6d; font: inherit; font-size: 9px; line-height: 14px; vertical-align: middle; opacity: .72; cursor: pointer; box-sizing: border-box; }
.matrix-delete-button:hover, .matrix-delete-button:focus-visible { color: #a61c00; outline: none; }
.matrix-shift-control-hidden { display: inline-block; visibility: hidden; }
body.shift-key-held .matrix-shift-control-hidden { visibility: visible; }
body.payment-date-popup-committed .pension-payment-date-popup,
body.payment-date-popup-committed .cashflow-paid-date-popup { display: none !important; visibility: hidden !important; pointer-events: none !important; }
.grid-edit-cancel-anchor { position: fixed; left: -10000px; top: -10000px; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.fill-right-popup { display: none !important; pointer-events: none; }
.comparison-matrix .undated-date-info-popup-open,
body.payment-date-popup-committed .comparison-matrix .undated-date-info-popup-open { display: flex !important; visibility: visible !important; pointer-events: auto !important; }
body.shift-key-held td.ctrl-info-hovered .fill-right-popup,
body.shift-key-held td[data-cell-info-key]:hover .fill-right-popup { display: flex !important; pointer-events: auto; }
body.shift-key-held td.matrix-now-column:hover .cashflow-paid-date-popup { display: flex !important; visibility: visible !important; pointer-events: auto !important; }
body.shift-key-held td.grid-shift-cell-hovered .cashflow-paid-date-popup { display: flex !important; visibility: visible !important; pointer-events: auto !important; }
.property-type-flag { display: inline-block; margin-left: 7px; padding: 1px 4px; border: 1px solid #b6c9b4; border-radius: 3px; color: #536655; font-size: 8px; font-weight: 800; letter-spacing: .04em; line-height: 1.2; vertical-align: middle; }
.property-type-flag-button { cursor: pointer; background: #f7faf5; font: inherit; font-size: 8px; }
.property-type-flag-button:hover, .property-type-flag-button:focus-visible { background: #eaf2e7; color: #315b45; }
.comparison-matrix { min-width: 680px; }
.comparison-matrix thead th { background: #f7f9f4; position: sticky; top: 0; z-index: 6000 !important; isolation: isolate; }
.comparison-matrix.scenario-comparison-open thead th { top: 29px; }
.comparison-matrix thead th:not(:first-child) { min-width: 120px; }
.comparison-matrix th:first-child { position: sticky; left: 0; z-index: 2; background: inherit; }
.comparison-matrix .matrix-scenario th { background: #315b45; color: #fff; font-size: 12px; font-weight: 650; letter-spacing: .1px; padding-top: 11px; padding-bottom: 11px; }
.comparison-matrix .matrix-label { color: #536655; font-weight: 550; }
.comparison-matrix tbody tr:not(.matrix-scenario) { background: transparent; }
.comparison-matrix td { color: #425b49; }
.comparison-matrix td:not(.negative) { font-weight: 550; }
.comparison-matrix td[data-cell-info-key]:not(:has(> input.grid-value-override-input, > input.mortgage-payment-input, > input.gross-rent-override-input, > .property-value-cell > input.grid-value-override-input)) { box-shadow: inset 0 0 0 999px rgb(66 91 73 / 9%); }
.comparison-matrix td.pension-payment-date-cell { position: relative; overflow: visible; }
.bot-table-scroll { border-top: 0; max-height: 70vh; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
/* Root semantic groups are never descendants of another expandable branch. A
   transient local reconciler state must not make a root header disappear. */
.bot-table-scroll tr[data-parent-detail-group=""] { display: table-row !important; }
.comparison-matrix { width: max-content; min-width: max-content; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.comparison-matrix thead th { background: #6fa8dc; color: #173d5d; border-color: #9fc5e8; font-weight: 700; }
.comparison-matrix thead th:not(:first-child) { width: 74px; min-width: 74px; }
.comparison-matrix tbody td:not(:first-child) { width: 74px; min-width: 74px; }
.comparison-matrix thead th:not(:first-child) { font-size: 13px; font-weight: 850; }
.comparison-matrix thead th.matrix-now-column,
.comparison-matrix tbody td.matrix-now-column { width: 74px; min-width: 74px; max-width: 74px; }
.comparison-matrix thead th.matrix-now-column { z-index: 6500 !important; }
.comparison-matrix th:first-child { width: 300px; min-width: 300px; max-width: 300px; }
.comparison-matrix thead th:first-child { background: #ffe599; color: #604b13; z-index: 4; }
.comparison-matrix thead th:first-child { z-index: 7001 !important; }
.comparison-matrix .matrix-scenario th { background: #315b45; color: #fff; }
.build-version { display: inline-block; margin-left: 6px; padding: 2px 6px; border: 1px solid #9fc5e8; border-radius: 999px; color: #173d5d; background: #d9ead3; font-size: 9px; letter-spacing: .04em; vertical-align: 1px; }
.matrix-scenario-label { display: inline; margin: 0 8px 0 0; color: #dcebd9; font-size: 10px; font-weight: 600; }
.matrix-scenario-select { width: auto; min-width: 170px; margin: 0 8px 0 0; padding: 6px 28px 6px 9px; border: 1px solid #dcebd9; border-radius: 5px; background: #fff; color: #315b45; font: inherit; font-weight: 700; }
.matrix-row-header { white-space: normal; }
.matrix-scenario-picker { position: relative; display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; vertical-align: middle; white-space: nowrap; }
.comparison-matrix.scenario-comparison-open .matrix-scenario-picker { max-width: 100%; flex-wrap: wrap; margin-right: 0; }
.matrix-new-scenario-button { width: 20px; height: 20px; padding: 0; border: 1px solid #b7cbb8; border-radius: 4px; background: #f7faf5; color: #315b45; font-size: 16px; font-weight: 800; line-height: 17px; vertical-align: middle; }
.matrix-new-scenario-button:hover, .matrix-new-scenario-button:focus-visible { border-color: #8cae8f; background: #eaf2e7; color: #244d38; outline: none; }
.matrix-rename-scenario-button { min-height: 20px; padding: 1px 5px; border: 1px solid #b7cbb8; border-radius: 4px; background: #f7faf5; color: #315b45; font-size: 9px; font-weight: 750; line-height: 16px; vertical-align: middle; }
.matrix-rename-scenario-button:hover, .matrix-rename-scenario-button:focus-visible { border-color: #8cae8f; background: #eaf2e7; color: #244d38; outline: none; }
.matrix-delete-scenario-button { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; margin: 0 2px 0 0; padding: 2px; border: 1px solid #d4b4b4; border-radius: 4px; background: #fff8f8; color: #9b3737; vertical-align: middle; cursor: pointer; }
.matrix-delete-scenario-button:hover, .matrix-delete-scenario-button:focus-visible { border-color: #b95b5b; background: #ffeaea; outline: none; }
.matrix-delete-scenario-icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.matrix-recover-scenario-button { min-width: 22px; height: 22px; padding: 1px 5px; border: 1px solid #b7cbb8; border-radius: 4px; background: #f7faf5; color: #315b45; font-size: 11px; font-weight: 850; line-height: 18px; vertical-align: middle; cursor: pointer; }
.matrix-recover-scenario-button:hover, .matrix-recover-scenario-button:focus-visible { border-color: #8cae8f; background: #eaf2e7; outline: none; }
.matrix-recover-scenario-button:disabled { border-color: #d9e1d6; background: #f4f6f2; color: #a1aaa0; cursor: default; }
.scenario-recovery-modal { width: min(540px, calc(100vw - 32px)); }
.deleted-scenario-list { display: flex; max-height: min(420px, 55vh); flex-direction: column; gap: 7px; overflow-y: auto; margin: 12px 0; padding: 2px; }
.deleted-scenario-entry { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; border: 1px solid #c8d7c5; border-radius: 5px; background: #f7faf5; color: #315b45; font: inherit; text-align: left; cursor: pointer; }
.deleted-scenario-entry:hover, .deleted-scenario-entry:focus-visible { border-color: #6e9b73; background: #eaf2e7; outline: none; }
.deleted-scenario-entry strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deleted-scenario-entry span { flex: 0 0 auto; color: #667568; font-size: 11px; }
.scenario-selector-stack { display: inline-flex; min-width: 154px; flex-direction: column; align-items: stretch; gap: 4px; vertical-align: middle; }
.scenario-inline-rename { position: relative; display: flex; align-items: center; gap: 3px; width: 100%; margin: 0; vertical-align: middle; }
.scenario-inline-rename input { flex: 1 1 auto; width: auto; min-width: 0; height: 26px; padding: 3px 7px; border: 1px solid #6f9e7a; border-radius: 5px; background: #fff; color: #315b45; font: inherit; font-size: 11px; font-weight: 700; box-shadow: 0 0 0 3px rgba(94, 150, 112, .14); outline: none; }
.scenario-inline-rename button { width: 20px; height: 22px; padding: 0; border: 1px solid #b7cbb8; border-radius: 4px; background: #f7faf5; color: #315b45; font-size: 13px; font-weight: 800; line-height: 18px; cursor: pointer; }
.scenario-inline-rename button:hover, .scenario-inline-rename button:focus-visible { border-color: #8cae8f; background: #eaf2e7; outline: none; }
.scenario-inline-rename-cancel { color: #8c4b4b !important; }
.scenario-inline-rename-error { position: absolute; top: 100%; left: 0; z-index: 10; width: 210px; padding: 4px 6px; border: 1px solid #d98e8e; border-radius: 3px; background: #fff0f0; color: #9c0006; font-size: 9px; font-weight: 650; white-space: normal; }
.matrix-explain-difference-button { padding: 4px 7px; border: 1px solid #b7cbb8; border-radius: 4px; background: #f7faf5; color: #315b45; font: inherit; font-size: 10px; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.matrix-explain-difference-button:hover, .matrix-explain-difference-button:focus-visible { border-color: #8cae8f; background: #eaf2e7; outline: none; }
.matrix-compare-button { padding: 4px 7px; border: 1px solid #8cae8f; border-radius: 4px; background: #315b45; color: #fff; font: inherit; font-size: 10px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.matrix-compare-button:hover, .matrix-compare-button:focus-visible { border-color: #244d38; background: #244d38; outline: none; }
.matrix-compare-close-button { background: #f7faf5; color: #315b45; }
.matrix-compare-close-button:hover, .matrix-compare-close-button:focus-visible { background: #eaf2e7; color: #244d38; }
.matrix-scenario-lock-button { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; flex: 0 0 22px; padding: 0; border: 1px solid #b7cbb8; border-radius: 4px; background: #f7faf5; color: #111; line-height: 20px; vertical-align: middle; }
.matrix-scenario-lock-button:hover, .matrix-scenario-lock-button:focus-visible { border-color: #8cae8f; background: #eaf2e7; outline: none; }
.matrix-lock-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.scenario-management-controls { position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 3px 5px; border: 1px solid #b7cbb8; border-radius: 6px; background: #f7faf5; box-sizing: border-box; }
.scenario-management-controls .matrix-scenario-select { width: 154px; min-width: 154px; margin: 0; padding: 4px 22px 4px 7px; border-color: #b7cbb8; border-radius: 4px; background: #fff; color: #315b45; font-size: 11px; }
.scenario-management-controls .matrix-scenario-lock-button { width: 22px; height: 22px; }
.scenario-management-controls .matrix-new-scenario-button { flex: 0 0 20px; }
.scenario-management-controls .matrix-delete-scenario-button { margin-right: 0; }
.scenario-management-controls .scenario-selector-stack .matrix-scenario-select { width: 154px; min-width: 154px; margin: 0; }
.scenario-management-controls .scenario-inline-rename input { width: auto; }
.matrix-scenario-name { display: inline-block; max-width: 245px; overflow: hidden; color: #604b13; font-size: 13px; font-weight: 850; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.matrix-row-header .matrix-scenario-select { width: 136px; min-width: 136px; margin: 0; padding: 6px 20px 6px 7px; border: 0; border-radius: 3px; background: #ffe599; color: #604b13; font-size: 13px; font-weight: 800; }
.matrix-row-header .matrix-comparison-select { width: 112px; min-width: 112px; padding-right: 18px; font-size: 11px; }
.scenario-comparison-switcher { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: -10px 0 0; padding: 8px 10px; border: 1px solid #dce5da; border-radius: 6px; background: #f7faf5; color: #536655; font-size: 11px; }
.scenario-comparison-switcher-label { font-weight: 800; color: #315b45; }
.scenario-comparison-choice { padding: 5px 12px; border: 1px solid #b7cbb8; border-radius: 999px; background: #fff; color: #536655; font: inherit; font-weight: 750; cursor: pointer; }
.scenario-comparison-choice:hover, .scenario-comparison-choice:focus-visible, .scenario-comparison-choice.active { border-color: #315b45; background: #315b45; color: #fff; outline: none; }
.scenario-comparison-switcher-help { color: #748174; font-size: 10px; }
@keyframes comparison-cell-flash-a {
    0%, 65% { font-weight: 800; box-shadow: inset 0 0 0 2px #bd791d; }
    100% { font-weight: 600; box-shadow: inset 0 0 0 0 transparent; }
}
@keyframes comparison-cell-flash-b {
    0%, 65% { font-weight: 800; box-shadow: inset 0 0 0 2px #bd791d; }
    100% { font-weight: 600; box-shadow: inset 0 0 0 0 transparent; }
}
.comparison-value-change-a { animation: comparison-cell-flash-a 1.2s ease-out; }
.comparison-value-change-b { animation: comparison-cell-flash-b 1.2s ease-out; }
.comparison-cell-different { position: relative; box-shadow: none; cursor: pointer; }
.comparison-cell-different::after { content: ""; position: absolute; inset: 0; z-index: 110; box-sizing: border-box; border: 2px solid #d53030; pointer-events: none; }
.comparison-matrix td.comparison-cell-different { overflow: visible; }
.comparison-matrix td.comparison-cell-different.comparison-cell-hovered { z-index: 1300; }
.comparison-difference-popup { display: none; position: absolute; top: calc(100% + 5px); left: 0; z-index: 10000; min-width: max-content; max-width: min(440px, calc(100vw - 24px)); padding: 6px 9px; border: 1px solid #7e9e7a; border-radius: 4px; background: #fffff8; color: #315b45; box-shadow: 0 4px 14px rgb(41 73 48 / 24%); font-size: 11px; font-weight: 650; line-height: 1.25; pointer-events: none; white-space: nowrap; }
.comparison-cell-different.comparison-cell-hovered .comparison-difference-popup { display: block; }
.comparison-matrix.scenario-comparison-open td.comparison-user-edited,
.comparison-matrix.scenario-comparison-open td.comparison-user-edited > input,
.comparison-matrix.scenario-comparison-open td.comparison-user-edited .property-value-cell,
.comparison-matrix.scenario-comparison-open td.comparison-user-edited .property-value-cell > input { background-color: #65f276 !important; }
.comparison-alternate-value { display: none; position: absolute; inset: 0; z-index: 15; align-items: center; justify-content: flex-end; padding: 0 4px; overflow: hidden; background: var(--sheet-fill, #fff); color: #243d2c; font-weight: inherit; pointer-events: none; cursor: pointer; }
body.shift-key-held .comparison-cell-different .comparison-alternate-value,
.comparison-cell-different.comparison-cell-hovered .comparison-alternate-value { display: flex; }
body.shift-key-held .comparison-matrix tbody td.comparison-cell-different { opacity: 1; }
.scenario-comparison-open .comparison-cell-different > input,
.scenario-comparison-open .comparison-cell-different .property-value-cell > input { pointer-events: none; cursor: pointer; }
.scenario-difference-modal { width: min(640px, calc(100vw - 32px)); max-width: 640px; }
.scenario-difference-selectors { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; margin: 16px 0; }
.scenario-difference-selectors label { color: #536655; font-size: 11px; font-weight: 750; }
.scenario-difference-selectors select { width: 100%; padding: 8px 9px; border: 1px solid #d6dfd5; border-radius: 5px; background: #fff; color: #273e30; font: inherit; }
.scenario-difference-list { display: grid; gap: 8px; max-height: 46vh; margin: 12px 0 0; padding: 0 4px 0 24px; overflow: auto; }
.scenario-difference-list li { padding: 8px 10px; border: 1px solid #dce5da; border-radius: 5px; background: #f7faf5; }
.scenario-difference-category { display: block; margin-bottom: 2px; color: #6d766d; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.scenario-difference-list strong { display: block; color: #315b45; font-size: 12px; }
.scenario-difference-values { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 5px; color: #536655; font-size: 11px; }
.matrix-expand-all { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: #777; font-size: 12px; font-weight: 800; line-height: 1; }
.matrix-expand-all:hover, .matrix-expand-all:focus-visible { background: transparent; color: #604b13; }
.matrix-expand-levels { display: inline-flex; max-width: 88px; align-items: center; flex-wrap: wrap; gap: 0; vertical-align: middle; }
.matrix-expand-level { width: 12px; height: 20px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #777; font-size: 9px; font-weight: 800; line-height: 1; }
.matrix-expand-level:hover, .matrix-expand-level:focus-visible, .matrix-expand-level.active { background: #f6d96b; color: #604b13; }
.matrix-current { color: #ffe599; }
.matrix-search-controls { display: inline-flex; align-items: center; gap: 4px; flex: 1 1 245px; min-width: 0; height: 28px; }
.matrix-search-controls:has(input:placeholder-shown) .matrix-search-nav { display: none; }
.matrix-search { width: 170px; min-width: 0; flex: 1 1 170px; padding: 6px 9px; border: 1px solid #b7cbb8; border-radius: 5px; background: #fff; color: #315b45; font: inherit; font-size: 12px; }
.matrix-search:focus { outline: 2px solid #9fc5e8; outline-offset: 1px; }
.matrix-search-nav { min-width: 36px; padding: 5px 6px; border: 1px solid #b7cbb8; border-radius: 4px; background: #f7faf5; color: #536655; font-size: 10px; font-weight: 750; }
.matrix-search-nav:hover:not(:disabled), .matrix-search-nav:focus-visible:not(:disabled) { border-color: #8cae8f; background: #eaf2e7; color: #315b45; }
.matrix-search-nav:disabled { cursor: default; opacity: .45; }
.matrix-search-status { min-width: 42px; color: #536655; font-size: 10px; font-variant-numeric: tabular-nums; text-align: center; }
.comparison-matrix mark.grid-search-match { padding: 0 1px; border-radius: 2px; background: #ffe1e1; color: #b01818; font-weight: 800; }
.comparison-matrix mark.grid-search-match-active { outline: 2px solid #bd791d; outline-offset: 1px; }
.comparison-matrix .matrix-section > th,
.comparison-matrix .matrix-section > td,
.comparison-matrix .matrix-data-row > th,
.comparison-matrix .matrix-data-row > td { background-color: var(--sheet-fill); }
.comparison-matrix thead th.matrix-now-column {
    position: sticky;
    box-shadow: inset 2px 0 #6b9272, inset -2px 0 #6b9272;
}
.comparison-matrix tbody td.matrix-now-column {
    position: relative;
    box-shadow: inset 2px 0 #6b9272, inset -2px 0 #6b9272;
}
.comparison-matrix thead th.matrix-now-column::before,
.comparison-matrix thead th.matrix-now-column::after,
.comparison-matrix tbody td.matrix-now-column::before,
.comparison-matrix tbody td.matrix-now-column::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 30;
    width: 2px;
    background: #6b9272;
    pointer-events: none;
}
.comparison-matrix thead th.matrix-now-column::before,
.comparison-matrix tbody td.matrix-now-column::before { left: 0; }
.comparison-matrix thead th.matrix-now-column::after,
.comparison-matrix tbody td.matrix-now-column::after { right: 0; }
.comparison-matrix thead th.matrix-now-column {
    background-color: #6aa2d2 !important;
    border-top-color: #477ba8;
    border-bottom-color: #477ba8;
}
.comparison-matrix tbody td.matrix-now-column {
    background-image: linear-gradient(rgb(47 91 57 / 6%), rgb(47 91 57 / 6%));
}
.comparison-matrix tbody td.matrix-now-column { isolation: isolate; }
.comparison-matrix tbody td.matrix-now-column::before,
.comparison-matrix tbody td.matrix-now-column::after { z-index: 100; }
.comparison-matrix tbody td.matrix-now-column.comparison-cell-different::after { z-index: 110; border-color: #d53030; }
.comparison-matrix td.income-expenditure-value-cell { background-color: #d53030 !important; background-image: none !important; color: #fff !important; }
.comparison-matrix td.income-expenditure-value-cell.negative,
.comparison-matrix td.income-expenditure-value-cell.negative input { background-color: #d53030 !important; color: #fff !important; }
@keyframes mortgage-negative-pulse {
    0%, 100% { background-color: rgb(255 231 231 / 72%); }
    50% { background-color: rgb(255 151 151 / 72%); }
}
.comparison-matrix td.mortgage-negative-balance { animation: mortgage-negative-pulse 2.8s ease-in-out infinite; color: #9b322c !important; }
@media (prefers-reduced-motion: reduce) { .comparison-matrix td.mortgage-negative-balance { animation: none; background-color: rgb(255 231 231 / 72%); } }
.comparison-matrix .matrix-section th { color: #25352f; font-weight: 750; text-align: left; border-top: 2px solid #fff; }
.comparison-matrix .matrix-section th { white-space: nowrap; }
.comparison-matrix .matrix-child-section > th:first-child { background: linear-gradient(90deg, #fff 0 var(--matrix-child-fill-start), var(--sheet-fill) var(--matrix-child-fill-start) 100%); }
.matrix-inline-select-label, .matrix-inline-select { display: inline-block; vertical-align: middle; }
.matrix-inline-select-label { margin-left: 4px; margin-right: 3px; font-size: 10px; font-weight: 700; }
.matrix-inline-select { width: 96px; min-width: 0; padding: 2px 2px; border: 1px solid #cbd8ca; border-radius: 3px; background: transparent; color: #384d43; font: inherit; font-size: 9px; font-weight: 700; }
.account-name-input { width: 96px; margin-left: 8px; padding: 2px 4px; border: 1px solid #cbd8ca; border-radius: 3px; background: #fffef5; color: #384d43; font: inherit; font-size: 10px; font-weight: 700; }
.pension-name-input { width: 108px; margin-left: 0; padding: 2px 4px; border: 1px solid #d8bfd8; border-radius: 3px; background: #fffaff; color: #58465b; font: inherit; font-size: 10px; font-weight: 700; }
.account-type-select { width: 78px; margin-left: 6px; }
.matrix-account-name { display: inline-block; width: 70px; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.account-owner-select { width: 82px; margin-left: 4px; }
.account-edit-button, .cash-account-selection-button { margin-left: 5px; padding: 2px 5px; border: 1px solid #b6c9b4; border-radius: 3px; background: #f7faf5; color: #536655; font-size: 8px; font-weight: 800; line-height: 1.2; cursor: pointer; }
.account-edit-button:hover, .account-edit-button:focus-visible, .cash-account-selection-button:hover, .cash-account-selection-button:focus-visible { background: #eaf2e7; color: #315b45; outline: none; }
.matrix-header-rate-input { width: 42px; margin-left: 7px; padding: 1px 3px; border: 1px solid #cbd8ca; border-radius: 3px; background: #fffef5; color: #384d43; font: inherit; font-size: 9px; font-weight: 700; text-align: right; }
.comparison-matrix .matrix-data-row th { color: #384d43; }
.comparison-matrix .matrix-data-row td { color: #384d43; }
.comparison-matrix td[data-cell-info-key] { position: relative; }
.comparison-matrix .state-pension-age-cell { background: #9fc5e8; color: #173d5d; font-weight: 800; }
.property-purchase-cost-missing { border-color: #b85450 !important; background: #fce5cd !important; color: #9c0006; }
.property-purchase-cost-missing::placeholder { color: #9c0006; opacity: .85; }
.comparison-matrix .matrix-data-row td:not(.negative) { font-weight: 600; }
.property-value-cell { position: relative; min-height: 18px; }
.property-owner-timeline { display: block; width: max-content; max-width: 100%; overflow: hidden; padding: 1px 3px; border: 1px solid #b48722; border-radius: 3px; background: #e5c95e; color: #604b13; font-size: 8px; font-weight: 700; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.balance-auto-control { display: inline-flex; align-items: center; margin: 2px 0 4px 4px; }
.balance-auto-toggle { display: inline-flex; align-items: center; justify-content: flex-start; gap: 4px; margin: 0; color: #536655; font-size: 10px; font-weight: 750; white-space: nowrap; }
.balance-auto-toggle input[type="checkbox"] { appearance: auto; width: 15px; height: 15px; min-width: 15px; min-height: 15px; margin: 0; padding: 0; accent-color: #4f805f; cursor: pointer; }
.balance-in-progress, .balance-in-progress * { cursor: progress !important; }
.scenario-creation-busy, .scenario-creation-busy * { cursor: progress !important; }
.matrix-new-scenario-button:disabled { cursor: progress; opacity: .65; }
.balance-progress { position: fixed; top: 50%; left: 50%; z-index: 9000; display: inline-flex; align-items: center; gap: 12px; margin: 0; padding: 14px 22px; transform: translate(-50%, -50%); color: #315b45; background: rgb(255 255 255 / 92%); border: 2px solid #b7cbb8; border-radius: 12px; box-shadow: 0 12px 36px rgb(31 50 43 / 20%); font-size: 35px; font-weight: 750; line-height: .95; pointer-events: none; text-transform: lowercase; white-space: nowrap; }
.balance-spinner { display: inline-block; width: 26px; height: 26px; box-sizing: border-box; border: 4px solid #b7cbb8; border-top-color: #315b45; border-radius: 50%; line-height: 0; animation: balance-spin .8s linear infinite; }
@keyframes balance-spin { to { transform: rotate(360deg); } }
.comparison-matrix td.mortgage-overpayment-cell, .comparison-matrix td.mortgage-overpayment-cell input { background: #ff1414 !important; color: #fff !important; border-color: #8a0000 !important; }
.comparison-matrix td.scenario-switch-flash-a, .comparison-matrix td.scenario-switch-flash-a input, .comparison-matrix td.scenario-switch-flash-b, .comparison-matrix td.scenario-switch-flash-b input { animation: scenario-switch-cell-flash 1s ease-out both; }
@keyframes scenario-switch-cell-flash { 0% { background-color: #227a43 !important; color: #fff !important; } 100% { background-color: var(--sheet-fill, #fff) !important; color: inherit !important; } }
.comparison-matrix td.rental-income-host { position: relative; z-index: 100; }
.rental-income-cell { z-index: 101; }
.comparison-matrix tr.rental-popup-row { position: relative; z-index: 2000; }
.comparison-matrix tr.interest-copy-row { position: relative; z-index: 4000; }
.comparison-matrix td.rental-popup-cell { position: relative; z-index: 3000 !important; }
.comparison-matrix td.cell-info-host { position: relative; z-index: 1100; }
.comparison-matrix td.cell-info-trigger-host { position: relative; z-index: 1100; }
.comparison-matrix td.ctrl-info-hovered { position: relative; z-index: 1100; }
/* A calculation render can replace the local hover class while the pointer
   remains still. Keep the cell's own popup above neighbouring input cells
   through the physical hover/focus state as well. */
body.shift-key-held .comparison-matrix td[data-cell-info-key]:hover,
body.ctrl-key-held .comparison-matrix td[data-cell-info-key]:hover,
body.shift-key-held .comparison-matrix td[data-cell-info-key]:has(.cell-action-popup:focus-within) { position: relative; z-index: 1100; opacity: 1; }
.cell-info-trigger { display: none; position: absolute; top: 2px; right: 3px; z-index: 2; width: 15px; height: 15px; padding: 0; border: 0; border-radius: 50%; background: #78a889; color: #fff; font: 700 10px/15px Georgia, serif; cursor: pointer; box-shadow: 0 1px 2px #29493033; }
body.shift-key-held td.ctrl-info-hovered .cell-info-trigger,
body.ctrl-key-held td.ctrl-info-hovered .cell-info-trigger { display: block; }
body.shift-key-held td[data-cell-info-key]:hover .cell-info-trigger,
body.ctrl-key-held td[data-cell-info-key]:hover .cell-info-trigger { display: block; }
body:not(.shift-key-held):not(.ctrl-key-held) .cell-info-trigger { display: none !important; }
.cell-info-trigger:hover, .cell-info-trigger:focus-visible { background: #4f805f; outline: 2px solid #cfe2d0; outline-offset: 1px; }
.undated-date-info-trigger { position: absolute; top: 1px; left: 2px; z-index: 230; display: block; width: 10px; height: 10px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: #bd2626; color: #fff; font: 700 7px/10px Georgia, serif; cursor: pointer; box-shadow: 0 1px 2px #6d151533; text-align: center; }
.undated-date-info-trigger:hover, .undated-date-info-trigger:focus-visible { background: #8f1515; outline: 2px solid #f2b8b8; outline-offset: 1px; }
.undated-date-info-message { width: 100%; max-width: 260px; margin: 2px 0 5px; color: #702020; font-size: 11px; line-height: 1.25; overflow-wrap: anywhere; white-space: normal; }
body:not(.ctrl-shift-key-held):not(.source-trace-pinned) .source-trace-overlay { display: none; }
.source-trace-overlay { position: fixed; inset: 0; z-index: 5000; pointer-events: none; }
.source-trace-overlay svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.source-trace-overlay path { fill: none; stroke: #00a651; stroke-width: 2; stroke-dasharray: 5 4; }
.source-trace-overlay path.source-trace-destination-line { stroke: #f5c400; stroke-width: 2.5; stroke-dasharray: none; }
.source-trace-source { outline: 2px solid #00a651 !important; outline-offset: -2px; box-shadow: inset 0 0 0 2px #c8f3d8; }
.source-trace-destination { outline: 2px solid #f5c400 !important; outline-offset: -2px; box-shadow: inset 0 0 0 2px #fff3a6; }
body.source-trace-active .comparison-matrix tbody tr > th,
body.source-trace-active .comparison-matrix tbody tr > td { opacity: .32; }
body.source-trace-active .comparison-matrix tbody .source-trace-source,
body.source-trace-active .comparison-matrix tbody .source-trace-destination { opacity: 1; }
.source-trace-popup { position: fixed; width: 360px; max-width: calc(100vw - 24px); max-height: 240px; overflow: auto; padding: 9px 11px; border: 1px solid #77a95d; border-radius: 5px; background: #fffff8; color: #315b45; box-shadow: 0 5px 18px #29493055; font-size: 11px; line-height: 1.35; pointer-events: auto; }
.source-trace-popup::before { content: ""; position: absolute; top: 0; bottom: 0; left: -16px; width: 16px; pointer-events: auto; }
.source-trace-cloud { position: fixed; z-index: 5001; display: grid; gap: 2px; width: 240px; padding: 9px 12px; border: 0; border-radius: 18px 18px 18px 5px; background: #f5fbf2; box-shadow: 0 5px 18px #29493033; color: #315b45; font-size: 10px; line-height: 1.25; pointer-events: none; }
.source-trace-cloud::after { content: ""; position: absolute; bottom: -6px; left: 14px; width: 14px; height: 14px; background: #f5fbf2; clip-path: polygon(0 0, 100% 0, 0 100%); }
.source-trace-cloud strong { margin-bottom: 2px; color: #3f8b58; }
.source-trace-cloud span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source-trace-title { display:flex; align-items:center; justify-content:space-between; cursor: move; }
.source-trace-pin { border: 0; background: transparent; color: #3f8b58; cursor: pointer; font-size: 14px; line-height: 1; }
.source-trace-popup strong, .source-trace-popup span { display: block; }
.source-trace-popup span { margin-top: 4px; padding-top: 3px; border-top: 1px solid #e1e9df; }
.source-trace-formula { display: grid; gap: 2px; margin: 5px 0 6px; padding: 5px 7px; border: 1px solid #d6e2d4; border-radius: 3px; background: #f7fbf4; }
.source-trace-formula span { margin: 0; padding: 0; border: 0; color: #536655; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.source-trace-formula code, .calculation-formula code { display: block; overflow-x: auto; color: #315b45; font-family: Georgia, "Times New Roman", serif; font-size: 13px; white-space: normal; overflow-wrap: anywhere; line-height: 1.55; }
.formula-text { font-style: italic; }
.formula-operator { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-style: normal; font-size: .9em; }
.source-trace-grid { display: grid; gap: 0; margin-top: 4px; border: 1px solid #d6e2d4; background: #fffffb; }
.source-trace-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; min-height: 24px; padding: 2px 6px 2px 3px; border-bottom: 1px solid #e1e9df; }
.source-trace-row:last-child { border-bottom: 0; }
.source-trace-row > span { margin: 0; padding: 0; border: 0; white-space: normal; }
.source-trace-value { display: inline-block; font-size: 14px; font-weight: 800; text-align: center; }
.source-trace-op-add { color: #3f8b58; }
.source-trace-op-subtract { color: #b45f06; }
.source-trace-op-multiply { color: #4f6d9c; }
.source-trace-op-destination { color: #d1a900; }
.source-trace-hidden-row { background: #f1f7ef; font-style: italic; }
.source-trace-hidden-header { box-shadow: inset 0 0 0 2px #4e8f5d; }
.source-trace-destination-row { background: #f5eef9; }
.source-trace-destinations-heading { color: #b28e00; }
body.shift-key-held .comparison-matrix tbody tr > th,
body.shift-key-held .comparison-matrix tbody tr > td { opacity: .32; }
body.shift-key-held .comparison-matrix tbody td.ctrl-info-hovered,
body.shift-key-held .comparison-matrix tbody td.cell-operation-source,
body.shift-key-held .comparison-matrix tbody td.source-trace-source,
body.shift-key-held .comparison-matrix tbody td.source-trace-destination { opacity: 1; }
body.shift-key-held .comparison-matrix tbody tr > th,
body.shift-over-row-header .comparison-matrix tbody tr > th,
body.shift-over-row-header .comparison-matrix tbody tr > td { opacity: 1; }
body.shift-key-held .comparison-matrix.scenario-comparison-open tbody tr > th,
body.shift-key-held .comparison-matrix.scenario-comparison-open tbody tr > td,
body.source-trace-active .comparison-matrix.scenario-comparison-open tbody tr > th,
body.source-trace-active .comparison-matrix.scenario-comparison-open tbody tr > td { opacity: 1; }
body.shift-key-held .comparison-matrix.scenario-comparison-open .comparison-alternate-value { display: none; }
body.comparison-alternate-held .comparison-matrix.scenario-comparison-open .comparison-cell-different .comparison-alternate-value { display: flex !important; }
body.comparison-alternate-held .comparison-matrix.scenario-comparison-open .comparison-cell-different > input,
body.comparison-alternate-held .comparison-matrix.scenario-comparison-open .comparison-cell-different .property-value-cell > input { visibility: hidden; }
body.shift-key-held .comparison-matrix.scenario-comparison-open .cell-info-trigger,
body.shift-key-held .comparison-matrix.scenario-comparison-open .cell-operation-marker,
body.shift-key-held .comparison-matrix.scenario-comparison-open .matrix-shift-control-hidden,
body.shift-key-held .comparison-matrix.scenario-comparison-open .fill-right-popup { display: none !important; }
body.shift-key-held .comparison-matrix.scenario-comparison-open td.ctrl-info-hovered .cashflow-paid-date-popup,
body.shift-key-held .comparison-matrix.scenario-comparison-open td[data-cell-info-key]:hover .cashflow-paid-date-popup { display: flex !important; visibility: visible !important; pointer-events: auto !important; }
.comparison-matrix.scenario-comparison-open thead th { z-index: 7000 !important; background: #6fa8dc !important; isolation: isolate; }
.comparison-matrix.scenario-comparison-open thead th:first-child { z-index: 7001 !important; background: #ffe599 !important; }
.forecast-column-subtitle { display: block; margin-top: 2px; color: #244d38; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.comparison-matrix thead th { vertical-align: middle; }
.comparison-matrix thead th:not(:first-child) { padding-top: 10px; padding-bottom: 6px; }
.locked-grid-notice { position: fixed; top: 76px; left: 50%; z-index: 12000; max-width: min(520px, calc(100vw - 32px)); padding: 11px 16px; transform: translateX(-50%); border: 1px solid #a94442; border-radius: 7px; background: #fff1ef; color: #8b2f2c; box-shadow: 0 6px 22px rgb(88 35 31 / 24%); font-size: 13px; font-weight: 750; line-height: 1.35; text-align: center; pointer-events: none; }
.locked-grid-padlock-flash { animation: locked-grid-padlock-flash 2s ease-in-out; }
@keyframes locked-grid-padlock-flash { 0%, 100% { color: inherit; box-shadow: none; } 12%, 36%, 60%, 84% { color: #fff; background: #b63832; box-shadow: 0 0 0 3px #f4aaa5, 0 0 18px #b63832; } }
.cell-range-selected { outline: 2px solid #4f8b5d !important; outline-offset: -2px; background-color: #e5f1df !important; }
.cell-selection-sum-popup { position: fixed; z-index: 5100; pointer-events: none; padding: 6px 9px; border: 1px solid #4f8b5d; border-radius: 4px; background: #f7fff3; color: #315b45; box-shadow: 0 3px 12px #29493033; font-size: 11px; font-weight: 750; white-space: nowrap; }
.grid-column-header-selected { background-color: #6aa2d2 !important; color: #173d5d !important; box-shadow: inset 2px 0 #6b9272, inset -2px 0 #6b9272; }
.comparison-matrix td.grid-column-selected { position: relative; background-color: var(--sheet-fill) !important; background-image: linear-gradient(rgb(47 91 57 / 6%), rgb(47 91 57 / 6%)) !important; box-shadow: inset 2px 0 #6b9272, inset -2px 0 #6b9272 !important; z-index: 1; }
.cell-comment-marker { position: absolute; top: 1px; left: 2px; z-index: 110; color: #2f8b4a; font-size: 7px; font-weight: 900; line-height: 1; cursor: help; }
.cell-comment-action { position: absolute; top: 2px; left: calc(100% + 2px); z-index: 3000; display: none; padding: 3px 6px; border: 1px solid #b7cbb8; border-radius: 3px; background: #fff; color: #315b45; font-size: 9px; font-weight: 800; white-space: nowrap; }
body.shift-key-held .cell-comment-action { display: block; }
.grid-comment-target { display: none; }
.grid-comment-action-global { position: absolute; top: 6px; right: 8px; left: auto; z-index: 8000; }
.cell-comment-tooltip { position: fixed; z-index: 5200; max-width: 260px; padding: 6px 8px; border: 1px solid #9abf9b; border-radius: 4px; background: #fffffb; color: #315b45; box-shadow: 0 3px 12px #29493033; font-size: 10px; line-height: 1.3; pointer-events: none; }
.snapshot-delete-button { width: 26px; height: 26px; padding: 0; border: 1px solid #c8d5c7; border-radius: 4px; background: #fff; color: #8d3c36; font-size: 13px; line-height: 1; }
.snapshot-delete-button:disabled { color: #aeb8ad; opacity: .55; }
@keyframes dependency-value-flash { 0% { background-color: #65f276 !important; } 100% { background-color: var(--sheet-fill) !important; } }
.dependency-value-flash { animation: dependency-value-flash .4s ease-out; }
.cell-operation-marker { display: none; position: absolute; left: 2px; top: 50%; z-index: 6; transform: translateY(-50%); color: #00a651; font-size: 12px; font-weight: 800; line-height: 1; pointer-events: none; }
body.shift-key-held td.cell-operation-source .cell-operation-marker { display: block; }
body.shift-key-held td.cell-operation-source { outline: 2px solid #00a651 !important; outline-offset: -2px; box-shadow: inset 0 0 0 2px #c8f3d8; }
body.shift-key-held td.cell-operation-source > input.grid-value-override-input,
body.shift-key-held td.cell-operation-source > input.gross-rent-override-input,
body.shift-key-held td.cell-operation-source > input.mortgage-payment-input { outline: 2px solid #00a651; outline-offset: -2px; padding-left: 16px; }
body.shift-key-held td.cell-operation-source.cell-operation-calculated .cell-operation-marker { color: #1976d2; }
.year-ahead-history-toggle { display: inline-flex; align-items: center; gap: 4px; color: #536655; font-size: 10px; font-weight: 650; }
.year-ahead-tax-year-select { margin-left: 6px; padding: 3px 5px; border: 1px solid #cbd8ca; border-radius: 3px; background: #fff; color: #536655; font: inherit; font-size: 10px; font-weight: 700; }
.year-ahead-tax-year-select.year-ahead-tax-year-changing { cursor: progress; }
.negative-balance-warning { margin: 0 0 10px; color: #b01818; font-size: 12px; font-weight: 800; }
.year-ahead-next-entry > * { background: #e7f4df !important; }
.cell-info-popup { position: absolute; top: calc(100% + 6px); left: 0; z-index: 1200; width: 360px; max-width: calc(100vw - 24px); max-height: 360px; overflow: auto; padding: 12px 14px; border: 1px solid #aebcaf; border-radius: 5px; background: #fff; box-shadow: 0 5px 16px #29493033; color: #384d43; text-align: left; font-size: 11px; line-height: 1.4; pointer-events: auto; }
.cell-info-popup strong, .cell-info-popup span { display: block; }
.cell-info-popup span { margin-top: 2px; color: #6d766d; font-weight: 700; }
.cell-info-popup p { margin: 5px 0 0; }
.cell-info-sources-heading { margin-top: 10px; padding-top: 8px; border-top: 1px solid #e1e9df; color: #536655; }
.cell-info-sources { display: grid; gap: 3px; margin: 5px 0 0; padding: 0; list-style: none; }
.cell-info-sources li { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; border-bottom: 1px dotted #dce5da; }
.cell-info-sources li span { margin: 0; color: #536655; font-weight: 500; }
.cell-info-sources li b { color: #315b45; font-weight: 750; text-align: right; }
.cell-action-popup { position: absolute; top: calc(100% + 1px); left: 0; z-index: 1300; display: flex; flex-direction: column; gap: 4px; width: 165px; padding: 7px 8px; border: 1px solid #aebcaf; border-radius: 4px; background: #fff; box-shadow: 0 5px 16px #29493033; color: #384d43; text-align: left; font-size: 10px; line-height: 1.25; }
.cell-action-popup strong, .cell-action-popup span { display: block; }
.cell-action-popup span { color: #6d766d; font-weight: 700; }
.cell-action-popup button { padding: 4px 6px; border: 1px solid #cbd8ca; border-radius: 3px; background: #f7faf5; color: #536655; font-size: 9px; font-weight: 700; }
.cell-action-popup button:hover, .cell-action-popup button:focus-visible { background: #eaf2e7; color: #315b45; }
.property-sold-label { color: #8b4c32; font-size: 9px; font-weight: 750; letter-spacing: .04em; }
.property-sold-cell { min-height: 18px; padding: 2px 4px; background: #d9ead3; color: #1f5b35; overflow: visible; }
.property-sold-cell .property-sold-label { position: absolute; top: 12px; left: -4px; z-index: 2; padding: 1px 4px; border: 1px solid #2f75b5; background: rgb(217 234 247 / 80%); color: #1f4e79; font-size: 7px; line-height: 1; transform: rotate(-45deg); transform-origin: top left; pointer-events: none; }
.property-sold-value { display: block; color: #1f5b35; font-weight: 800; text-align: right; }
/* Overrides affect calculation, but are not visually distinguished from the
   semantic row fill.  Keep the class for diagnostics and future behaviour. */
.comparison-matrix td.forecast-value-overridden { background: var(--sheet-fill) !important; }
.property-action-menu { position: absolute; top: 50%; left: calc(100% - 2px); z-index: 3000; display: none; transform: translateY(-50%); align-items: center; gap: 3px; padding: 4px; border: 1px solid #d7e1d5; border-radius: 5px; background: #fff; box-shadow: 0 4px 12px #29493026; white-space: nowrap; pointer-events: auto; }
.property-action-menu::before { content: ""; position: absolute; top: 0; bottom: 0; left: -6px; width: 6px; }
.gross-rent-rate-editor label { display: flex; align-items: center; gap: 6px; }
.gross-rent-rate-editor .gross-rent-override-input { width: 100px; min-height: 24px; }
.property-value-cell:hover .property-action-menu.shift-actions-visible, .property-value-cell:focus-within .property-action-menu.shift-actions-visible { display: flex; }
body.shift-key-held .property-value-cell:hover .property-action-menu.shift-actions-local, body.shift-key-held .property-value-cell:focus-within .property-action-menu.shift-actions-local { display: flex; }
.rental-transfer-menu { top: calc(100% + 1px); left: 50%; flex-direction: column; transform: translateX(-50%); align-items: stretch; min-width: 150px; }
.rental-transfer-menu.shift-actions-visible { display: flex; }
.rental-transfer-menu.shift-actions-visible { pointer-events: auto; }
body.shift-key-held .rental-income-cell:hover .rental-transfer-menu.shift-actions-local { display: flex; pointer-events: auto; }
.property-action-menu button { padding: 3px 6px; border: 1px solid #cbd8ca; border-radius: 3px; background: #f7faf5; color: #536655; font-size: 9px; font-weight: 700; }
.property-action-menu button:hover, .property-action-menu button:focus-visible { background: #eaf2e7; color: #315b45; }
.property-sale-value-input { width: 82px; padding: 3px 4px; border: 1px solid #cbd8ca; border-radius: 3px; font-size: 10px; }
.property-full-cell-edit { position: absolute; inset: 0; z-index: 1; min-height: 100%; border-color: #8b4c32; }
.property-sold-cell .property-sold-label { z-index: 2; }
.pension-payment-date-label { position: absolute; top: 12px; left: -4px; z-index: 220; padding: 1px 4px; border: 1px solid #2f75b5; background: rgb(217 234 247 / 80%); color: #1f4e79; font-size: 7px; font-weight: 750; line-height: 1; white-space: nowrap; transform: rotate(-30deg); transform-origin: top left; pointer-events: none; }
.cashflow-received-date-label { position: absolute; top: 12px; left: -4px; z-index: 220; padding: 1px 4px; border: 1px solid #2f75b5; background: rgb(217 234 247 / 80%); color: #1f4e79; font-size: 7px; font-weight: 750; line-height: 1; white-space: nowrap; transform: rotate(-30deg); transform-origin: top left; pointer-events: none; }
.cashflow-paid-date-label { position: absolute; top: 12px; left: -4px; z-index: 220; padding: 1px 4px; border: 1px solid #a64d79; background: rgb(244 204 204 / 80%); color: #7a284e; font-size: 7px; font-weight: 750; line-height: 1; white-space: nowrap; transform: rotate(-30deg); transform-origin: top left; pointer-events: none; transition: opacity .12s ease; }
.comparison-matrix td:has(> .cashflow-paid-date-label):hover .cashflow-paid-date-label { opacity: 0; }
.pension-date-action-popup, .mortgage-date-action-popup { width: 185px; }
.payment-date-recalculation-spinner { display: inline-block; width: 14px; height: 14px; margin: 2px 0 4px; border: 2px solid #cbd8ca; border-top-color: #315b45; border-radius: 50%; animation: balance-spin .7s linear infinite; vertical-align: middle; }
.pension-date-action-popup label, .mortgage-date-action-popup label { display: flex; flex-direction: column; gap: 3px; color: #536655; font-size: 9px; font-weight: 750; }
.pension-date-action-popup input, .mortgage-date-action-popup input { width: 136px; box-sizing: border-box; padding: 3px; border: 1px solid #cbd8ca; border-radius: 3px; color: #384d43; font: inherit; font-size: 10px; }
.pension-date-action-popup button, .mortgage-date-action-popup button { align-self: flex-start; }
.property-header-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; width: calc(100% - 3px); max-width: calc(100% - 3px); min-width: 0; box-sizing: border-box; margin: 2px 0 0 3px; vertical-align: middle; white-space: normal; }
.property-owner-summary { max-width: 92px; margin-left: 0; overflow: hidden; color: #536655; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.property-redistribute-button { flex: 0 0 auto; margin-left: 0; padding: 1px 4px; border: 1px solid #cbd8ca; border-radius: 3px; background: #f7faf5; color: #536655; font-size: 8px; font-weight: 700; }
.gross-rent-override-input, .mortgage-payment-input, .grid-value-override-input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 100%; padding: 2px 3px; border: 1px solid #cbd8ca; border-radius: 0; background: #fff; color: #384d43; font-size: 10px; line-height: 1.1; text-align: right; }
.comparison-matrix td:has(> .gross-rent-override-input),
.comparison-matrix td:has(> .mortgage-payment-input),
.comparison-matrix td:has(> .grid-value-override-input),
.comparison-matrix td:has(> .property-value-cell > .grid-value-override-input) { position: relative; padding: 0; background-color: var(--sheet-fill); }
.comparison-matrix td:has(> .property-value-cell > .grid-value-override-input) > .property-value-cell { min-height: 100%; }
.comparison-matrix td:has(> .gross-rent-override-input) > input,
.comparison-matrix td:has(> .mortgage-payment-input) > input,
.comparison-matrix td:has(> .grid-value-override-input) > input,
.comparison-matrix td:has(> .property-value-cell > .grid-value-override-input) .property-value-cell { position: absolute; inset: 0; width: 100%; height: 100%; }
.comparison-matrix td:has(> .property-value-cell > .grid-value-override-input) .property-value-cell { min-height: 0; }
.comparison-matrix td:has(> .property-value-cell > .grid-value-override-input) .property-value-cell > input { position: absolute; inset: 0; width: 100%; height: 100%; }
.comparison-matrix td:has(> .gross-rent-override-input:focus) > input,
.comparison-matrix td:has(> .mortgage-payment-input:focus) > input,
.comparison-matrix td:has(> .grid-value-override-input:focus) > input,
.comparison-matrix td:has(> .property-value-cell > .grid-value-override-input:focus) .property-value-cell > input { border: 1px solid #bd791d; outline: none; }
.comparison-matrix .gross-rent-override-input:focus,
.comparison-matrix .mortgage-payment-input:focus,
.comparison-matrix .grid-value-override-input:focus { border: 1px solid #bd791d; outline: none; }
.calculation-modal-explanation { margin: 0 0 6px; }
.calculation-modal-explanation p { margin: 3px 0; }
.calculation-formula { display: grid; gap: 6px; min-height: 76px; margin: 6px 0 8px; padding: 10px 12px; border: 1px solid #d6e2d4; border-radius: 4px; background: #f7fbf4; align-content: start; }
.calculation-formula span { color: #536655; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.calculation-formula code { min-height: 42px; padding: 8px; border: 1px solid #e1e9df; border-radius: 3px; background: #fff; white-space: normal; overflow-wrap: anywhere; line-height: 1.65; }
.calculation-operator { display: inline-block; min-width: 18px; color: #536655; font-weight: 800; text-align: center; }
.mortgage-property-select { margin-left: 8px; width: 92px; }
.matrix-account-route-select { width: 104px; margin-left: 6px; font-size: 9px; }
.comparison-matrix th, .comparison-matrix td { padding: 8px 4px; }
.comparison-matrix .matrix-account-section > th:first-child { position: relative; overflow: hidden; }
.comparison-matrix .matrix-account-section > th:first-child .matrix-delete-button { position: absolute; right: 3px; margin-left: 0; }
.mortgage-type-toggle { margin-left: 5px; padding: 2px 4px; border: 1px solid #d6c56e; border-radius: 3px; background: #fff8d6; color: #715f1a; font-size: 8px; font-weight: 800; line-height: 1; cursor: pointer; }
.mortgage-type-toggle:hover, .mortgage-type-toggle:focus-visible { background: #ffef9f; outline: none; }
.mortgage-relief-edit-button { margin-left: 5px; padding: 2px 5px; border: 1px solid #9abf9b; border-radius: 3px; background: #f0faef; color: #315b45; font-size: 8px; font-weight: 800; line-height: 1; cursor: pointer; }
.mortgage-relief-edit-button:hover, .mortgage-relief-edit-button:focus-visible { background: #d9efd7; outline: none; }
.mortgage-edit-button, .property-edit-button { margin-left: 6px; padding: 2px 5px; border: 1px solid #b6c9b4; border-radius: 3px; background: #f7faf5; color: #536655; font-size: 8px; font-weight: 800; line-height: 1.2; cursor: pointer; }
.mortgage-edit-button:hover, .mortgage-edit-button:focus-visible, .property-edit-button:hover, .property-edit-button:focus-visible { background: #eaf2e7; color: #315b45; outline: none; }
.property-editor-modal, .mortgage-editor-modal { max-width: 430px; }
.property-editor-modal .primary-button { width: 100%; margin-top: 16px; }
.property-editor-owners { padding: 10px; border-radius: 6px; background: #f3f8f0; color: #536655; font-size: 12px; }
.mortgage-editor-modal select { width: 100%; padding: 10px; border: 1px solid #d6dfd5; border-radius: 6px; background: #fff; color: #273e30; font: inherit; }
.account-editor-modal, .cash-account-selection-modal { max-width: 480px; }
.account-editor-modal label, .cash-account-selection-modal label { display: block; margin-top: 10px; color: #536655; font-size: 11px; font-weight: 700; }
.account-editor-modal input, .account-editor-modal select { box-sizing: border-box; width: 100%; margin-top: 4px; padding: 8px; border: 1px solid #d6dfd5; border-radius: 6px; background: #fff; color: #273e30; font: inherit; }
.cash-account-allocation-row { display: grid; grid-template-columns: minmax(0, 1fr) 86px 16px; align-items: center; gap: 7px; margin-top: 10px; }
.cash-account-allocation-row label { display: flex; align-items: center; gap: 5px; margin: 0; }
.cash-account-allocation-row input[type="number"] { width: 86px; padding: 7px; border: 1px solid #d6dfd5; border-radius: 5px; font: inherit; text-align: right; }
.comparison-matrix .matrix-section .sheet-row-number { margin-left: 0; }
.comparison-matrix .matrix-group-header .matrix-label { border-bottom: 0; font-weight: 750; }
.comparison-matrix .matrix-detail-single > th:first-child::after { content: none; }
.comparison-matrix .matrix-detail-single > th, .comparison-matrix .matrix-detail-single > td { border-bottom: 0; }
.comparison-matrix .matrix-detail-row > th:first-child {
    position: sticky;
    border-left: 0;
    background-color: var(--sheet-fill);
    background-image: linear-gradient(90deg, #fff 0 var(--matrix-detail-fill-start), var(--sheet-fill) var(--matrix-detail-fill-start) 100%);
}
.comparison-matrix .matrix-detail-row > th:first-child::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--matrix-detail-fill-start);
    border-left: 1px solid #aebcaf;
    pointer-events: none;
}
.comparison-matrix .matrix-detail-start > th:first-child { border-top: 0; }
.comparison-matrix .matrix-detail-start > th:first-child::after { content: none; }
.comparison-matrix .matrix-detail-end > th:first-child { border-bottom: 0; }
.comparison-matrix .matrix-detail-end > th:first-child::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: var(--matrix-detail-fill-start);
    border-bottom: 1px solid #aebcaf;
    pointer-events: none;
}
.comparison-matrix .matrix-detail-row > td:last-child { border-right: 1px solid #aebcaf; }
.comparison-matrix .matrix-detail-start > th, .comparison-matrix .matrix-detail-start > td { border-top: 0; }
.comparison-matrix .matrix-detail-end > th, .comparison-matrix .matrix-detail-end > td { border-bottom: 1px solid #aebcaf; }
.comparison-matrix .matrix-section.matrix-child-section > th:first-child {
    position: relative;
    background: linear-gradient(90deg, #fff 0 var(--matrix-child-fill-start), var(--sheet-fill) var(--matrix-child-fill-start) 100%);
}
.comparison-matrix .matrix-section.matrix-child-section > th:first-child::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--matrix-child-fill-start);
    border-left: 1px solid #aebcaf;
    pointer-events: none;
}
.comparison-matrix .matrix-section.matrix-child-section > th:first-child::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: var(--matrix-child-fill-start);
    border-bottom: 1px solid #aebcaf;
    pointer-events: none;
}
.comparison-matrix tr.matrix-indent-level-0 > th:first-child { padding-left: 15px; }
.comparison-matrix tr.matrix-indent-level-1 > th:first-child { padding-left: 42px; }
.comparison-matrix tr.matrix-indent-level-2 > th:first-child { padding-left: 62px; }
.comparison-matrix tr.matrix-indent-level-3 > th:first-child { padding-left: 82px; }
.comparison-matrix tr.matrix-indent-level-4 > th:first-child { padding-left: 102px; }
.comparison-matrix tr.matrix-indent-level-5 > th:first-child { padding-left: 122px; }
.comparison-matrix tr.matrix-indent-level-6 > th:first-child { padding-left: 142px; }
.comparison-matrix tr.matrix-indent-level-1.matrix-detail-row > th:first-child::before,
.comparison-matrix tr.matrix-indent-level-1.matrix-detail-row > th:first-child::after { left: 34px; }
.comparison-matrix tr.matrix-indent-level-2.matrix-detail-row > th:first-child::before,
.comparison-matrix tr.matrix-indent-level-2.matrix-detail-row > th:first-child::after { left: 54px; }
.comparison-matrix tr.matrix-indent-level-3.matrix-detail-row > th:first-child::before,
.comparison-matrix tr.matrix-indent-level-3.matrix-detail-row > th:first-child::after { left: 74px; }
.comparison-matrix tr.matrix-indent-level-4.matrix-detail-row > th:first-child::before,
.comparison-matrix tr.matrix-indent-level-4.matrix-detail-row > th:first-child::after { left: 94px; }
.comparison-matrix tr.matrix-indent-level-5.matrix-detail-row > th:first-child::before,
.comparison-matrix tr.matrix-indent-level-5.matrix-detail-row > th:first-child::after { left: 114px; }
.comparison-matrix tr.matrix-indent-level-6.matrix-detail-row > th:first-child::before,
.comparison-matrix tr.matrix-indent-level-6.matrix-detail-row > th:first-child::after { left: 134px; }

/* Child-section boxes always close from their guide line to the right edge.
   Keep this logical-class rule after semantic row rules so a section such as
   Inheritance cannot fall back to a short detail-end segment. */
.comparison-matrix .matrix-section.matrix-child-section > th:first-child::after {
    left: var(--matrix-child-fill-start) !important;
    right: 0 !important;
    width: auto !important;
}

.comparison-matrix .matrix-detail-indent-drop > th:first-child {
    background-color: var(--sheet-fill) !important;
    background-image: linear-gradient(90deg, #fff 0 var(--detail-start-left), var(--sheet-fill) var(--detail-start-left) 100%) !important;
}
.comparison-matrix .matrix-indent-transition-connector {
    position: absolute;
    top: 0;
    left: var(--detail-start-left);
    width: var(--detail-start-width);
    height: 1px;
    background: #aebcaf;
    pointer-events: none;
}
.comparison-matrix thead th:first-child,
.comparison-matrix tbody th:first-child { position: sticky; left: 0; isolation: isolate; background-clip: padding-box; overflow: hidden; border-right: 2px solid #8cae8f !important; }
.comparison-matrix thead th:first-child { border-right: 2px solid #8cae8f !important; }
.comparison-matrix thead th:first-child { z-index: 6600 !important; }
.comparison-matrix tbody th:first-child { position: sticky !important; left: 0; z-index: 5000; }
.sheet-row-number { display: inline-block; min-width: 29px; margin-right: 8px; color: #6d766d; font-size: 9px; font-weight: 700; }
.comparison-matrix .matrix-section .sheet-row-number { color: #5a4b5e; }
.comparison-matrix .matrix-data-row:hover th,
.comparison-matrix .matrix-data-row:hover td { filter: brightness(.97); }
.property-sale-toggle { min-width: 42px; padding: 3px 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: inherit; font: inherit; font-weight: inherit; }
.property-sale-toggle.available { cursor: pointer; }
.property-sale-toggle.available:hover, .property-sale-toggle.available:focus-visible { border-color: #b48722; background: #ffe599; color: #604b13; outline: none; }
.property-sale-toggle.locked { cursor: not-allowed; opacity: .8; }
.comparison-matrix td.negative { color: #9b322c !important; }
.comparison-matrix td.editable-outlier-cell { background-image: linear-gradient(rgb(92 76 24 / 10%), rgb(92 76 24 / 10%)); }
.forecast-tabs { position: relative; z-index: 2; display: flex; gap: 4px; border-bottom: 1px solid #dce5da; }
.forecast-tab-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; padding-left: 12px; }
.scenario-recalculation-progress { display: inline-flex; align-items: center; gap: 7px; min-width: 176px; color: #536655; font-size: 10px; font-weight: 650; white-space: nowrap; }
.scenario-recalculation-progress progress { width: 76px; height: 6px; accent-color: #497351; }
.forecast-tab { border: 1px solid #dce5da; border-bottom: 0; border-radius: 8px 8px 0 0; padding: 12px 18px; background: #f1f5ee; color: #5e7060; font-size: 12px; font-weight: 650; }
.forecast-tab-link { display: inline-flex; align-items: center; text-decoration: none; }
.forecast-tab:hover, .forecast-tab.selected { background: #315b45; color: #fff; }
.forecast-tab.selected { box-shadow: inset 0 -3px 0 #ffe599; }
.forecast-tabs + .comparison-panel, .forecast-tabs + .living-costs-panel, .forecast-tabs + .university-costs-panel, .forecast-tabs + .about-you-panel { border-top-left-radius: 0; }
.inflation-curve-panel { padding: 24px; }
.inflation-curve-table { width: auto; min-width: 420px; border-collapse: collapse; }
.inflation-curve-table th, .inflation-curve-table td { padding: 6px 10px; border-bottom: 1px solid #e1e9df; text-align: left; }
.inflation-curve-table thead th { background: #f7f9f4; color: #536655; font-size: 11px; }
.inflation-curve-table input { width: 82px; padding: 3px 5px; border: 1px solid #cbd8ca; border-radius: 3px; text-align: right; }
.market-data-usage { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 16px; padding: 10px 12px; border: 1px solid #dce5da; border-radius: 6px; background: #f7f9f4; color: #536655; font-size: 12px; }
.market-data-usage ul { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding-left: 20px; }
.market-data-usage li { margin: 0; }
.market-data-comparison { margin: 14px 0 18px; padding: 12px; border: 1px solid #dce5da; border-radius: 7px; background: #fbfdf9; }
.market-data-comparison-heading { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; margin-bottom: 8px; font-size: 12px; }
.market-data-history-toggle { margin-left: auto; }
.market-data-comparison-table, .admin-market-data-comparison-table { border-collapse: collapse; min-width: 860px; width: auto; }
.market-data-comparison-table th, .market-data-comparison-table td, .admin-market-data-comparison-table th, .admin-market-data-comparison-table td { padding: 5px 9px; border-bottom: 1px solid #e1e9df; text-align: right; white-space: nowrap; }
.market-data-comparison-table th:first-child, .admin-market-data-comparison-table th:first-child { text-align: left; }
.market-data-comparison-table thead th, .admin-market-data-comparison-table thead th { background: #f0f6ed; color: #536655; font-size: 11px; }
.market-data-new-value { background: #d9f2d4 !important; color: #174f2b; font-weight: 750; }
.market-data-graph { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e1e9df; }
.market-data-graph-heading { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; margin-bottom: 4px; font-size: 12px; }
.market-data-graph-svg { display: block; width: 100%; min-width: 620px; height: 250px; overflow: visible; }
.market-data-graph-axis { stroke: #789378; stroke-width: 1.2; }
.market-data-graph-gridline { stroke: #91a891; stroke-width: 1; stroke-opacity: .65; pointer-events: none; }
.market-data-y-label { font-variant-numeric: tabular-nums; }
.market-data-graph-previous, .market-data-graph-new { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.market-data-graph-previous { stroke: #9a6c86; stroke-dasharray: 6 4; }
.market-data-graph-new { stroke: #315b45; }
.market-data-today-line { stroke: #4d965f; stroke-width: 1.5; stroke-dasharray: 4 3; }
.market-data-today-label { fill: #4d965f; font-size: 11px; font-weight: 700; text-anchor: middle; }
.market-data-graph-label { fill: #536655; font-size: 10px; }
.market-data-graph-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #536655; font-size: 11px; }
.market-data-legend-item::before { content: ''; display: inline-block; width: 22px; margin: 0 6px 3px 0; border-top: 2px solid currentColor; vertical-align: middle; }
.market-data-legend-item.previous { color: #9a6c86; }
.market-data-legend-item.previous::before { border-top-style: dashed; }
.market-data-legend-item.new { color: #315b45; }
.market-data-legend-item.today { color: #4d965f; }
.market-data-legend-item.today::before { border-top-style: dashed; }
.market-data-curve-comparison { margin: 10px 0; border: 1px solid #dce5da; border-radius: 6px; background: #fbfdf9; }
.market-data-curve-comparison summary { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; cursor: pointer; padding: 10px 12px; color: #315b45; }
.market-data-curve-comparison .table-scroll { max-height: 280px; margin: 0 12px 12px; }
.admin-market-data-comparison-table { min-width: 620px; }
.living-costs-panel { padding: 24px; }
.living-costs-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr); gap: 18px; align-items: stretch; min-height: 0; overflow: hidden; }
.living-costs-layout .living-costs-panel { min-width: 0; min-height: 0; height: 100%; overflow-x: hidden; overflow-y: auto; }
.living-costs-panel .table-scroll { overflow-x: auto; }
.forecast-tab-control-maximized > [role="tabpanel"]:not(.comparison-panel) { min-height: 0 !important; height: auto; overflow-x: hidden; overflow-y: auto !important; }
.forecast-tab-control-maximized > .living-costs-layout { flex: 1 1 auto; min-height: 0; height: auto; overflow: hidden; }
.forecast-tab-control-maximized .living-costs-layout .living-costs-panel { min-height: 0; height: 100%; overflow-x: hidden; overflow-y: auto; }
.living-costs-year-ahead { display: flex; min-width: 0; min-height: 0; height: 100%; padding: 20px; position: relative; flex-direction: column; overflow: hidden; }
.living-costs-year-ahead .panel-heading { margin-bottom: 12px; }
.living-costs-year-ahead .table-scroll { flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.living-cost-expired-toggle { display: inline-flex; align-items: center; gap: 5px; color: #536655; font-size: 10px; font-weight: 700; white-space: nowrap; }
.living-cost-expired-toggle input { width: auto; }
.living-costs-panel .panel-heading { margin-bottom: 12px; flex-wrap: wrap; min-width: 0; }
.living-costs-panel .page-history-controls { flex: 0 1 auto; flex-wrap: wrap; max-width: 100%; }
.living-cost-add { width: auto; margin: 0; padding: 9px 13px; }
.living-cost-search { display: grid; grid-template-columns: auto minmax(260px, 520px) auto; align-items: center; gap: 10px; margin: 0 0 12px; }
.living-cost-search label { margin: 0; font-size: 11px; }
.living-cost-search input { padding: 7px 9px; font-size: 12px; }
.living-cost-category-tabs { display: flex; gap: 4px; margin-top: 18px; border-bottom: 1px solid #dfe7dc; }
.living-cost-category-tab { border: 1px solid #dfe7dc; border-bottom: 0; border-radius: 7px 7px 0 0; padding: 9px 14px; background: #f1f5ee; color: #5e7060; font-size: 12px; font-weight: 650; }
.living-cost-category-tab:hover, .living-cost-category-tab.selected { background: #315b45; color: #fff; }
.living-cost-category-tab.selected { box-shadow: inset 0 -3px 0 #ffe599; }
.living-cost-section { min-width: 0; margin-top: 12px; border: 1px solid #dfe7dc; border-radius: 7px; overflow: hidden; background: #fbfdf9; }
.living-cost-heading { display: block; padding: 8px 12px; background: #e2f0d9; }
.living-cost-heading-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.living-cost-heading h3 { margin: 0 0 3px; color: #315b45; font-size: 14px; }
.living-cost-heading .field-help { margin: 0; }
.living-cost-heading-actions { display: flex; align-items: center; gap: 10px; }
.living-cost-search-inline { display: inline-flex; flex: 0 1 360px; flex-wrap: wrap; min-width: 0; max-width: 100%; align-items: center; gap: 6px; margin: 0; }
.living-cost-search-inline label { margin: 0; font-size: 11px; }
.living-cost-search-inline input { flex: 1 1 120px; width: 260px; min-width: 0; max-width: 100%; padding: 6px 8px; font-size: 11px; }
.living-cost-column-title { font-size: 14px; font-weight: 750; cursor: help; }
.living-cost-heading-totals { display: grid; gap: 3px; min-width: 0; }
.living-cost-heading-top + .living-cost-heading-totals { margin-top: 7px; padding-top: 6px; border-top: 1px solid rgb(49 91 69 / 18%); }
.living-cost-heading-totals > div { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.living-cost-heading-totals > div > span { min-width: 105px; color: #758077; font-size: 10px; font-weight: 700; }
.living-cost-heading strong { color: #315b45; font-size: 12px; white-space: nowrap; }
.living-cost-heading strong small { color: #758077; font-size: 9px; font-weight: 500; }
.living-cost-subsection { border-top: 1px solid #e8eee5; }
.living-cost-subheading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; padding: 5px 10px 4px; background: #f7faf5; }
.living-cost-subheading > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.living-cost-subheading h4 { margin: 0; color: #48614d; font-size: 12px; }
.living-cost-subheading .field-help { margin: 0; }
.living-cost-table { display: block; width: 100%; max-width: 100%; min-width: 600px; border-collapse: collapse; table-layout: fixed; }
.living-cost-table thead, .living-cost-table tbody { display: block; }
/* Reserve the complete draft-action footprint in headers and every row. */
.living-cost-table tr { display: grid; grid-template-columns: minmax(62px, 1.4fr) minmax(86px, 1.3fr) minmax(82px, 1fr) minmax(82px, 1fr) repeat(4, minmax(40px, .75fr)) 120px; align-items: center; }
.living-cost-table-monthly tr { grid-template-columns: minmax(62px, 1.4fr) 72px minmax(82px, 1fr) minmax(82px, 1fr) repeat(4, minmax(40px, .75fr)) 120px; }
.living-cost-table-bespoke tr { grid-template-columns: minmax(62px, 1.4fr) minmax(86px, 1.3fr) minmax(82px, 1fr) minmax(82px, 1fr) repeat(3, minmax(40px, .75fr)) 120px; }
.living-cost-table tr > * { min-width: 0; }
.living-cost-table th, .living-cost-table td { height: 27px; padding: 1px 5px; border-bottom: 1px solid #e8eee5; text-align: left; vertical-align: middle; line-height: 1; }
.living-cost-table thead th { position: relative; padding: 2px 5px; color: #6c7d63; background: #f7faf5; font-size: 9px; font-weight: 750; }
.living-cost-sort-heading { display: inline-flex; width: 100%; max-width: 100%; align-items: center; gap: 4px; min-width: 0; }
.living-cost-sort-heading > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.living-cost-header-label { display: inline-block; line-height: 1.05; white-space: pre-line; }
.living-cost-sort-buttons { display: inline-flex; flex-direction: column; flex: 0 0 auto; gap: 0; }
.living-cost-sort-button { display: inline-flex; width: 13px; height: 9px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #83907e; font-size: 8px; font-weight: 850; line-height: .8; }
.living-cost-sort-button:hover, .living-cost-sort-button:focus-visible, .living-cost-sort-button[aria-pressed="true"] { background: #dcebd9; color: #315b45; outline: none; }
.living-cost-table .living-cost-sort-buttons { display: none; }
.living-cost-table thead th:nth-child(2) > span { display: inline-block; margin-right: 0; }
.living-cost-table thead th:nth-child(1) { width: auto; }
.living-cost-table thead th:nth-child(2) { width: auto; }
.living-cost-table thead th:nth-child(3), .living-cost-table thead th:nth-child(4) { width: auto; }
.living-cost-table thead th:nth-child(5), .living-cost-table thead th:nth-child(6) { width: auto; }
.living-cost-table thead th:nth-child(7) { width: auto; }
.living-cost-table-monthly thead th:nth-child(2) { white-space: normal; line-height: .9; }
.living-cost-table tbody th { color: #384d43; font-size: 11px; font-weight: 600; }
.living-cost-table tbody td { color: #536655; font-size: 11px; }
.living-cost-table tbody tr:last-child th, .living-cost-table tbody tr:last-child td { border-bottom: 0; }
.living-cost-table input, .living-cost-table select { box-sizing: border-box; width: 100%; min-width: 0; height: 21px; min-height: 21px; padding: 2px 4px; border: 1px solid #d6dfd5; border-radius: 3px; background: #fff; color: #384d43; font-size: 11px; line-height: 1.2; vertical-align: middle; }
.living-cost-table select { font-size: 11px; }
.living-cost-number { text-align: right !important; }
.living-cost-table input[type="number"] { text-align: right; }
.living-cost-date-fields { display: grid; grid-template-columns: minmax(34px, 0.7fr) minmax(48px, 1.3fr); gap: 3px; min-width: 0; }
.living-cost-date-fields input[type="number"] { appearance: textfield; padding-left: 2px; padding-right: 2px; }
.living-cost-date-fields input[type="number"]::-webkit-inner-spin-button, .living-cost-date-fields input[type="number"]::-webkit-outer-spin-button { appearance: none; margin: 0; }
.living-cost-date-control { display: grid; gap: 3px; min-width: 0; }
.living-cost-date-control span { color: #6c7d63; font-size: 9px; font-weight: 750; line-height: 1; }
.living-cost-table td:nth-child(2) { padding-right: 12px; }
.living-cost-table td:nth-child(3) { padding-left: 12px; }
.living-cost-monthly { font-variant-numeric: tabular-nums; white-space: nowrap; }
.living-cost-derived { font-variant-numeric: tabular-nums; white-space: nowrap; }
.living-cost-text-value { display: inline-flex; align-items: center; justify-content: flex-end; min-height: 21px; line-height: 1.2; vertical-align: middle; }
.living-cost-frequency-add { min-width: 24px; padding: 1px 5px; border: 1px solid #b7cbb8; border-radius: 4px; background: #fff; color: #315b45; font-size: 13px; font-weight: 800; line-height: 1; }
.living-cost-frequency-add:hover, .living-cost-frequency-add:focus-visible { background: #eaf2e7; outline: none; }
.living-cost-new-entry { outline: 2px solid #e0a32b; outline-offset: -2px; background: #fff9df; }
.living-cost-new-entry > * { background: #fff9df; }
.living-cost-tax-override > *, .living-cost-tax-override input { background: #fff2b2 !important; }
.living-cost-tax-override > th { box-shadow: inset 3px 0 0 #d6a500; }
.living-cost-validation { margin: 4px 10px 6px; color: #9a3b2f; font-size: 10px; font-weight: 700; }
.living-cost-optional-date { display: grid; grid-template-columns: 13px minmax(0, 1fr); align-items: center; gap: 3px; margin: 0; }
.living-cost-optional-date input[type="date"] { font-size: 9px; }
.living-cost-optional-date input[type="checkbox"] { width: 13px; height: 13px; margin: 0; }
.living-cost-optional-date input[type="date"]:disabled { opacity: .45; }
.living-cost-expired { margin: 0 16px 8px; border: 1px solid #e5eadf; border-radius: 5px; background: #f7faf5; }
.living-cost-expired summary { cursor: pointer; padding: 7px 10px; color: #6c7d63; font-size: 10px; font-weight: 750; }
.living-cost-expired[open] summary { border-bottom: 1px solid #e5eadf; }
.living-cost-expired .empty-state { margin: 8px 10px; font-size: 11px; }
.living-cost-expired-table { background: #fbfcf9; }
.matrix-account-day-to-day { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: #536655; font-size: 9px; font-weight: 650; white-space: nowrap; }
.matrix-account-day-to-day input { width: 12px; height: 12px; margin: 0; }
.university-cost-table { min-width: 820px; }
.university-cost-table tbody tr:nth-child(3n + 1) th, .university-cost-table tbody tr:nth-child(3n + 1) td { border-top: 1px solid #d7e2d4; }
.university-cost-table tbody tr:nth-child(3n) th, .university-cost-table tbody tr:nth-child(3n) td { border-bottom: 1px solid #d7e2d4; }
.university-entry-label, .university-amount-label { display: grid; gap: 3px; margin: 0; color: #6c7d63; font-size: 9px; font-weight: 750; }
.university-entry-label input, .university-amount-label input { min-width: 0; font-size: 10px; }
.university-cost-table tbody th { vertical-align: middle; }
.university-cost-table tbody tr:not(:nth-child(3n + 1)) th { color: #6c7d63; font-size: 10px; font-weight: 750; }
.university-no-amount { color: #b8c3b6; }
.living-cost-delete { margin: 0; }
.forecast-tab-control-living-costs-2 { height: min(1100px, calc(100dvh - 190px)); min-height: 0; gap: 0; overflow: hidden; }
.forecast-tab-control-living-costs-2 > .forecast-tabs { flex: 0 0 auto; background: #f6f7f3; }
.hierarchical-living-costs-page { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 8px; padding: 8px 0; overflow: hidden; background: linear-gradient(180deg, #f5f8f5 0%, #eef4ef 100%); }
.hierarchical-living-costs-panel { display: flex; flex: 1 1 auto; min-width: 0; min-height: 0; padding: 16px; flex-direction: column; overflow: hidden; border: 1px solid #dfe9e1; border-radius: 18px; background: rgba(255, 255, 255, .94); box-shadow: 0 14px 34px rgba(38, 70, 50, .08); }
.hierarchical-living-costs { display: flex; flex: 1 1 auto; min-width: 0; min-height: 0; flex-direction: column; }
.hierarchical-living-costs-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 4px 22px; }
.hierarchical-living-costs-intro-actions { display: grid; gap: 8px; justify-items: end; min-width: 0; }
.hierarchical-living-costs-filters { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; color: #52675a; font-size: 10px; font-weight: 700; }
.hierarchical-living-costs-filters label { display: inline-flex; align-items: center; gap: 3px; margin: 0; white-space: nowrap; }
.hierarchical-living-costs-filters input[type="checkbox"] { width: 13px; height: 13px; }
.hierarchical-living-costs-search { gap: 5px !important; }
.hierarchical-living-costs-search input { width: 150px; height: 27px; padding: 4px 7px; border: 1px solid #b7cbb8; border-radius: 4px; font: inherit; font-weight: 500; }
.hierarchical-living-costs-intro .eyebrow { margin: 0 0 5px; color: #68806d; font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.hierarchical-living-costs-intro h2 { margin: 0; color: #234936; font-size: 29px; font-weight: 760; letter-spacing: -.035em; line-height: 1; }
.hierarchical-living-costs-intro p { max-width: 680px; margin: 0; color: #6a7b70; font-size: 13px; line-height: 1.55; }
.hierarchical-living-costs-scroll { flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto; border: 1px solid #d9e5dc; border-radius: 13px; background: #fcfefd; box-shadow: 0 6px 18px rgba(42, 75, 53, .05); overscroll-behavior: contain; scrollbar-gutter: stable; }
.hierarchical-living-costs-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.hierarchical-living-costs-scroll::-webkit-scrollbar-track { background: #f1f6f2; border-radius: 12px; }
.hierarchical-living-costs-scroll::-webkit-scrollbar-thumb { border: 3px solid #f1f6f2; border-radius: 12px; background: #aabdb0; }
.hierarchical-living-costs-scroll::-webkit-scrollbar-thumb:hover { background: #7e9b87; }
.hierarchical-living-costs-grid {
    --lc2-cost-width: 188px;
    --lc2-frequency-width: 78px;
    --lc2-schedule-width: 206px;
    --lc2-date-width: 128px;
    --lc2-amount-width: 86px;
    --lc2-actions-width: 112px;
    --lc2-columns: var(--lc2-cost-width) var(--lc2-frequency-width) var(--lc2-schedule-width) var(--lc2-date-width) var(--lc2-date-width) repeat(4, calc(var(--lc2-amount-width) / 2)) var(--lc2-actions-width);
    --lc2-grid-width: calc(var(--lc2-cost-width) + var(--lc2-frequency-width) + var(--lc2-schedule-width) + var(--lc2-date-width) + var(--lc2-date-width) + var(--lc2-amount-width) + var(--lc2-amount-width) + var(--lc2-actions-width));
    display: block; width: var(--lc2-grid-width); min-width: var(--lc2-grid-width); border-collapse: collapse; table-layout: fixed;
}
.hierarchical-living-costs-grid thead, .hierarchical-living-costs-grid tbody { display: block; }
.hierarchical-living-costs-grid tr { display: grid; grid-template-columns: var(--lc2-columns); align-items: center; }
.hierarchical-living-costs-grid th, .hierarchical-living-costs-grid td { min-width: 0; padding: 3px 7px; border-bottom: 1px solid #e8efe9; color: #52675a; font-size: 11px; line-height: 1.15; text-align: left; vertical-align: middle; }
.hierarchical-living-costs-grid thead { position: sticky; top: 0; z-index: 2; }
.hierarchical-living-costs-grid thead tr { min-height: 35px; }
.hierarchical-living-costs-grid thead th { height: 35px; padding-top: 2px; padding-bottom: 2px; background: #f3f7f3; color: #526b58; font-size: 10px; font-weight: 800; letter-spacing: 0; line-height: 1.05; text-transform: none; }
.hierarchical-living-costs-header-label { display: inline-block; line-height: 1.05; white-space: nowrap; }
.hierarchical-living-costs-in-header { grid-column: 6 / span 2; }
.hierarchical-living-costs-out-header { grid-column: 8 / span 2; }
.hierarchical-living-costs-actions-header { grid-column: 10; }
.hierarchical-living-costs-grid input:not([type="checkbox"]), .hierarchical-living-costs-grid select { box-sizing: border-box; width: 100%; height: 23px; min-width: 0; min-height: 23px; padding: 2px 5px; border: 1px solid #d5e1d8; border-radius: 0; outline: none; background: #f9fbfa; color: #304b3a; font: inherit; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.hierarchical-living-costs-grid input:not([type="checkbox"]):hover, .hierarchical-living-costs-grid select:hover { border-color: #b4cdb9; background: #fff; }
.hierarchical-living-costs-grid input:not([type="checkbox"]):focus, .hierarchical-living-costs-grid select:focus { border-color: #5e9670; background: #fff; box-shadow: 0 0 0 3px rgba(94, 150, 112, .15); }
.hierarchical-living-costs-grid input[type="number"] { text-align: right; }
.hierarchical-living-costs-number { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hierarchical-living-costs-group-row { height: 34px; min-height: 34px; }
.hierarchical-living-costs-group-row > th:first-child, .hierarchical-living-costs-subgroup-row > th:first-child { grid-column: 1 / span 9; }
.hierarchical-living-costs-group-row > th:first-child, .hierarchical-living-costs-subgroup-row > th:first-child { align-self: stretch; }
.hierarchical-living-costs-group-row > * { border-top: 1px solid #d4e4d7; background: #e8f3e6; color: #2b5a3e; font-size: 12px; font-weight: 800; }
.hierarchical-living-costs-group-row > th:first-child { position: relative; padding-left: 14px; }
.hierarchical-living-costs-group-row > th:first-child, .hierarchical-living-costs-subgroup-row > th:first-child { display: flex; align-items: center; }
.hierarchical-living-costs-group-row > th, .hierarchical-living-costs-group-row > td { padding-top: 0; padding-bottom: 0; }
.hierarchical-living-costs-group-row > th:first-child > .hierarchical-living-costs-expander { position: relative; inset: auto; width: auto; height: 100%; min-height: 0; justify-content: flex-start; }
.hierarchical-living-costs-group-row > th:first-child > .hierarchical-living-costs-add { position: relative; inset: auto; }
.hierarchical-living-costs-subgroup-row > * { background: #f6f9f6; color: #64796a; font-size: 11px; font-weight: 800; }
.hierarchical-living-costs-subgroup-row { height: 28px; min-height: 28px; }
.hierarchical-living-costs-subgroup-row > th:first-child { position: relative; padding-left: 34px; }
.hierarchical-living-costs-subgroup-row > th, .hierarchical-living-costs-subgroup-row > td { padding-top: 0; padding-bottom: 0; }
.hierarchical-living-costs-subgroup-expander { padding-left: 0; font-size: 10px; }
.hierarchical-living-costs-subgroup-row > th:first-child > .hierarchical-living-costs-expander { position: relative; inset: auto; width: auto; height: 100%; min-height: 0; justify-content: flex-start; }
.hierarchical-living-costs-expander { display: inline-flex; align-items: center; gap: 0; height: 100%; min-height: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.hierarchical-living-costs-expander:hover { color: #1e4832; }
.hierarchical-living-costs-add { display: inline-flex; align-items: center; justify-content: center; float: none; width: 22px; min-width: 22px; height: 100%; padding: 1px 2px; border: 0; background: transparent; color: #2d6443; font-size: 17px; font-weight: 650; line-height: 1; opacity: 0; pointer-events: none; transition: background .15s ease, color .15s ease, opacity .12s ease; }
.hierarchical-living-costs-group-row:hover .hierarchical-living-costs-add,
.hierarchical-living-costs-subgroup-row:hover .hierarchical-living-costs-add,
.hierarchical-living-costs-add:focus-visible { opacity: 1; pointer-events: auto; }
.hierarchical-living-costs-add:hover, .hierarchical-living-costs-add:focus-visible { background: rgba(255, 255, 255, .55); color: #173c28; outline: none; }
.hierarchical-living-costs-add:disabled { opacity: .45; cursor: not-allowed; }
.hierarchical-living-costs-category-name-input { width: min(180px, 100%); height: 23px; margin: 2px 0; padding: 2px 5px; border: 1px solid #6a9873; border-radius: 0; background: #fff; color: #304b3a; font: inherit; font-weight: 750; outline: none; }
.hierarchical-living-costs-expander-glyph { display: inline-block; width: 14px; color: inherit; font-size: 11px; line-height: 1; }
.hierarchical-living-costs-category-name { cursor: text; }

.hierarchical-living-costs-grid tr > :nth-child(6) { border-left: 1px solid #b9cdbd; }
.hierarchical-living-costs-grid tr > :nth-child(9) { border-right: 1px solid #b9cdbd; }
.hierarchical-living-costs-grid thead tr > .hierarchical-living-costs-amount-header { border-left: 1px solid #b9cdbd; border-right: 1px solid #b9cdbd; border-top: 1px solid #b9cdbd; border-bottom: 1px solid #b9cdbd; }
.hierarchical-living-costs-entry-row { min-height: 28px; }
.hierarchical-living-costs-grid .hierarchical-living-costs-entry-row > * { box-sizing: border-box; height: 28px !important; max-height: 28px !important; overflow: hidden; background: #fff; padding-top: 0; padding-bottom: 0; }
.hierarchical-living-costs-entry-row > td { display: flex; align-items: center; justify-content: flex-start; }
.hierarchical-living-costs-entry-row > td.hierarchical-living-costs-number { justify-content: flex-end; }
.hierarchical-living-costs-entry-row > .hierarchical-living-costs-amount-editor-cell { grid-column: 6 / span 4; justify-content: stretch; border-left: 1px solid #b9cdbd; border-right: 1px solid #b9cdbd; }
.hierarchical-living-costs-entry-row > .hierarchical-living-costs-actions-cell { grid-column: 10; }
.hierarchical-living-costs-entry-row > td > *, .hierarchical-living-costs-entry-row > th > * { max-height: 100%; }
.hierarchical-living-costs-entry-row input:not([type="checkbox"]), .hierarchical-living-costs-entry-row select { height: 100%; min-height: 0; }
.hierarchical-living-costs-entry-row:hover > * { background: #f8fbf8; }
.hierarchical-living-costs-entry-row > th:first-child { padding-left: 30px; }
.hierarchical-living-costs-entry-name > input { flex: 1 1 0; width: 100% !important; }
.hierarchical-living-costs-entry-name { display: flex; align-items: center; gap: 5px; color: #304b3a !important; font-weight: 650; }
.hierarchical-living-costs-schedule, .hierarchical-living-costs-dates { white-space: nowrap; }
.hierarchical-living-costs-dates { display: flex; align-items: center; }
.hierarchical-living-costs-schedule { display: flex; align-items: center; gap: 6px; }
.hierarchical-living-costs-grid .hierarchical-living-costs-schedule input[type="number"] { flex: 0 0 42px; width: 42px; min-width: 42px; padding-right: 3px; }
.hierarchical-living-costs-grid .hierarchical-living-costs-schedule select { flex: 0 0 52px; width: 52px; min-width: 52px; font-size: 9px; }
.hierarchical-living-costs-grid .hierarchical-living-costs-schedule select[aria-label^="Day of week"] { flex-basis: 73px; width: 73px; min-width: 73px; }
.hierarchical-living-costs-dates { overflow: hidden; }
.hierarchical-living-costs-date-parts, .hierarchical-living-costs-optional-date { display: flex; align-items: center; gap: 3px; width: 100%; height: 100%; max-height: 100%; min-width: 0; overflow: hidden; }
.hierarchical-living-costs-date-parts input[type="number"] { flex: 0 0 34px; width: 34px; min-width: 34px; padding-left: 2px; padding-right: 2px; }
.hierarchical-living-costs-date-parts select { flex: 1 1 auto; min-width: 0; }
.hierarchical-living-costs-optional-date input[type="date"] { flex: 1 1 auto; min-width: 0; }
.hierarchical-living-costs-grid input[type="date"] { min-width: 0; padding-left: 3px; padding-right: 3px; }
.hierarchical-living-costs-optional-date, .hierarchical-living-costs-forever { margin: 0; }
.hierarchical-living-costs-optional-date input[type="checkbox"], .hierarchical-living-costs-forever input[type="checkbox"] { width: 13px; height: 13px; min-height: 13px; margin: 0; flex: 0 0 auto; }
.hierarchical-living-costs-derived-value { display: block; overflow: hidden; padding: 3px 4px; color: #607266; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.hierarchical-living-costs-forever { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; font-size: 10px; font-weight: 600; }
.hierarchical-living-costs-forever input { width: auto; height: auto; min-height: auto; }
.hierarchical-living-costs-amount-editor { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; width: 100%; height: 100%; white-space: nowrap; }
.hierarchical-living-costs-amount-editor > input[type="number"] { width: 72px; min-width: 0; justify-self: end; }
.hierarchical-living-costs-readonly-amount { display: flex; align-items: center; justify-content: flex-end; width: 72px; justify-self: end; text-align: right; }
.hierarchical-living-costs-permanent > * { background: #fff8dc !important; }
.hierarchical-living-costs-property-row > * { background: #f4f8f4; color: #718274; font-style: italic; }
.hierarchical-living-costs-readonly-badge { display: inline-block; padding: 4px 8px; border: 1px solid #dce8de; border-radius: 999px; background: #f3f7f3; color: #637564; font-size: 9px; font-weight: 800; letter-spacing: .03em; }
.hierarchical-living-costs-entry-row .matrix-delete-button { width: 30px; height: 30px; margin: 0; border-radius: 7px; color: #8a9b8e; font-size: 11px; opacity: .6; }
.hierarchical-living-costs-entry-row .matrix-delete-button:hover, .hierarchical-living-costs-entry-row .matrix-delete-button:focus-visible { background: #fbeeee; color: #ad4f4f; opacity: 1; }
.hierarchical-living-costs-category-total { display: inline-flex; align-items: center; gap: 10px; margin-left: 10px; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hierarchical-living-costs-group-row > .hierarchical-living-costs-actions-cell, .hierarchical-living-costs-subgroup-row > .hierarchical-living-costs-actions-cell { grid-column: 10; display: flex; align-items: center; justify-content: center; }
.hierarchical-living-costs-category-delete { width: 24px; height: 24px; padding: 0; margin: 0; }
.hierarchical-living-costs-delete-dialog { width: min(520px, calc(100vw - 32px)); }
.hierarchical-living-costs-year-ahead { display: flex; flex: 0 0 auto; min-height: 0; padding: 10px 16px; flex-direction: column; overflow: hidden; border: 1px solid #dfe9e1; border-radius: 16px; background: rgba(255, 255, 255, .94); box-shadow: 0 10px 28px rgba(38, 70, 50, .06); }
.hierarchical-living-costs-year-ahead .panel-heading { flex: 0 0 auto; margin-bottom: 0; }
.hierarchical-living-costs-page.year-ahead-open > .hierarchical-living-costs-year-ahead { flex: 0 0 50%; }
.hierarchical-living-costs-page.year-ahead-open .hierarchical-living-costs-year-ahead .panel-heading { margin-bottom: 8px; }
.hierarchical-year-ahead-toggle { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; width: 100%; padding: 4px 0; border: 0; background: transparent; color: #315b45; font: inherit; font-size: 13px; font-weight: 750; text-align: left; cursor: pointer; }
.hierarchical-living-costs-year-ahead-content { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; overflow: hidden; }
.hierarchical-living-costs-year-ahead .table-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.hierarchical-living-costs-scenario-control, .living-cost-scenario-control { display: inline-flex; align-items: center; gap: 6px; color: #52675a; font-size: 10px; font-weight: 800; white-space: nowrap; }
.hierarchical-living-costs-scenario-control { justify-content: flex-end; margin: 0; }
.hierarchical-living-costs-scenario-control select, .living-cost-scenario-control select { min-height: 27px; padding: 4px 7px; border: 1px solid #b7cbb8; border-radius: 4px; background: #f7faf5; color: #315b45; font: inherit; font-weight: 750; }
.living-cost-scenario-control span { margin-right: 2px; }
@media (max-width: 700px) {
    .hierarchical-living-costs-intro { flex-direction: column; }
    .hierarchical-living-costs-panel, .hierarchical-living-costs-year-ahead { padding: 16px; border-radius: 13px; }
    .hierarchical-living-costs-intro { align-items: flex-start; gap: 12px; margin-bottom: 16px; }
    .hierarchical-living-costs-intro h2 { font-size: 24px; }
    .hierarchical-living-costs-scroll { max-height: none; }
    .hierarchical-living-costs-page.year-ahead-open > .hierarchical-living-costs-year-ahead { flex-basis: 50%; }
}
.university-costs-panel { padding: 24px; }
.university-costs-panel .panel-heading { margin-bottom: 12px; }
.university-costs-intro { max-width: 780px; margin: 0 0 24px; }
.university-cost-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.university-cost-table th, .university-cost-table td { padding: 10px 12px; border-bottom: 1px solid #e8eee5; text-align: left; vertical-align: middle; }
.university-cost-table thead th { color: #6c7d63; background: #f7faf5; font-size: 10px; font-weight: 750; }
.university-cost-table tbody th { color: #384d43; font-size: 12px; font-weight: 600; }
.university-cost-table tbody td { color: #536655; font-size: 12px; }
.university-cost-table input { width: 100%; padding: 7px 8px; border: 1px solid #d6dfd5; border-radius: 4px; background: #fff; color: #384d43; font-size: 12px; }
.university-cost-table tr:last-child th, .university-cost-table tr:last-child td { border-bottom: 0; }
.university-cost-summary { margin-top: 24px; }
.university-cost-summary h3 { margin: 0 0 8px; color: #315b45; font-size: 14px; }
.university-cost-ledger { min-width: 760px; }
.about-you-panel { padding: 24px; }
.child-list { display: grid; gap: 14px; }
.child-card { padding: 16px; border: 1px solid #dfe7dc; border-radius: 8px; background: #f7faf5; }
.modal-backdrop { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; background: #1f322b66; }
.modal-card { width: min(420px, 100%); padding: 24px; border: 1px solid #dfe7dc; border-radius: 10px; background: #fff; box-shadow: 0 16px 40px #1f322b40; }
.snapshot-revert-modal { width: min(980px, calc(100vw - 32px)); max-width: 980px; min-width: min(560px, calc(100vw - 32px)); max-height: min(82vh, 760px); overflow: auto; resize: both; }
.snapshot-revert-busy { cursor: progress; }
.snapshot-revert-busy * { cursor: progress !important; }
.snapshot-revert-progress { display: inline-flex; align-items: center; gap: 6px; color: #315b45; font-weight: 750; }
.snapshot-change-scroll { max-height: 52vh; margin: 12px 0 0; overflow: auto; border: 1px solid #dfe7dc; border-radius: 6px; }
.snapshot-change-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 11px; }
.snapshot-change-table th, .snapshot-change-table td { padding: 7px 9px; border-bottom: 1px solid #e6ede3; text-align: left; vertical-align: top; }
.snapshot-change-table thead th { position: sticky; top: 0; z-index: 1; background: #edf6ea; color: #315b45; font-weight: 800; }
.snapshot-change-table tbody th { color: #536655; font-weight: 650; white-space: nowrap; }
.snapshot-change-table tbody td { color: #384d43; }
.recalculation-difference-modal { width: min(900px, 100%); max-height: min(82vh, 760px); overflow: hidden; }
.recalculation-difference-scroll { max-height: 56vh; overflow: auto; border: 1px solid #dfe7dc; border-radius: 6px; }
.recalculation-difference-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.recalculation-difference-table th, .recalculation-difference-table td { padding: 7px 9px; border-bottom: 1px solid #e6ede3; text-align: left; vertical-align: top; }
.recalculation-difference-table thead th { position: sticky; top: 0; z-index: 1; background: #edf6ea; color: #315b45; font-weight: 800; }
.recalculation-difference-table tbody th { color: #384d43; font-weight: 650; white-space: nowrap; }
.recalculation-difference-table tbody td { color: #384d43; font-variant-numeric: tabular-nums; }
.modal-card h3 { margin-top: 0; color: #315b45; }
.modal-card label { display: block; margin-top: 18px; }
.modal-card input { width: 100%; }
.mortgage-relief-modal { width: min(520px, 100%); }
.sale-editor-modal { width: min(440px, 100%); }
.sale-editor-modal #sale-price-input { box-sizing: border-box; margin-top: 6px; padding: 9px 10px; font-size: 16px; font-variant-numeric: tabular-nums; }
.mortgage-relief-member { display: grid; grid-template-columns: 1fr 100px 18px; align-items: center; gap: 8px; margin-top: 10px; }
.mortgage-relief-member label { margin-top: 0; }
.mortgage-relief-member input { width: 100%; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.danger-button { background: #a61c00; border-color: #a61c00; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.cash-account-selection-modal .modal-actions { flex-wrap: wrap; }
.modal-card.living-costs2-report-modal { box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; width: min(1120px, calc(100vw - 40px)); max-width: 1120px; max-height: calc(100dvh - 40px); min-height: 0; overflow: hidden; }
.living-costs2-report-header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.living-costs2-report-header h3 { margin: 0; overflow-wrap: anywhere; }
.living-costs2-report-controls { display: flex; flex: 0 0 auto; align-items: center; flex-wrap: wrap; gap: 8px; }
.living-costs2-report-controls label { margin: 0; }
.living-costs2-report-controls select { box-sizing: border-box; max-width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid #b7cbb8; border-radius: 4px; background: #f7faf5; color: #315b45; font: inherit; }
.living-costs2-report-body { flex: 1 1 auto; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; }
.living-costs2-report-scenario { min-width: 0; margin: 0 0 20px; }
.living-costs2-report-scenario:last-child { margin-bottom: 0; }
.living-costs2-report-scenario h4 { margin: 0 0 10px; color: #315b45; font-size: 14px; overflow-wrap: anywhere; }
.living-costs2-report-table { width: 100%; max-width: 100%; table-layout: fixed; white-space: normal; }
.living-costs2-report-table th, .living-costs2-report-table td { padding: 8px 10px; text-align: left; vertical-align: top; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.living-costs2-report-table th:first-child { width: 24%; padding-left: 10px; }
.living-costs2-report-table thead th { background: #edf6ea; color: #315b45; font-weight: 750; }
.living-costs2-report-table tbody th { color: #384d43; font-weight: 650; }
.living-costs2-report-actions { flex: 0 0 auto; margin-top: 0; }
@media (max-width: 600px) {
    .modal-card.living-costs2-report-modal { padding: 16px; }
    .living-costs2-report-table th, .living-costs2-report-table td { padding: 6px; }
    .living-costs2-report-table th:first-child { padding-left: 6px; }
}
.calculation-modal { box-sizing: border-box; width: min(1100px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: min(860px, calc(100vh - 32px)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.calculation-modal-context { color: #6d766d; }
.calculation-year-ahead { margin: 12px 0; padding: 10px; border: 1px solid #dfe7dc; border-radius: 7px; background: #fbfdf9; }
.calculation-year-ahead-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.calculation-year-ahead-heading h4 { margin: 0; color: #315b45; font-size: 13px; }
.calculation-year-ahead-heading p { margin: 2px 0 0; font-size: 10px; }
.calculation-year-ahead-heading > strong { color: #315b45; font-size: 13px; white-space: nowrap; }
.calculation-year-ahead-opening { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 8px; border: 1px solid #d2ded0; border-radius: 4px; background: #edf6ea; color: #536655; font-size: 10px; }
.calculation-year-ahead-opening strong { color: #315b45; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calculation-year-ahead-toolbar { display: flex; align-items: center; gap: 7px; padding: 8px 0 2px; }
.calculation-year-ahead-toolbar label { color: #536655; font-size: 10px; font-weight: 700; }
.calculation-year-ahead-toolbar input { min-width: 0; flex: 1 1 240px; padding: 5px 7px; border: 1px solid #d2ded0; border-radius: 4px; background: #fff; font-size: 10px; }
.calculation-year-ahead-totals { padding: 8px 0; }
.calculation-year-ahead-scroll { max-height: 245px; overflow: auto; border: 1px solid #dfe7dc; border-radius: 5px; scrollbar-gutter: stable; }
.calculation-year-ahead-ledger { width: 100%; min-width: 860px; table-layout: fixed; font-size: 10px; }
.calculation-year-ahead-ledger th:nth-child(1), .calculation-year-ahead-ledger td:nth-child(1) { width: 92px; }
.calculation-year-ahead-ledger th:nth-child(2), .calculation-year-ahead-ledger td:nth-child(2) { width: 105px; }
.calculation-year-ahead-ledger th:nth-child(4), .calculation-year-ahead-ledger td:nth-child(4) { width: 105px; }
.calculation-year-ahead-ledger th:nth-child(5), .calculation-year-ahead-ledger td:nth-child(5), .calculation-year-ahead-ledger th:nth-child(6), .calculation-year-ahead-ledger td:nth-child(6), .calculation-year-ahead-ledger th:nth-child(7), .calculation-year-ahead-ledger td:nth-child(7) { width: 86px; }
.calculation-year-ahead-ledger td { overflow-wrap: anywhere; }
.calculation-year-ahead-ledger th, .calculation-year-ahead-ledger td { padding: 6px 7px; }
.calculation-year-ahead-closing { margin: 8px 0 0; color: #536655; font-size: 10px; }
.calculation-year-ahead-closing strong { color: #315b45; font-variant-numeric: tabular-nums; }
.calculation-grid-scroll { max-height: 430px; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; border: 1px solid #dfe7dc; border-radius: 6px; padding-inline-end: 8px; }
.calculation-breakdown { width: 100%; border-collapse: collapse; font-size: 11px; }
.calculation-breakdown th, .calculation-breakdown td { padding: 7px 9px; border-bottom: 1px solid #e6ede3; text-align: left; }
.calculation-breakdown thead th { position: sticky; top: 0; z-index: 1; background: #edf6ea; color: #315b45; }
.calculation-breakdown tbody th { color: #384d43; font-weight: 650; }
.calculation-breakdown tbody th { white-space: normal; }
.base-costs-schedule-modal { width: min(1100px, calc(100vw - 40px)); max-height: min(860px, calc(100vh - 40px)); overflow: hidden; }
.base-costs-schedule-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.base-costs-schedule-heading h3 { margin-bottom: 0; }
.base-costs-schedule-search { padding: 0 0 13px; }
.base-costs-schedule-totals { padding-inline: 0; }
.base-costs-schedule-scroll { max-height: min(58vh, 520px); overflow-x: auto; }
.base-costs-schedule-table { min-width: 700px; }
.base-costs-schedule-table tfoot th, .base-costs-schedule-table tfoot td { border-top: 2px solid #cbd8ca; font-weight: 800; }
.calculation-node { position: relative; }
.calculation-node::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--calculation-level) * 18px); pointer-events: none; background: repeating-linear-gradient(to right, transparent 0 17px, #cbd8ca 17px 18px); }
.calculation-breakdown .calculation-value { width: 1%; min-width: 112px; border-left: 1px solid #cbd8ca; color: #315b45; font-weight: 750; text-align: right; white-space: nowrap; }
.calculation-label { position: relative; }
.calculation-expand, .calculation-expand-spacer { display: inline-flex; width: 18px; height: 18px; margin-right: 4px; align-items: center; justify-content: center; vertical-align: middle; }
.calculation-expand { padding: 0; border: 0; background: transparent; color: #718174; font-size: 9px; cursor: pointer; }
.calculation-expand:hover, .calculation-expand:focus-visible { color: #315b45; outline: 1px solid #b7cbb7; outline-offset: 1px; }
.calculation-breakdown tbody tr:has(.calculation-expand) th { font-weight: 750; }
.tax-explanation-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tax-explanation-table th, .tax-explanation-table td { padding: 6px 9px; border-bottom: 1px solid #e6ede3; }
.tax-explanation-table thead th { background: #edf6ea; color: #315b45; text-align: left; }
.tax-explanation-table thead th:last-child { text-align: right; }
.tax-explanation-table tbody th { color: #384d43; font-weight: 650; text-align: left; }
.tax-explanation-table .tax-explanation-value { color: #315b45; font-weight: 750; text-align: right; white-space: nowrap; }
.about-you-intro { max-width: 760px; margin: 16px 0 22px; }
.change-journal { margin-top: 30px; padding-top: 18px; border-top: 1px solid #e1e8df; }
.change-journal .field-help { margin: 4px 0 0; }
.change-journal-scroll { max-height: 360px; margin-top: 12px; overflow: auto; border: 1px solid #dfe7dc; border-radius: 6px; }
.change-journal-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.change-journal-table th, .change-journal-table td { padding: 7px 9px; border-bottom: 1px solid #e6ede3; text-align: left; vertical-align: middle; }
.change-journal-table thead th { position: sticky; top: 0; z-index: 1; background: #edf6ea; color: #315b45; font-weight: 800; }
.change-journal-table tbody th { color: #536655; font-weight: 650; white-space: nowrap; }
.change-journal-table tbody td { color: #384d43; }
.about-danger-zone { margin-top: 28px; padding-top: 18px; border-top: 1px solid #e1e8df; color: #6c4c4c; }
.about-danger-zone p { max-width: 620px; font-size: 12px; line-height: 1.55; }
.member-list { display: grid; gap: 18px; }
.member-card { padding: 20px; border: 1px solid #dfe7dc; border-radius: 10px; background: #fbfdf9; }
.member-heading, .member-properties-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.member-heading { border-bottom: 1px solid #e6ede3; padding-bottom: 12px; margin-bottom: 8px; }
.member-heading h3, .member-properties-heading h4 { margin: 0; color: #315b45; }
.member-heading h3 { font-size: 16px; }
.member-properties-heading { margin-top: 22px; }
.member-properties-heading h4 { font-size: 13px; }
.member-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.member-card label { margin-top: 14px; }
.member-card .checkbox-label { margin: 16px 0 0; }
.member-card .checkbox-label input { width: auto; }
.property-list-heading { margin-top: 30px; }
.property-editor-field { margin-top: 18px; }
.cgt-note { max-width: 850px; }
.property-list { display: grid; gap: 14px; }
.property-group-heading { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 18px; padding-bottom: 6px; border-bottom: 1px solid #dfe7dc; }
.property-group-heading h4 { margin: 0; color: #315b45; font-size: 13px; }
.property-group-heading .field-help { margin: 0; }
.property-card { margin-top: 12px; padding: 16px; background: #fce5cd; border: 1px solid #f5d7b8; border-radius: 8px; }
.property-heading, .ownership-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.property-heading h4, .ownership-heading h5 { margin: 0; color: #8b4c32; }
.property-heading .text-button { margin: 0; color: #8b4c32; }
.property-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.property-card label { margin-top: 0; }
.ownership-heading { border-top: 1px solid #f1cfad; margin-top: 16px; padding-top: 14px; }
.ownership-heading h5 { font-size: 12px; }
.ownership-heading span { color: #795640; font-size: 11px; white-space: nowrap; overflow: visible; }
.ownership-field { display: grid; grid-template-columns: minmax(0, 1fr) 140px; align-items: center; gap: 12px; margin-top: 8px; }
.ownership-field input { text-align: right; }
.ownership-warning { color: #8b4c32; }
.add-member-button { margin-top: 18px; }
.scenario-settings { margin: 1.25rem 0; padding: 1rem; border: 1px solid #dfe7dc; border-radius: .75rem; background: #faf8f2; }
.scenario-settings h3, .scenario-subheading h4 { margin: 0 0 .45rem; }
.scenario-subheading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; }
.event-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin: .45rem 0; }
.event-fields input { min-width: 0; }
.event-card { margin-top: .55rem; padding: .65rem; border-left: 3px solid #b4a7d6; background: #fff; }
.year-ahead-panel { margin-top: 1rem; }
.year-ahead-panel > .panel-heading, .year-ahead-panel .year-ahead-heading-actions { flex-wrap: wrap; }
.year-ahead-title { position: relative; display: flex; align-items: center; gap: 9px; }
.year-ahead-interest-help > summary { display: grid; place-items: center; width: 24px; height: 24px; box-sizing: border-box; border: 1px solid #b8cdbb; border-radius: 50%; background: #f8fbf6; color: #315b45; font-size: 13px; font-weight: 750; cursor: pointer; list-style: none; }
.year-ahead-interest-help > summary::-webkit-details-marker, .year-ahead-transfer-guidance > summary::-webkit-details-marker { display: none; }
.year-ahead-interest-help > summary:focus-visible, .year-ahead-transfer-guidance > summary:focus-visible { outline: 2px solid #315b45; outline-offset: 3px; }
.year-ahead-interest-help-content { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; box-sizing: border-box; width: min(480px, calc(100vw - 80px)); padding: 14px; border: 1px solid #c7d7c6; border-radius: 8px; background: #fff; box-shadow: 0 6px 20px #183d2926; }
.year-ahead-interest-help-content p { margin: 0; }
.year-ahead-transfer-guidance > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; color: #315b45; font-size: 12px; cursor: pointer; list-style: none; }
.year-ahead-guidance-chevron { display: inline-block; font-size: 17px; line-height: 1; transition: transform .15s ease; }
.year-ahead-transfer-guidance[open] .year-ahead-guidance-chevron { transform: rotate(90deg); }
.year-ahead-guidance-preview { flex: 1 1 240px; color: #536655; overflow-wrap: anywhere; }
.year-ahead-guidance-content { padding: 8px 0 0 17px; }
.year-ahead-guidance-content p, .year-ahead-guidance-content ul { margin: 0 0 6px; }
.year-end-processing-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 14px; padding: 14px 18px; border: 1px solid #d2a84d; background: #fff7dc; color: #4d4324; }
.year-end-processing-panel h2 { margin: 0 0 4px; color: #59451d; font-size: 17px; }
.year-end-processing-panel p { margin: 0; }
.year-end-processing-panel .eyebrow { margin-bottom: 3px; color: #8b6b22; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
@media (max-width: 700px) { .year-end-processing-panel { align-items: stretch; flex-direction: column; } }
.year-ahead-search { display: flex; align-items: center; gap: 9px; padding: 0 24px 6px; }
.year-ahead-search label { display: block; margin: 0; color: #6c7d63; font-size: 10px; font-weight: 750; white-space: nowrap; }
.year-ahead-search input[type="search"] { width: min(360px, 100%); padding: 7px 9px; font-size: 12px; }
.year-ahead-search .year-ahead-history-toggle { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.year-ahead-search .year-ahead-history-toggle input[type="checkbox"] { flex: 0 0 14px; width: 14px; min-width: 14px; height: 14px; padding: 0; margin: 0; }
.year-ahead-search-count { color: #758077; font-size: 10px; white-space: nowrap; }
.year-ahead-category-filters { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-height: 52px; box-sizing: border-box; padding: 9px 24px 14px; border-top: 1px solid #e1e8de; border-bottom: 1px solid #e1e8de; background: #fbfcf9; color: #536655; font-size: 12px; line-height: 1.35; }
.year-ahead-filter-label { font-weight: 750; }
.year-ahead-category-option { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 3px 9px; border: 1px solid #d4dfd1; border-radius: 4px; background: #fff; font-weight: 650; white-space: nowrap; }
.year-ahead-category-option input { width: 16px; height: 16px; margin: 0; accent-color: #5c8768; }
.year-ahead-account-select { max-width: 220px; padding: 3px 5px; border: 1px solid #cbd8ca; border-radius: 3px; background: #fff; color: #536655; font: inherit; font-size: 10px; font-weight: 700; }
.year-ahead-ledger-totals { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 12px; }
.year-ahead-ledger-totals > div { display: inline-flex; align-items: baseline; gap: 7px; padding: 5px 8px; border: 1px solid #dfe7dc; border-radius: 5px; background: #fbfdf9; color: #536655; font-size: 10px; }
.year-ahead-ledger-totals strong { color: #315b45; font-size: 12px; font-variant-numeric: tabular-nums; }
.year-ahead-ledger-totals-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 24px 12px; }
.year-ahead-ledger-totals-row .year-ahead-category-filters { flex: 0 1 auto; min-width: 0; min-height: 0; gap: 4px 7px; padding: 0; border: 0; background: transparent; font-size: 10px; line-height: 1.2; }
.year-ahead-ledger-totals-row .year-ahead-filter-label { margin-right: 2px; }
.year-ahead-ledger-totals-row .year-ahead-category-option { min-height: 22px; gap: 4px; padding: 2px 6px; border-radius: 3px; font-size: 10px; }
.year-ahead-ledger-totals-row .year-ahead-category-option input { width: 13px; height: 13px; }
.year-ahead-ledger-totals-row .year-ahead-ledger-totals { flex: 0 0 auto; margin-left: 4px; padding: 0 0 0 12px; border-left: 1px solid #d2ded0; }
.chart-labels { display: flex; justify-content: space-between; color: #83907e; font-size: 10px; }
.table-panel { overflow: hidden; }
.table-panel .panel-heading { padding: 23px 24px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 11px; font-variant-numeric: tabular-nums; }
thead { background: #f7f9f4; }
th, td { text-align: right; padding: 13px 15px; border-bottom: 1px solid #eef1ea; }
th:first-child { text-align: left; padding-left: 24px; }
thead th { color: #788573; font-size: 10px; font-weight: 550; }
tbody th { font-weight: 450; }
td { color: #637663; }
.year-ahead-ledger { width: max-content; min-width: 0; }
.year-ahead-ledger th, .year-ahead-ledger td { padding: 8px 10px; }
.year-ahead-ledger th:first-child { padding-left: 16px; }
.year-ahead-ledger thead th { position: sticky; top: 0; z-index: 2; background: #f7f9f4; }
.year-ahead-ledger .year-ahead-none td { padding: 18px; color: #536655; font-weight: 700; text-align: center; letter-spacing: .08em; }
.scenario-information-panel { margin-top: 1rem; }
.scenario-information-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0 24px 24px; border: 1px solid #dfe7dc; background: #dfe7dc; }
.scenario-information-grid > div { display: grid; gap: 3px; min-width: 0; padding: 10px 12px; background: #fbfdf9; }
.scenario-information-grid span { color: #758077; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.scenario-information-grid strong { overflow: hidden; color: #315b45; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.closing { color: #294e36; font-weight: 600; }
.negative { color: #a03c35 !important; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; gap: 8px; }
.pagination button { min-height: 44px; background: #fff; border: 1px solid #dce4d7; color: #4c634b; padding: 8px 10px; border-radius: 6px; font-size: 10px; }
.pagination span { font-size: 10px; color: #7b8977; }
.model-note { margin: 0; color: #778373; font-size: 11px; line-height: 1.8; }
footer { display: flex; justify-content: space-between; border-top: 1px solid #e0e6db; margin-top: 36px; padding: 24px 0; color: #8a9485; font-size: 10px; gap: 14px; }
.validation-errors { font-size: 12px; color: #a03c35; padding-left: 18px; line-height: 1.6; }
input.invalid { border-color: #b5483d; }
.verification-panel { padding: 28px; max-width: 960px; line-height: 1.7; font-size: 14px; }
.verification-panel .primary-button { margin: 24px 0; }
.check-list { padding: 0; list-style: none; }
.check-list li { display: flex; gap: 24px; padding: 18px 0; border-top: 1px solid #e5eadf; }
.check-list p { margin: 3px 0 0; color: #677866; font-size: 12px; }
.check-pass { color: #28714d; }
.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; }
.skip-link { position: absolute; top: -100px; }
.skip-link:focus { top: 10px; left: 10px; z-index: 20; background: white; padding: 12px; }
#blazor-error-ui { display: none; background: #fff3db; padding: 16px; position: fixed; bottom: 0; width: 100%; z-index: 100; }
.loading { max-width: 440px; margin: 15vh auto; padding: 32px; text-align: center; }
.loading h1 { font-size: 32px; }
.loading p { color: #68765f; }
@media (max-width: 1100px) { .site-shell { padding: 0 24px; } .planner-grid-wizard-open { grid-template-columns: 255px minmax(0, 1fr); gap: 18px; } .page-heading { align-items: start; } .status-pill { margin-top: 5px; } .summary-card { padding: 17px 13px; } .brand-subtitle, .brand-divider { display: none; } }
@media (max-width: 800px) { .planner-grid, .planner-grid-wizard-open { grid-template-columns: 1fr; } .living-costs-layout { grid-template-columns: 1fr; min-height: max-content; overflow-y: auto; } .living-costs-layout .living-costs-panel { height: auto; max-height: none; overflow: visible; } .living-costs-year-ahead { position: static; height: auto; max-height: none; overflow: visible; } .living-costs-year-ahead .table-scroll { flex: 0 1 auto; max-height: 420px; } .page-heading { flex-direction: column; margin-top: 28px; } .summary-card strong { font-size: 24px; } .onboarding { grid-template-columns: 1fr; gap: 16px; } }
@media (max-width: 500px) { .site-shell { padding: 0 16px; } .topbar { flex-wrap: wrap; gap: 12px; padding: 18px 0; } .nav-links { gap: 20px; } .nav-links a { font-size: 12px; } .summary-grid { grid-template-columns: 1fr; } .summary-card { padding: 17px 20px; } .summary-card p { margin-bottom: 7px; } .chart-panel { padding: 18px; } .chart-legend-group { justify-content: flex-start; } .chart-legend { font-size: 9px; } .forecast-tabs { width: 100%; min-width: 0; flex-wrap: wrap; } .forecast-tab-actions { flex: 1 1 100%; width: 100%; min-width: 0; margin-left: 0; padding-left: 0; flex-wrap: wrap; } .forecast-tab { padding-left: 10px; padding-right: 10px; } .table-panel .panel-heading { padding: 20px; } .comparison-panel .panel-heading { align-items: flex-start; flex-direction: column; gap: 4px; min-width: 0; } .comparison-heading-tools { width: 100%; justify-content: flex-start; flex-wrap: wrap; } .comparison-action-controls { flex-wrap: wrap; min-width: 0; } .matrix-search-controls { flex: 1 1 100%; width: 100%; } .comparison-tools { align-items: flex-start; flex-direction: column; gap: 6px; } .pagination { padding: 14px; } footer { flex-direction: column; } .verification-panel { padding: 18px; } .check-list li { gap: 12px; } code { overflow-wrap: anywhere; } .onboarding { padding: 18px; } .onboarding-steps { grid-template-columns: 1fr; gap: 12px; } }
@media (max-width: 800px) { .property-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .member-fields, .property-fields { grid-template-columns: 1fr; } .ownership-field { grid-template-columns: 1fr 110px; } .property-card .text-button { margin-bottom: 0; } }
@media (max-width: 600px) { .event-fields { grid-template-columns: 1fr; } }
@media print {
  body.grid-printing { background: #fff; }
  body.grid-printing .site-shell { max-width: none; padding: 0; }
  body.grid-printing .topbar,
  body.grid-printing .forecast-tabs,
  body.grid-printing .comparison-panel > .panel-heading,
  body.grid-printing .comparison-mode-banner,
  body.grid-printing .comparison-action-controls,
  body.grid-printing .matrix-search-controls,
  body.grid-printing .history-controls,
  body.grid-printing .comparison-maximize-button,
  body.grid-printing .forecast-tab-actions,
  body.grid-printing .matrix-detail-toggle,
  body.grid-printing .matrix-add-button,
  body.grid-printing .matrix-delete-button,
  body.grid-printing .matrix-inline-select,
  body.grid-printing .cell-info-trigger,
  body.grid-printing .cell-operation-marker,
  body.grid-printing .cell-comment-marker,
  body.grid-printing .cell-comment-action,
  body.grid-printing .source-trace-overlay,
  body.grid-printing input,
  body.grid-printing select,
  body.grid-printing button { display: none !important; }
  body.grid-printing .comparison-panel { border: 0; box-shadow: none; }
  body.grid-printing .bot-table-scroll { max-height: none; overflow: visible; }
  body.grid-printing .comparison-matrix { width: max-content; min-width: 0; }
  body.grid-printing .comparison-matrix thead th,
  body.grid-printing .comparison-matrix th:first-child { position: static; }
  body.grid-printing .comparison-matrix thead th,
  body.grid-printing .comparison-matrix th,
  body.grid-printing .comparison-matrix td { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
.privacy-panel { padding: 28px; font-size: 14px; line-height: 1.7; }
.privacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.privacy-panel form, .privacy-panel > input, .privacy-panel > textarea { max-width: 560px; }
.privacy-panel .primary-button { margin-top: 18px; }
.privacy-panel textarea, .privacy-panel select { width: 100%; padding: 12px; border: 1px solid #d6dfd5; background: #fcfdfb; border-radius: 7px; color: #273e30; font: inherit; }
.privacy-panel textarea { min-height: 100px; }
.privacy-panel p { color: #566a59; }
.recovery-key { display: block; padding: 18px; background: #f0f4e9; border: 1px solid #d4e2cd; border-radius: 8px; overflow-wrap: anywhere; user-select: all; }
.checkbox-label { display: flex; align-items: center; justify-content: flex-start; gap: 10px; }
.checkbox-label input { width: auto; }
.section-heading { margin-top: 36px; }
.privacy-footnote { border-top: 1px solid #dfe7da; margin-top: 32px; padding-top: 18px; font-size: 12px; }
.privacy-footnote .text-button { margin-left: 0; color: #8e3833; }
.nav-links { align-items: center; flex-wrap: wrap; }
.nav-links .text-button { margin: 0; }
@media (max-width: 800px) { .privacy-grid { grid-template-columns: 1fr; gap: 36px; } .topbar { flex-wrap: wrap; padding: 18px 0; } }

.server-status-inline { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: .72rem; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.server-status-inline.server-status-up { color: #28714d; }
.server-status-inline.server-status-down { color: #a03c35; }
.server-status-inline.server-status-checking { color: #7a8579; }
.server-status-inline.server-status-transition { animation: server-status-transition .75s steps(1, end) infinite; }
@keyframes server-status-transition { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .12; } }
.application-version-topbar { display: inline-flex; align-items: center; flex: 0 0 auto; color: #536655; font-size: .68rem; font-weight: 650; line-height: 1.2; white-space: nowrap; }
.welcome-server-status { margin: -18px 0 18px; }
.server-down-notice { display: grid; gap: 6px; margin-top: 22px; padding: 12px 14px; border: 1px solid #e3b6ae; border-radius: 8px; background: #fff3f0; color: #7e302b; line-height: 1.45; }
.server-down-notice .account-action-button { justify-self: start; background: #9e3c35; }
.server-down-notice .account-action-button:hover { background: #782c27; }
.account-reset-panel { max-width: 560px; margin: 24px 0; padding: 18px; border: 1px solid #d4e2cd; border-radius: 8px; background: #f5faf1; }
.forecast-notice-panel { margin: 12px 14px 0; padding: 7px 10px; border: 1px solid #d7dfd2; border-radius: 6px; background: #fbfdf9; }
.forecast-notice-panel-collapsed { padding-top: 2px; padding-bottom: 2px; }
.forecast-notice-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.forecast-notice-panel h3 { margin: 0; color: #315b45; font-size: 12px; }
.forecast-notice-toggle { margin: 0; padding: 2px 6px; border: 1px solid #b7cbb8; border-radius: 4px; background: #fff; color: #315b45; font: inherit; font-size: 9px; font-weight: 750; cursor: pointer; }
.forecast-notice-toggle:hover, .forecast-notice-toggle:focus-visible { border-color: #8cae8f; background: #eaf2e7; outline: none; }
.forecast-notice-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.forecast-notice { display: flex; align-items: baseline; gap: 9px; padding: 9px 11px; border: 1px solid transparent; border-radius: 5px; font-size: 12px; line-height: 1.45; }
.forecast-notice strong { flex: 0 0 auto; text-transform: uppercase; font-size: 10px; letter-spacing: .04em; }
.forecast-notice-warning { border-color: #e1c761; background: #fff3b8; color: #665211; }
.forecast-notice-error { border-color: #d18b83; background: #ffd9d5; color: #7e302b; }
.forecast-notice-action { margin-left: auto; flex: 0 0 auto; padding: 4px 9px; }
.forecast-notice-date { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; flex: 0 0 auto; font-size: 10px; font-weight: 700; }
.forecast-notice-date input { min-height: 28px; padding: 3px 5px; border: 1px solid currentColor; border-radius: 4px; background: #fff; color: inherit; font: inherit; }
.remote-plan-notice { display: flex; align-items: baseline; gap: 10px; margin: 12px 14px 0; padding: 8px 10px; border: 1px solid #e1c761; border-radius: 6px; background: #fff3b8; color: #665211; font-size: 12px; line-height: 1.4; }
.remote-plan-notice strong { flex: 0 0 auto; text-transform: uppercase; font-size: 10px; letter-spacing: .04em; }
.living-cost-bespoke-fields { display: grid; gap: 3px; min-width: 0; }
.living-cost-bespoke-forever { display: inline-flex; align-items: center; gap: 3px; color: #536655; font-size: 9px; line-height: 1; white-space: nowrap; }
.living-cost-bespoke-forever input[type="checkbox"] { width: auto; }
.tax-payment-panel { min-width: 0; }
.tax-payment-table, .admin-users-table, .admin-log-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tax-payment-table th, .tax-payment-table td, .admin-users-table th, .admin-users-table td, .admin-log-table th, .admin-log-table td { padding: 9px 10px; border-bottom: 1px solid #dce5da; text-align: left; vertical-align: top; }
.tax-payment-table thead th, .admin-users-table thead th, .admin-log-table thead th { position: sticky; top: 0; z-index: 1; background: #eaf2e7; color: #315b45; font-size: 11px; }
.tax-payment-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; margin: 12px 0 16px; color: #536655; font-size: 10px; }
.tax-legend-swatch { padding: 4px 8px; border: 1px solid rgb(74 91 79 / 22%); border-radius: 3px; color: #273e30; font-weight: 800; }
.tax-legend-note { flex: 1 1 260px; }
.tax-person-schedule { margin-top: 16px; }
.tax-person-schedule h3 { margin: 0; padding: 7px 10px; border: 1px solid #bd91aa; border-bottom: 0; border-radius: 5px 5px 0 0; background: #d5a6bd; color: #2b1724; font-size: 16px; }
.tax-schedule-grid { width: max-content; min-width: 100%; table-layout: fixed; --tax-year-header-height: 27px; --tax-period-header-height: 22px; }
.tax-schedule-scroll { position: relative; }
.tax-current-date-marker { position: absolute; top: 0; bottom: 0; z-index: 2; width: 1px; border-radius: 1px; background: #5b9c6b; box-shadow: 0 0 0 1px rgb(255 255 255 / 40%); opacity: .64; pointer-events: none; mix-blend-mode: multiply; }
.tax-current-date-label { position: absolute; top: 2px; z-index: 6; padding: 1px 0; color: #4c875d; font-size: 9px; font-weight: 800; line-height: 1; writing-mode: vertical-rl; white-space: nowrap; transform: translateX(3px); pointer-events: none; }
.tax-schedule-grid th:first-child { width: 180px; min-width: 180px; background: #fff; color: #273e30; }
.tax-schedule-grid .tax-calendar-year-cell { width: 224px; min-width: 224px; }
.tax-schedule-grid .tax-calendar-period-cell, .tax-schedule-grid .tax-calendar-cell { width: 56px; min-width: 56px; }
.tax-schedule-grid thead th { text-align: center; white-space: nowrap; }
.tax-schedule-grid thead th:first-child { text-align: left; }
.tax-schedule-grid thead .tax-calendar-year-row th { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid #a9bdad; background: #eaf2e7; color: #273e30; font-size: 10px; }
.tax-schedule-grid thead .tax-calendar-period-row th { position: sticky; top: var(--tax-year-header-height); z-index: 4; padding: 4px 3px; border-top: 0; background: #f5f8f3; color: #536655; font-size: 9px; font-weight: 800; }
.tax-schedule-grid thead .tax-year-row th { position: sticky; top: calc(var(--tax-year-header-height) + var(--tax-period-header-height)); z-index: 3; border-top: 0; color: #273e30; font-size: 12px; }
.tax-band-0 { background: #cfe0e5 !important; }
.tax-band-1 { background: #fce4ca !important; }
.tax-band-2 { background: #d9d2e9 !important; }
.tax-band-3 { background: #d9ead3 !important; }
.tax-band-4 { background: #fff2cc !important; }
.tax-band-5 { background: #d5a6bd !important; }
.tax-calendar-year-row .tax-calendar-year-boundary { border-left: 2px solid #315b45 !important; }
.tax-selected-scenario { display: block; margin-top: 3px; color: #536655; font-size: 11px; font-weight: 750; }
.tax-payment-mixed { background: #f5f8f3 !important; }
.tax-calendar-cell[data-payment-tax-years]:not([data-payment-tax-years=""]) { border-top: 2px solid rgb(74 91 79 / 18%); border-bottom: 2px solid rgb(74 91 79 / 18%); }
.tax-calendar-cell[data-payment-tax-years]:not([data-payment-tax-years=""]) .tax-payment-chips { margin: -2px -1px; }
.tax-assessment-row th, .tax-on-account-row th, .tax-payments-row th, .tax-cgt-row th { font-weight: 800; white-space: nowrap; }
.tax-cgt-row th, .tax-cgt-row td { border-top: 3px solid #315b45 !important; }
.tax-assessment-row td { font-size: 13px; font-weight: 800; text-align: center; white-space: nowrap; }
.tax-calendar-cell { padding: 6px 3px !important; text-align: center !important; vertical-align: top !important; }
.tax-calendar-cell .tax-empty-cell { display: block; padding-top: 3px; }
.tax-payment-chips { display: grid; gap: 4px; justify-items: stretch; }
.tax-payment-chip { position: relative; display: grid; min-width: 48px; gap: 1px; padding: 4px 3px; border: 1px solid rgb(74 91 79 / 23%); border-radius: 2px; background: inherit; color: #273e30; font-size: 10px; line-height: 1.25; }
.tax-payment-chip strong { font-size: 10px; font-style: italic; }
.tax-payment-chip span { font-weight: 750; text-align: center; white-space: nowrap; }
.tax-empty-cell { color: #78857a; }
.tax-paid-target { position: relative; }
.tax-paid-label { position: absolute; top: 11px; right: -8px; z-index: 5; padding: 1px 4px; border: 1px solid #a64d79; border-radius: 1px; background: rgb(244 204 204 / 88%); color: #7a284e; font-size: 8px; font-weight: 800; line-height: 1; white-space: nowrap; transform: rotate(-30deg); transform-origin: top right; pointer-events: none; }
.tax-paid-context-menu { position: absolute; top: 100%; left: 50%; z-index: 20; display: block; min-width: 92px; padding: 3px; border: 1px solid #8cae8f; border-radius: 4px; background: #fff; box-shadow: 0 3px 10px rgb(39 62 48 / 22%); transform: translateX(-50%); }
.tax-paid-context-menu button { width: 100%; padding: 4px 6px; border: 0; background: #fff; color: #315b45; font: inherit; font-size: 10px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.tax-paid-context-menu button:hover, .tax-paid-context-menu button:focus-visible { background: #eaf2e7; outline: none; }
.tax-payment-chip .tax-paid-context-menu { text-align: left; white-space: normal; }
.admin-page { gap: 18px; }
.cash-isa-market-panel { margin: 18px 0; padding: 16px; border: 1px solid #ccdcca; border-radius: 9px; background: #fbfdf9; }
.cash-isa-market-panel h3, .cash-isa-market-panel h4 { margin: 0 0 9px; color: #315b45; }
.cash-isa-latest { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
.cash-isa-latest > div { display: grid; flex: 1 1 240px; gap: 5px; padding: 14px; border: 1px solid #dce5da; border-radius: 7px; background: #fff; font-size: 12px; }
.cash-isa-rate { color: #315b45; font-size: 25px; font-weight: 750; }
.cash-isa-rates-table { border-collapse: collapse; min-width: 460px; width: 100%; font-size: 12px; }
.cash-isa-rates-table th, .cash-isa-rates-table td { padding: 7px 11px; border-bottom: 1px solid #dce5da; text-align: right; white-space: nowrap; }
.cash-isa-rates-table th:first-child { text-align: left; }
.cash-isa-rates-table thead th { background: #eaf2e7; color: #315b45; }
.cash-isa-market-panel details .table-scroll, .cash-isa-plan-assumptions .table-scroll { max-height: 320px; overflow: auto; }
.cash-isa-plan-assumptions { margin-top: 20px; padding-top: 16px; border-top: 1px solid #dce5da; }
@media (max-width: 700px) { .cash-isa-market-panel { padding: 12px; } .cash-isa-market-panel .panel-heading { align-items: flex-start; flex-direction: column; } }
.admin-page [hidden] { display: none !important; }
.admin-page > .panel, .admin-page-error, .admin-tabs { grid-column: 1 / -1; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 9px; border-bottom: 1px solid #c8d8c5; }
.admin-tabs button { padding: 9px 13px; border: 1px solid #c8d8c5; border-radius: 6px; background: #f7faf5; color: #315b45; font: inherit; font-size: 12px; cursor: pointer; }
.admin-tabs button[aria-selected="true"] { border-color: #315b45; background: #315b45; color: #fff; }
.admin-tabs button:focus-visible { outline: 2px solid #315b45; outline-offset: 3px; }
.admin-user-versions-table { min-width: 920px; }
.admin-client-version-line { min-height: 24px; white-space: nowrap; }
.admin-page .panel { min-width: 0; }
.admin-page .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-runtime-panel { grid-column: 1 / -1; }
.admin-runtime-actions { display: flex; align-items: center; gap: 10px; }
.admin-runtime-metrics { display: grid; grid-template-columns: repeat(9, minmax(100px, 1fr)); gap: 8px; margin: 16px 0; }
.admin-runtime-metrics > div { display: grid; gap: 4px; min-width: 0; padding: 10px; border: 1px solid #dce5da; border-radius: 8px; background: #f7faf6; }
.admin-runtime-metrics span { color: #718074; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.admin-runtime-metrics strong { color: #315b45; font-size: 16px; white-space: nowrap; }
.runtime-status-good { color: #397348 !important; }
.runtime-status-bad, .runtime-status-error { color: #a33f37 !important; }
.runtime-status-running, .runtime-status-healthy { color: #397348 !important; }
.runtime-status-starting, .runtime-status-active { color: #9a731c !important; }
.admin-runtime-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .8fr); gap: 16px; align-items: start; }
.admin-runtime-diagram { display: grid; grid-template-columns: minmax(130px, 1fr) auto minmax(170px, 1.2fr) auto minmax(130px, 1fr); gap: 8px; align-items: center; padding: 16px; border: 1px solid #dce5da; border-radius: 10px; background: linear-gradient(135deg, #fbfdf9, #eef6ed); }
.runtime-diagram-node { display: grid; gap: 4px; min-height: 64px; padding: 12px; border: 1px solid #a9c5ac; border-radius: 9px; background: #fff; color: #315b45; box-shadow: 0 3px 12px rgb(39 77 57 / 8%); }
.runtime-diagram-node span, .runtime-component-node small { color: #718074; font-size: 10px; line-height: 1.35; }
.runtime-diagram-arrow { color: #728775; font-size: 10px; font-weight: 750; text-align: center; }
.admin-runtime-components { margin-top: 16px; }
.admin-runtime-components h3, .admin-runtime-side-panel h3, .admin-runtime-detail h3, .admin-client-layers h3, .admin-runtime-alerts h3 { margin: 0 0 9px; color: #315b45; font-size: 14px; }
.runtime-component-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.runtime-component-node { display: grid; gap: 4px; min-width: 0; padding: 10px; border: 1px solid #d4e2d2; border-radius: 8px; background: #fff; color: #315b45; font: inherit; text-align: left; cursor: pointer; }
.runtime-component-node:hover, .runtime-component-node:focus-visible, .runtime-component-node.selected { border-color: #67936d; background: #edf6e9; outline: none; box-shadow: 0 0 0 2px rgb(103 147 109 / 16%); }
.runtime-component-node strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runtime-kind { color: #819184; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.runtime-component-status { font-size: 10px; font-weight: 800; text-transform: capitalize; }
.admin-runtime-side-panel, .admin-runtime-detail, .admin-client-layers, .admin-runtime-alerts { padding: 14px; border: 1px solid #dce5da; border-radius: 9px; background: #fbfdf9; }
.runtime-client-list { display: grid; gap: 5px; max-height: 280px; overflow: auto; }
.runtime-client-row { display: grid; gap: 3px; min-width: 0; padding: 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #315b45; font: inherit; text-align: left; cursor: pointer; }
.runtime-client-row:hover, .runtime-client-row:focus-visible, .runtime-client-row.selected { border-color: #bdd3bb; background: #edf6e9; outline: none; }
.runtime-client-row span, .runtime-client-row small { overflow: hidden; color: #718074; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-runtime-detail { grid-column: 1 / -1; margin-top: 16px; }
.runtime-detail-list { display: flex; flex-wrap: wrap; gap: 5px 18px; margin: 8px 0 14px; font-size: 11px; }
.runtime-detail-list dt { color: #718074; font-weight: 750; }
.runtime-detail-list dd { margin: 0; color: #315b45; }
.runtime-flow-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.runtime-flow { display: grid; gap: 4px; padding: 9px; border-left: 3px solid #8fb493; background: #f1f7ef; }
.runtime-flow span, .runtime-flow small { color: #718074; font-size: 10px; line-height: 1.35; }
.admin-client-layers { grid-column: 1 / -1; margin-top: 16px; }
.client-layer-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: #315b45; font-size: 11px; font-weight: 750; }
.client-layer-flow span { padding: 7px 9px; border: 1px solid #c7d9c6; border-radius: 6px; background: #fff; }
.client-layer-flow b { color: #8ba18d; }
.admin-runtime-alerts { grid-column: 1 / -1; margin-top: 16px; }
.admin-users-table tr.selected { background: #edf5ea; }
.admin-users-table button { margin: 0 4px 4px 0; }
.admin-log-scroll { max-height: 440px; }
.admin-log-files-panel { grid-column: 1 / -1; }
.admin-log-files-table { min-width: 760px; }
.admin-log-files-table tr.selected { background: #edf5ea; }
.admin-log-file-viewer { margin-top: 14px; border: 1px solid #dce5da; border-radius: 6px; background: #f7faf6; }
.admin-log-file-viewer-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 11px; border-bottom: 1px solid #dce5da; color: #315b45; }
.admin-log-file-viewer pre { max-height: 520px; margin: 0; padding: 12px; overflow: auto; color: #273e30; font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-forecast-panel { grid-column: 1 / -1; }
.admin-market-data-panel { grid-column: 1 / -1; }
.market-data-review-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 0 10px; }
.market-data-review-heading > div { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-market-data-table { min-width: 900px; }
.admin-market-data-table td:last-child { white-space: normal; line-height: 1.45; }
.market-data-approved-status { margin-top: 16px; }
.market-data-history-heading { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 10px; }
.admin-market-data-history-table { min-width: 760px; }
.market-data-history-values { max-width: 620px; margin-top: 8px; line-height: 1.45; }
.admin-forecast-table th, .admin-forecast-table td { white-space: nowrap; }
@media (max-width: 1000px) { .admin-runtime-metrics { grid-template-columns: repeat(3, minmax(100px, 1fr)); } .admin-runtime-layout { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .forecast-notice { align-items: flex-start; flex-wrap: wrap; } .forecast-notice-action, .forecast-notice-date { margin-left: 0; } .admin-page .panel-heading { align-items: flex-start; flex-direction: column; } .admin-runtime-actions { align-items: flex-start; flex-direction: column; } .admin-runtime-metrics { grid-template-columns: repeat(2, minmax(100px, 1fr)); } .admin-runtime-diagram { grid-template-columns: 1fr; } .runtime-diagram-arrow { transform: rotate(90deg); } .runtime-component-grid { grid-template-columns: 1fr; } }
.conflict-panel { padding: 1.2rem; background: #fff3dc; border-radius: 12px; margin: 1.5rem 0; }
.development-mail { border-top: 1px solid #dce3dc; margin-top: 2rem; padding-top: 1rem; }
.mail-item { border-bottom: 1px solid #dce3dc; padding: .8rem 0; overflow-wrap: anywhere; }

/* Welcome and setup flow */
.welcome-page { min-height: calc(100vh - 150px); margin: 0 -32px -40px; padding: 54px 32px 72px; background: linear-gradient(120deg, rgb(250 253 249 / 94%), rgb(244 249 247 / 74%)), url('/images/sea-hero-v1.png') center / cover; }
.welcome-shell { max-width: 1020px; margin: 0 auto; }
.welcome-heading { max-width: 700px; margin: 20px 0 34px; }
.welcome-heading h1 { max-width: 640px; margin: 0 0 12px; color: #244334; font-size: clamp(24px, 3.5vw, 42px); line-height: 1.03; letter-spacing: -1.05px; }
.welcome-heading .intro { max-width: 560px; color: #52695b; font-size: 16px; line-height: 1.65; }
.welcome-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 760px; }
.welcome-choice { min-height: 230px; padding: 28px; border: 1px solid rgb(208 224 211 / 86%); border-radius: 18px; background: rgb(255 255 255 / 86%); box-shadow: 0 18px 50px rgb(39 77 57 / 10%); backdrop-filter: blur(4px); }
.welcome-choice-primary { background: rgb(234 244 230 / 91%); }
.welcome-choice h2 { margin: 7px 0 9px; color: #244334; font-size: 23px; }
.welcome-choice p:not(.eyebrow) { min-height: 54px; color: #5c7062; font-size: 13px; line-height: 1.65; }
.welcome-choice .primary-button { width: 100%; margin-top: 22px; text-decoration: none; }
.welcome-footnote { margin-top: 18px; color: #52695b; font-size: 12px; }
.setup-wizard-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 20px 0 24px; padding: 0; list-style: none; }
.setup-wizard-steps li button { display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 5px; width: 100%; padding: 5px 2px; border: 0; border-bottom: 2px solid #dfe9dc; background: transparent; color: #819184; font-size: 9px; text-align: left; cursor: pointer; }
.setup-wizard-steps li button:first-letter { font-weight: 800; }
.setup-wizard-steps li.active button { border-color: #315b45; color: #315b45; font-weight: 750; }
.setup-wizard-steps li.complete button { border-color: #a5c99d; color: #54775a; }
.wizard-navigation { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid #edf0e9; }
.wizard-navigation .primary-button { width: auto; min-width: 116px; margin: 0; }
.wizard-navigation .text-button { margin: 0; }
.planner-grid-wizard-open { grid-template-columns: 320px minmax(0, 1fr); }
.comparison-matrix { font-size: 13px; }
.comparison-matrix .matrix-label, .comparison-matrix td { font-size: 13px; }
.comparison-matrix input.grid-value-override-input, .comparison-matrix input.gross-rent-override-input, .comparison-matrix input.mortgage-payment-input { font-size: 13px; }
.new-user-wizard { max-height: calc(100vh - 110px); overflow: auto; }
.wizard-tab-page { box-sizing: border-box; width: 100%; min-width: 0; padding: 24px; }
.new-user-wizard.wizard-tab-page { max-height: none; overflow: visible; }
.wizard-tab-page .new-user-wizard-fields, .setup-wizard-tab form { max-width: 1000px; }
.setup-wizard-tab .scenario-settings { max-width: 1100px; }
.new-user-wizard-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.new-user-wizard-step h3 { margin: 0 0 14px; color: #315b45; }
.new-user-wizard-fields { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(160px, 1.2fr); gap: 9px 12px; align-items: center; }
.new-user-wizard-fields label { color: #3f5548; font-size: 12px; font-weight: 700; }
.new-user-wizard-fields input, .new-user-wizard-fields select, .new-user-wizard-repeater input, .new-user-expense-table input, .new-user-expense-table select { min-width: 0; padding: 7px 8px; border: 1px solid #cad8cb; border-radius: 5px; background: #fff; color: #294335; font: inherit; }
.new-user-wizard-fields .checkbox-label { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.new-user-wizard-fields .checkbox-label input { width: auto; }
.new-user-wizard-repeaters { display: grid; gap: 7px; margin: 12px 0; }
.new-user-wizard-repeater { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 7px; align-items: center; }
.new-user-wizard-pension-fields { margin-top: 20px; }
.new-user-expense-table-wrap { max-height: 490px; overflow: auto; border: 1px solid #dce6dc; border-radius: 7px; }
.new-user-expense-table { width: 100%; min-width: 700px; border-collapse: collapse; font-size: 11px; }
.new-user-expense-table th, .new-user-expense-table td { padding: 6px; border-bottom: 1px solid #e6ece5; text-align: left; vertical-align: middle; }
.new-user-expense-table thead th { position: sticky; top: 0; z-index: 1; background: #edf5e9; color: #355844; }
.new-user-expense-table tbody th { min-width: 110px; color: #355844; }
.new-user-expense-table tbody th span, .new-user-expense-table tbody th small { display: block; }
.new-user-expense-table tbody th small { color: #78907d; font-weight: 500; }
.new-user-expense-table input, .new-user-expense-table select { width: 100%; box-sizing: border-box; padding: 5px; font-size: 11px; }
.new-user-wizard-summary { display: grid; gap: 7px; margin-top: 18px; padding: 13px; border: 1px solid #dbe8d8; border-radius: 7px; background: #f5faf3; color: #4f6655; font-size: 12px; }
@media (max-width: 700px) { .new-user-wizard-repeater { grid-template-columns: 1fr 1fr; } .new-user-wizard-repeater .text-button { grid-column: 1 / -1; justify-self: start; } .new-user-wizard-fields { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .welcome-page { margin: 0 -16px -24px; padding: 34px 16px 48px; } .welcome-choice-grid { grid-template-columns: 1fr; } .planner-grid-wizard-open { grid-template-columns: 1fr; } .setup-wizard-steps { gap: 2px; } .setup-wizard-steps li button span { display: none; } }
@media (max-width: 600px) { .account-action-row { align-items: stretch; flex-direction: column; } .account-action-button { width: 100% !important; } }

.password-entry { display: grid; gap: .4rem; }
.password-options { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .85rem; }
.password-options label { display: inline-flex; gap: .35rem; align-items: center; }
.password-options input { width: auto; }
.password-caps { color: #9b4d00; font-size: .75rem; font-weight: 700; margin-left: .5rem; }
.password-guidance { color: var(--muted, #53635a); font-size: .8rem; }
.password-guidance p { margin: .3rem 0; }

/* An edit is a draft. Only the selected cost remains interactive until its save is acknowledged. */
.lc2-edit-shield { position: fixed; inset: 0; z-index: 1100; background: rgb(30 45 40 / 22%); }
.lc2-edit-active .lc2-edit-row { position: relative; z-index: 1101; background: #fffde6; }
.lc2-edit-active .lc2-edit-row > * { background: #fffde6; }
.lc2-draft-actions { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 100%; flex-wrap: nowrap; white-space: nowrap; }
.lc2-draft-error { display: block; max-width: 20rem; color: #9a230d; white-space: normal; }

.hierarchical-living-costs-page.year-ahead-open > .hierarchical-living-costs-year-ahead { flex-basis: var(--lc2-cashflow-height, 50%); position: relative; }
.hierarchical-year-ahead-toggle { position: relative; z-index: 2; min-height: 28px; }
.cashflow-pane-splitter { flex: 0 0 10px; margin: -9px -16px 0; cursor: ns-resize; touch-action: none; background: linear-gradient(transparent 4px, #9db5a7 4px, #9db5a7 6px, transparent 6px); }
.cashflow-pane-splitter:focus-visible { outline: 2px solid #1b7661; }

.pocket-money-processing { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); z-index:1400; display:flex; align-items:center; gap:.6rem; padding:1rem 1.5rem; border-radius:.6rem; box-shadow:0 4px 22px #0002; background:#e1f1e8; color:#174f3a; font-size:1.4rem; font-weight:600; pointer-events:none; }
.comparison-panel[data-grid-readonly="true"] { opacity:.6; cursor:progress; }
.comparison-panel[data-grid-readonly="true"] .matrix-shift-control, .comparison-panel[data-grid-readonly="true"] .shift-actions-local { visibility:hidden !important; }

.cashflow-detail-trigger { border:0; padding:0; background:transparent; color:inherit; text-align:left; font:inherit; text-decoration:underline; text-decoration-color:#b8cbbf; text-underline-offset:3px; cursor:pointer; }

.living-cost-scope-backdrop { z-index: 1200; }

/* Keep both draft actions inside the row, including narrow viewports. */
.hierarchical-living-costs-entry-row > .hierarchical-living-costs-actions-cell { min-width: 108px; overflow: visible; }
.lc2-draft-actions button { box-sizing: border-box; min-width: 42px; min-height: 0; height: 24px; padding: 2px 4px; line-height: 1; flex-shrink: 0; }

.forecast-horizon-control { position:relative; flex-shrink:0; font-size:12px; }
.forecast-horizon-control summary { cursor:pointer; border:1px solid #d7dfd8; border-radius:4px; padding:5px 7px; white-space:nowrap; }
.forecast-horizon-control[open] label { position:absolute; z-index:30; top:100%; left:0; display:flex; gap:6px; padding:12px; background:white; border:1px solid #ccd7ce; border-radius:5px; box-shadow:0 4px 15px #0002; white-space:nowrap; }
.forecast-horizon-control input { width:60px; }
.matrix-search-controls { flex-wrap:wrap; min-width:0; }
.comparison-heading-tools { flex-wrap:wrap; }
.login-connection-settings { margin:8px 0; }
.login-connection-settings summary { cursor:pointer; font-size:20px; }

.account-rate-schedule { margin-top:12px; padding:10px; border:1px solid #d1ddd3; border-radius:5px; }
.account-rate-period { display:grid; grid-template-columns:1fr 1fr 80px 30px; align-items:end; gap:6px; margin-bottom:8px; }
.account-rate-period label { min-width:0; display:flex; flex-direction:column; gap:3px; }
.account-rate-period input { width:100%; min-width:0; }
.account-editor-modal { max-height:88dvh; overflow-y:auto; }

.lc2-btl-editor { position: relative; z-index: 1101; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px; margin-bottom: 8px; background: #fffde6; }
.lc2-btl-editor label { display: flex; align-items: center; gap: 6px; }
