html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    margin: 0;
    background-color: #FFFFFF !important;
    overflow: hidden;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* Compact Year-by-Year breakdown table */
.yby-table {
    width: 100%;
}

.yby-table .mud-table-cell {
    padding: 2px 4px !important;
    font-size: 0.74rem !important;
    white-space: nowrap !important;
    letter-spacing: -0.1px;
    transition: background-color 0.12s ease-in-out;
}

/* Ensure tooltips never intercept pointer events or trigger hover-leave flicker */
.mud-tooltip {
    pointer-events: none !important;
}

/* Tooltips never extend past the window: endgame.js slides them into view, sideways and up or down. A tooltip can't
   be scrolled (it ignores the mouse), so it never shows a scrollbar: one wider or taller than the window is shown in a
   smaller font until it fits (endgame.js). Overflow stays visible so the arrow, which hangs outside the box, is never
   clipped or mistaken for content that needs scrolling. */
.mud-tooltip.mud-popover {
    max-width: min(26rem, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    overflow: visible;
}

/* A worked calculation keeps its columns lined up, so its tooltip may be as wide as the window. */
.mud-tooltip.mud-popover:has(.eg-calc-tip) {
    max-width: calc(100vw - 16px);
}

/* Calculation tooltips: rows stay as laid out (aligned columns); a sentence wraps at the tooltip's width instead of at
   hand-placed line breaks (docs/RULES.md UX-32). */
.eg-calc-tip {
    text-align: left;
    white-space: pre-wrap;
    max-width: 46rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* A tooltip moved into view no longer lines up with its element, so its arrow is hidden. */
.mud-tooltip.eg-tooltip-shifted::before,
.mud-tooltip.eg-tooltip-shifted::after {
    display: none;
}

/* A hovered cell is highlighted, never enlarged or bolded: a cell that changes size widens its column and makes the
   table jump while its tooltip shows. */
.yby-table tbody .mud-table-cell:hover {
    background-color: rgba(var(--mud-palette-primary-rgb), 0.16) !important;
    position: relative;
    z-index: 1;
    outline: 1px solid var(--mud-palette-primary);
    cursor: default;
}

.yby-table .mud-table-head .mud-table-cell {
    padding: 3px 4px !important;
    font-size: 0.73rem !important;
    white-space: nowrap !important;
}

.yby-table .mud-table-head .mud-table-cell strong {
    font-size: 0.74rem !important;
}

/* Projection summary table */
.proj-summary-table {
    table-layout: fixed;
    width: 100%;
    font-variant-numeric: tabular-nums;
}

.proj-summary-table .mud-table-cell {
    font-size: 0.78rem !important;
    padding: 3px 5px !important;
    font-variant-numeric: tabular-nums;
}

.proj-summary-table .mud-table-head .mud-table-cell {
    font-size: 0.75rem !important;
    padding: 4px 5px !important;
    white-space: nowrap !important;
}

/* The strategy comparison table matches the Summary's balances table: the same type sizes and cell padding. */
.scenario-comparison-table {
    font-variant-numeric: tabular-nums;
}

.scenario-comparison-table .mud-table-cell {
    font-size: 0.78rem !important;
    padding: 3px 5px !important;
    font-variant-numeric: tabular-nums;
}

.scenario-comparison-table .mud-table-head .mud-table-cell {
    font-size: 0.75rem !important;
    padding: 4px 5px !important;
    white-space: nowrap !important;
}

.proj-summary-table tfoot {
    background-color: var(--mud-palette-background-grey) !important;
}

.proj-summary-table tfoot .mud-table-cell {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    padding: 3px 5px !important;
    font-variant-numeric: tabular-nums;
}

.proj-summary-table tfoot .mud-table-cell strong {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
}


/* ==========================================================================
   Header Area - Light Theme
   Background: #CBD5E1 (light slate, a step darker than the #E2E8F0 tab bar), page: #FFFFFF
   ========================================================================== */

/* App Viewport Layout - Constant Header & Tabs, Scrollable Lower Content */
.mud-layout.endgame-layout {
    height: 100vh;
    height: 100dvh;
    min-height: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: #FFFFFF !important;
}

.mud-main-content.endgame-main-content {
    flex: 1 1 0;
    min-height: 0 !important;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 8px 16px !important;
    background-color: #FFFFFF !important;
}

.endgame-page-container {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background-color: #FFFFFF !important;
}

.endgame-header-panel {
    background-color: #CBD5E1 !important;
    flex-shrink: 0;
    --mud-palette-primary: #10B981;
    --mud-palette-primary-rgb: 16,185,129;
    --mud-palette-primary-text: #FFFFFF;
    --mud-palette-primary-darken: #059669;
    --mud-palette-primary-lighten: #34D399;
    --mud-palette-primary-hover: rgba(16,185,129,0.12);
    --mud-palette-secondary: #38BDF8;
    --mud-palette-secondary-rgb: 56,189,248;
    --mud-palette-secondary-text: #FFFFFF;
    --mud-palette-secondary-darken: #0284C7;
    --mud-palette-secondary-lighten: #7DD3FC;
    --mud-palette-secondary-hover: rgba(56,189,248,0.12);
    background: #CBD5E1 !important;
    border: 1px solid #94A3B8 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    color: #334155 !important;
}

.endgame-header-panel hr.mud-divider {
    border-color: rgba(16, 185, 129, 0.22) !important;
}

.endgame-header-panel .mud-typography-subtitle2,
.endgame-header-panel .mud-typography-body2 {
    color: #1E293B !important;
}

.endgame-header-panel .mud-icon-root.mud-primary-text {
    color: #059669 !important;
}

.endgame-header-panel .mud-icon-root.mud-default-text {
    color: #64748B !important;
}

/* File status chips on dark header */
.endgame-header-panel .mud-chip.mud-chip-outlined.mud-chip-color-default {
    border-color: rgba(148, 163, 184, 0.45) !important;
    color: #475569 !important;
    background-color: #FFFFFF !important;
}

.endgame-header-panel .mud-chip.mud-chip-outlined.mud-chip-color-success {
    border-color: rgba(52, 211, 153, 0.55) !important;
    color: #047857 !important;
    background-color: rgba(16, 185, 129, 0.12) !important;
}

.endgame-header-panel .mud-chip.mud-chip-outlined.mud-chip-color-warning {
    border-color: rgba(251, 191, 36, 0.55) !important;
    color: #B45309 !important;
    background-color: rgba(245, 158, 11, 0.12) !important;
}

.endgame-header-panel .mud-chip.mud-chip-outlined.mud-chip-color-info {
    border-color: rgba(56, 189, 248, 0.55) !important;
    color: #0369A1 !important;
    background-color: rgba(2, 132, 199, 0.12) !important;
}

/* Filled primary buttons in the header (Save Model, Save & Exit): deep teal */
.endgame-header-panel .mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, #115E59 0%, #0F766E 100%) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35) !important;
}

.endgame-header-panel .mud-button-filled.mud-button-filled-primary:hover {
    background: linear-gradient(135deg, #134E4A 0%, #115E59 100%) !important;
    box-shadow: 0 4px 16px rgba(15, 118, 110, 0.5) !important;
}

.endgame-header-panel .mud-button-filled.mud-button-filled-primary.mud-button-disabled,
.endgame-header-panel .mud-button-filled.mud-button-filled-primary:disabled {
    opacity: 0.5;
    box-shadow: none !important;
}

/* Plain text buttons in the header (Cancel in the inline panels) */
.endgame-header-panel .mud-button-text {
    color: #475569 !important;
}

.endgame-header-panel .mud-button-text:hover {
    background-color: rgba(15, 23, 42, 0.06) !important;
    color: #0F172A !important;
}

/* Toolbar buttons (Load Model, Save Model, Help, License, Clear, Exit): icon and text in slate, with no fill or box.
   Hover only shows a thin outline, since the tooltip already appears; Clear and Exit outline in red. Save Model, the main action, is a little bolder and darker. */
.endgame-header-panel .mud-button-root.endgame-toolbar-btn {
    color: #334155 !important;
    background-color: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    font-weight: 600 !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.endgame-header-panel .mud-button-root.endgame-toolbar-btn:hover {
    color: #334155 !important;
    background-color: transparent !important;
    border-color: #64748B !important;
}

.endgame-header-panel .mud-button-root.endgame-toolbar-btn-main,
.endgame-header-panel .mud-button-root.endgame-toolbar-btn-main:hover {
    color: #0F172A !important;
    font-weight: 700 !important;
}

.endgame-header-panel .mud-button-root.endgame-toolbar-btn-danger:hover {
    border-color: #DC2626 !important;
}

.endgame-header-panel .mud-button-root.endgame-toolbar-btn.mud-button-disabled,
.endgame-header-panel .mud-button-root.endgame-toolbar-btn:disabled {
    color: #64748B !important;
    border-color: transparent !important;
    opacity: 0.6;
}

/* Thin dividers between the toolbar groups: file, info, and clear/exit */
.endgame-toolbar-divider {
    width: 1px;
    height: 24px;
    background-color: #94A3B8;
    flex-shrink: 0;
}

/* Keyboard focus ring on the toolbar buttons */
.endgame-header-panel .mud-button-root.endgame-toolbar-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.35) !important;
}

/* Keyboard focus ring on header buttons */
.endgame-header-panel .mud-button-root:focus-visible {
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.45) !important;
}

/* Model dropdown & inline inputs on dark header */
.endgame-header-panel .mud-input {
    background-color: #FFFFFF !important;
    border-radius: 8px !important;
}

.endgame-header-panel .mud-input-outlined-border {
    border-color: rgba(148, 163, 184, 0.45) !important;
    border-width: 1.5px !important;
    border-radius: 8px !important;
    background-color: transparent !important;
}

.endgame-header-panel .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #047857 !important;
}

.endgame-header-panel .mud-input-outlined:focus-within .mud-input-outlined-border {
    border-color: #10B981 !important;
    border-width: 2px !important;
}

.endgame-header-panel .mud-input-outlined:focus-within {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
    border-radius: 8px !important;
}

.endgame-header-panel .mud-input-label-outlined {
    color: #64748B !important;
    font-weight: 600 !important;
}

.endgame-header-panel .mud-input-control:focus-within .mud-input-label-outlined {
    color: #047857 !important;
}

.endgame-header-panel .mud-input-slot,
.endgame-header-panel .mud-select .mud-select-input {
    color: #0F172A !important;
    font-weight: 600 !important;
}

.endgame-header-panel .mud-input-slot::placeholder {
    color: #64748B !important;
}

.endgame-header-panel .mud-input-adornment svg,
.endgame-header-panel .mud-select-input-adornment svg {
    color: #64748B !important;
}

/* Inline action panels (Clear / Exit / Open File) on the header */
.endgame-header-panel .border-dashed.mud-border-primary {
    border-color: rgba(16, 185, 129, 0.5) !important;
    background-color: #FFFFFF !important;
    border-radius: 10px !important;
}

.endgame-header-panel .border-dashed.mud-border-warning {
    border-color: rgba(245, 158, 11, 0.55) !important;
    background-color: #FFFFFF !important;
    border-radius: 10px !important;
}

.endgame-header-panel .border-dashed.mud-border-error {
    border-color: rgba(239, 68, 68, 0.55) !important;
    background-color: #FFFFFF !important;
    border-radius: 10px !important;
}


/* ==========================================================================
   Players Tab - Bottom-Aligned Control Row Helper
   Ensures MudCheckBox and outlined MudSelect / MudNumericField controls
   in the Medicare row align flush along their bottom edges.
   ========================================================================== */

.players-tab-container .mud-grid-item.d-flex.align-end .mud-checkbox {
    margin-bottom: 2px !important;
}

/* Players cards: years and months in the first two columns of every row, so they line up; the third holds the row's other field. */
@media (min-width: 600px) {
    .players-aligned-row .players-col-year,
    .players-aligned-row .players-col-month {
        flex: 0 0 31% !important;
        max-width: 31% !important;
    }
    .players-aligned-row .players-col-last {
        flex: 0 0 38% !important;
        max-width: 38% !important;
    }
}

/* ==========================================================================
   MudTabs - Tab Headings ONLY Distinct Thematic Colors
   ========================================================================== */

/* Completely eliminate any ripple effect and expanding circular animations */
.endgame-tabs .mud-ripple-effect,
.endgame-tabs .mud-ripple-ripple {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    animation: none !important;
    transition: none !important;
}

.endgame-tabs {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* clip, not hidden: a hidden box can still be scrolled by script, and at narrow widths the browser scrolled it
       sideways to bring the active tab into view, cutting off the left of the tab row. The tab row scrolls itself. !important beats MudBlazor's .mud-tabs-rounded rule. */
    overflow: clip !important;
    background: #FFFFFF !important;
    border: 2.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    transition: none !important;
}

.endgame-tabs .mud-tabs-tabbar {
    flex-shrink: 0;
    background: #e2e8f0 !important;
    border: none !important;
    border-bottom: 2.5px solid #cbd5e1 !important;
    border-radius: 9px 9px 0 0 !important;
    padding: 6px 12px 0 12px !important;
    position: relative;
    z-index: 2;
    overflow: visible !important;
    transition: none !important;
}

.endgame-tabs .mud-tabs-tabbar-inner,
.endgame-tabs .mud-tabs-tabbar-content,
.endgame-tabs .mud-tabs-tabbar-wrapper {
    overflow: visible !important;
}

.endgame-tabs .mud-tabs-tabbar-inner {
    gap: 6px !important;
    align-items: flex-end !important;
}

/* Tabs size to their label (not MudBlazor's 160px minimum) so all seven fit on one row on a 1280px screen. */
.endgame-tabs .mud-tabs-tabbar .mud-tab,
.endgame-tabs .mud-tabs-tabbar .mud-tab.mud-ripple {
    margin: 0 3px !important;
    border-radius: 8px 8px 0 0 !important;
    min-height: 44px !important;
    min-width: 0 !important;
    padding: 5px 10px !important;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    overflow: visible !important;
    transition: none !important;
}

/* Tab icons at 32px (MudBlazor's default is 24px) so their detail reads: the Analysis king, the Strategies knight and
   arrow. The tabs' padding is tighter (5px 10px) to pay for it, so the row is no wider than with 24px icons. */
.endgame-tabs .mud-tabs-tabbar .mud-tab .mud-icon-root {
    width: 32px;
    height: 32px;
    font-size: 32px;
}

.endgame-tabs .mud-tabs-panels {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    background: #FFFFFF !important;
    border: none !important;
    border-top: none !important;
    border-radius: 0 0 9px 9px !important;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #f1f5f9;
}

.endgame-tabs .mud-tabs-panels::-webkit-scrollbar {
    width: 8px;
}

.endgame-tabs .mud-tabs-panels::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.endgame-tabs .mud-tabs-panels::-webkit-scrollbar-thumb {
    background-color: #94a3b8;
    border-radius: 4px;
}

.endgame-tabs .mud-tabs-panels::-webkit-scrollbar-thumb:hover {
    background-color: #64748b;
}

.endgame-empty-model-panel,
.endgame-empty-plan-panel {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
}

/* Hide default single-color slider completely so it never draws any line */
.endgame-tabs .mud-tab-slider {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* --------------------------------------------------------------------------
   Dynamic Continuous Outline of the Tab Details Container for each Active Tab
   -------------------------------------------------------------------------- */
/* Players Active Theme (Woodbrown) */
.endgame-tabs.eg-active-players,
.endgame-tabs:has(.eg-tab-players.mud-tab-active) {
    border-color: #92400E !important;
}
.endgame-tabs.eg-active-players .mud-tabs-tabbar,
.endgame-tabs:has(.eg-tab-players.mud-tab-active) .mud-tabs-tabbar {
    border-bottom: 2.5px solid #92400E !important;
}

/* Assets Active Theme (Dollar Green) */
.endgame-tabs.eg-active-accounts,
.endgame-tabs:has(.eg-tab-accounts.mud-tab-active) {
    border-color: #15803D !important;
}
.endgame-tabs.eg-active-accounts .mud-tabs-tabbar,
.endgame-tabs:has(.eg-tab-accounts.mud-tab-active) .mud-tabs-tabbar {
    border-bottom: 2.5px solid #15803D !important;
}

/* Scenarios Active Theme (Scenic Light Blue) */
.endgame-tabs.eg-active-strategies,
.endgame-tabs:has(.eg-tab-strategies.mud-tab-active) {
    border-color: #0284C7 !important;
}
.endgame-tabs.eg-active-strategies .mud-tabs-tabbar,
.endgame-tabs:has(.eg-tab-strategies.mud-tab-active) .mud-tabs-tabbar {
    border-bottom: 2.5px solid #0284C7 !important;
}

/* Projections Active Theme (Golden Amber) */
.endgame-tabs.eg-active-analysis,
.endgame-tabs:has(.eg-tab-analysis.mud-tab-active) {
    border-color: #D97706 !important;
}
.endgame-tabs.eg-active-analysis .mud-tabs-tabbar,
.endgame-tabs:has(.eg-tab-analysis.mud-tab-active) .mud-tabs-tabbar {
    border-bottom: 2.5px solid #D97706 !important;
}

/* Active Tab Indicator: seamless merge with tab details page (completely masks baseline underneath) */
.endgame-tabs .mud-tabs-tabbar .mud-tab.mud-tab-active {
    position: relative !important;
    top: 3px !important;
    z-index: 10 !important;
    background: #FFFFFF !important;
    border-bottom: 3.5px solid #FFFFFF !important;
    overflow: visible !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.mud-tab-active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 7px;
    background: #FFFFFF !important;
    z-index: 20 !important;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Tab 1: HOUSEHOLD - Woodbrown (#92400E)
   -------------------------------------------------------------------------- */
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-players {
    color: #92400E !important;
    font-weight: 700 !important;
    background: #fdf8f3 !important;
    border: 1.5px solid rgba(146, 64, 14, 0.35) !important;
    border-bottom: none !important;
    position: relative;
    z-index: 1;
    transition: none !important;
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-players svg {
    color: #92400E !important;
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-players:hover {
    background: #f7e8d6 !important;
    border-color: rgba(146, 64, 14, 0.6) !important;
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-players.mud-tab-active {
    color: #78350F !important;
    font-weight: 800 !important;
    background: #FFFFFF !important;
    border: 2.5px solid #92400E !important;
    border-bottom: 3.5px solid #FFFFFF !important;
    box-shadow: 0 -3px 8px rgba(146, 64, 14, 0.15) !important;
}

/* --------------------------------------------------------------------------
   Tab 2: ASSETS - Rich Dollar Green (#15803D)
   -------------------------------------------------------------------------- */
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-accounts {
    color: #15803D !important;
    font-weight: 700 !important;
    background: #f0fdf4 !important;
    border: 1.5px solid rgba(21, 128, 61, 0.35) !important;
    border-bottom: none !important;
    position: relative;
    z-index: 1;
    transition: none !important;
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-accounts svg {
    color: #15803D !important;
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-accounts:hover {
    background: #dcfce7 !important;
    border-color: rgba(21, 128, 61, 0.6) !important;
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-accounts.mud-tab-active {
    color: #14532D !important;
    font-weight: 800 !important;
    background: #FFFFFF !important;
    border: 2.5px solid #15803D !important;
    border-bottom: 3.5px solid #FFFFFF !important;
    box-shadow: 0 -3px 8px rgba(21, 128, 61, 0.15) !important;
}

/* --------------------------------------------------------------------------
   Tab 3: SCENARIOS - Light Blue (#0284C7)
   -------------------------------------------------------------------------- */
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-strategies {
    color: #0284C7 !important;
    font-weight: 700 !important;
    background: #f0f9ff !important;
    border: 1.5px solid rgba(2, 132, 199, 0.35) !important;
    border-bottom: none !important;
    position: relative;
    z-index: 1;
    transition: none !important;
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-strategies svg {
    color: #0284C7 !important;
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-strategies:hover {
    background: #e0f2fe !important;
    border-color: rgba(2, 132, 199, 0.6) !important;
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-strategies.mud-tab-active {
    color: #0369A1 !important;
    font-weight: 800 !important;
    background: #FFFFFF !important;
    border: 2.5px solid #0284C7 !important;
    border-bottom: 3.5px solid #FFFFFF !important;
    box-shadow: 0 -3px 8px rgba(2, 132, 199, 0.15) !important;
}

/* --------------------------------------------------------------------------
   Tab 4: PROJECTIONS - Golden Amber (#D97706 / #B45309)
   Clear, solid, bold text with radiating light beam cone behind it
   -------------------------------------------------------------------------- */
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-analysis {
    position: relative;
    overflow: visible !important;
    color: #B45309 !important;
    font-weight: 700 !important;
    background: #fffbeb !important;
    border: 1.5px solid rgba(217, 119, 6, 0.35) !important;
    border-bottom: none !important;
    z-index: 1;
    transition: none !important;
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-analysis svg {
    color: #D97706 !important;
    filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.6));
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-analysis:hover {
    background: #fef3c7 !important;
    border-color: rgba(217, 119, 6, 0.6) !important;
}
/* The projected beam (cone of light radiating from the icon side behind text) */
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-analysis::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.45) 0%, rgba(253, 224, 71, 0.22) 45%, rgba(254, 249, 195, 0.08) 85%, rgba(255, 251, 235, 0) 100%);
    clip-path: polygon(0 42%, 100% 0, 100% 100%, 0 58%);
    opacity: 0.5;
    transition: none !important;
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-analysis:hover::before {
    opacity: 0.8;
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-analysis.mud-tab-active {
    color: #78350F !important;
    font-weight: 800 !important;
    background: #FFFFFF !important;
    border: 2.5px solid #D97706 !important;
    border-bottom: 3.5px solid #FFFFFF !important;
    box-shadow: 0 -3px 8px rgba(217, 119, 6, 0.15) !important;
}
.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-analysis.mud-tab-active::before {
    opacity: 0.35;
}


/* ==========================================================================
   TAB 1: HOUSEHOLD - Complete Woodbrown Color Schema (Woodhome)
   (Clean white card fill, woodbrown section headings, woodbrown control outlines)
   ========================================================================== */

.players-tab-container {
    padding: 4px 0;
}

/* Cards & Surface styling */
.players-tab-container .mud-card,
.mud-tabs-panels .players-tab-container .mud-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(146, 64, 14, 0.35) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(146, 64, 14, 0.05) !important;
    transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.players-tab-container .mud-card:hover,
.mud-tabs-panels .players-tab-container .mud-card:hover {
    border-color: #92400E !important;
    box-shadow: 0 4px 12px rgba(146, 64, 14, 0.1) !important;
}

/* Card Headers & Section Banners */
.players-tab-container .mud-card-header,
.mud-tabs-panels .players-tab-container .mud-card-header {
    background: linear-gradient(135deg, rgba(146, 64, 14, 0.12) 0%, rgba(180, 83, 9, 0.04) 100%) !important;
    border: 1px solid rgba(146, 64, 14, 0.25) !important;
    border-radius: 10px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    margin-bottom: 8px !important;
}

.players-tab-container .mud-card-header .mud-typography,
.mud-tabs-panels .players-tab-container .mud-card-header .mud-typography {
    color: #78350F !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
}

/* Control Boxes & Outlined Borders */
.players-tab-container .mud-input-outlined-border,
.mud-tabs-panels .players-tab-container .mud-input-outlined-border {
    border-color: #92400E !important;
    border-width: 1.5px !important;
    border-radius: 8px !important;
    background-color: transparent !important; /* fieldset overlays the input; an opaque fill hides typed/selected values */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.players-tab-container .mud-input-outlined:hover .mud-input-outlined-border,
.mud-tabs-panels .players-tab-container .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #78350F !important;
}

.players-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border,
.players-tab-container .mud-input-control:focus-within .mud-input-outlined-border,
.mud-tabs-panels .players-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border,
.mud-tabs-panels .players-tab-container .mud-input-control:focus-within .mud-input-outlined-border {
    border-color: #713F12 !important;
    border-width: 2px !important;
}

.players-tab-container .mud-input-outlined:focus-within,
.mud-tabs-panels .players-tab-container .mud-input-outlined:focus-within {
    box-shadow: 0 0 0 3px rgba(146, 64, 14, 0.2) !important;
    border-radius: 8px !important;
}

/* Control Labels & Shrunk Notch Labels */
.players-tab-container .mud-input-label-outlined,
.mud-tabs-panels .players-tab-container .mud-input-label-outlined {
    color: #92400E !important;
    font-weight: 600 !important;
}

.players-tab-container .mud-input-control:focus-within .mud-input-label-outlined,
.mud-tabs-panels .players-tab-container .mud-input-control:focus-within .mud-input-label-outlined {
    color: #78350F !important;
    font-weight: 700 !important;
}

/* Input Text & Select Elements */
.players-tab-container .mud-input-slot,
.mud-tabs-panels .players-tab-container .mud-input-slot {
    color: #0F172A !important;
    font-weight: 500 !important;
}

.players-tab-container .mud-select .mud-select-input,
.mud-tabs-panels .players-tab-container .mud-select .mud-select-input {
    color: #0F172A !important;
    font-weight: 500 !important;
}

/* Icons & Adornments */
.players-tab-container .mud-input-adornment svg,
.players-tab-container .mud-select-input-adornment svg,
.mud-tabs-panels .players-tab-container .mud-input-adornment svg,
.mud-tabs-panels .players-tab-container .mud-select-input-adornment svg {
    color: #92400E !important;
}

/* Helper Text */
.players-tab-container .mud-input-helper-text,
.mud-tabs-panels .players-tab-container .mud-input-helper-text {
    color: #92400E !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
}

/* Checkbox & Text */
.players-tab-container .mud-checkbox .mud-typography,
.players-tab-container .mud-checkbox .mud-checkbox-text,
.mud-tabs-panels .players-tab-container .mud-checkbox .mud-typography,
.mud-tabs-panels .players-tab-container .mud-checkbox .mud-checkbox-text {
    color: #78350F !important;
    font-weight: 600 !important;
}

.players-tab-container .mud-checkbox svg,
.mud-tabs-panels .players-tab-container .mud-checkbox svg {
    color: #92400E !important;
    fill: currentColor !important;
}

.players-tab-container .mud-checkbox.mud-checked svg,
.players-tab-container .mud-checkbox:has(.mud-checkbox-true) svg,
.mud-tabs-panels .players-tab-container .mud-checkbox.mud-checked svg,
.mud-tabs-panels .players-tab-container .mud-checkbox:has(.mud-checkbox-true) svg {
    color: #92400E !important;
    fill: currentColor !important;
}


/* ==========================================================================
   TAB 2: ASSETS - Complete Dollar Green Color Schema
   (Clean white card fill, dollar green section headings, dollar green control outlines)
   ========================================================================== */

.accounts-tab-container {
    padding: 4px 0;
}

/* Cards & Surface styling */
.accounts-tab-container .mud-card,
.mud-tabs-panels .accounts-tab-container .mud-card {
    background: #FFFFFF !important;
    border: 1.5px solid #15803D !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(21, 128, 61, 0.1) !important;
    transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.accounts-tab-container .mud-card:hover,
.mud-tabs-panels .accounts-tab-container .mud-card:hover {
    border-color: #14532D !important;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.16) !important;
}

/* Add / Edit Asset Panel */
.accounts-tab-container .border-dashed {
    border-color: #15803D !important;
    background: #FFFFFF !important;
    border-radius: 12px !important;
}

.accounts-tab-container .mud-card-header,
.mud-tabs-panels .accounts-tab-container .mud-card-header {
    background: linear-gradient(135deg, rgba(21, 128, 61, 0.24) 0%, rgba(22, 163, 74, 0.12) 100%) !important;
    border: 1.5px solid #15803D !important;
    border-radius: 10px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    margin-bottom: 8px !important;
}

.accounts-tab-container .mud-card-header .mud-typography,
.mud-tabs-panels .accounts-tab-container .mud-card-header .mud-typography {
    color: #14532D !important;
    font-weight: 700 !important;
}

/* Subheadings (e.g. Annual Yield, Edit Asset title) */
.accounts-tab-container .mud-typography-subtitle1,
.accounts-tab-container .mud-typography-subtitle2 {
    color: #14532D !important;
    font-weight: 700 !important;
}

/* Control Outlines */
.accounts-tab-container .mud-input-outlined-border,
.mud-tabs-panels .accounts-tab-container .mud-input-outlined-border {
    border-color: #15803D !important;
    border-width: 1.5px !important;
    border-radius: 8px !important;
    background-color: transparent !important; /* fieldset overlays the input; an opaque fill hides typed/selected values */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.accounts-tab-container .mud-input-outlined:hover .mud-input-outlined-border,
.mud-tabs-panels .accounts-tab-container .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #166534 !important;
}

.accounts-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border,
.accounts-tab-container .mud-input-control:focus-within .mud-input-outlined-border,
.mud-tabs-panels .accounts-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border,
.mud-tabs-panels .accounts-tab-container .mud-input-control:focus-within .mud-input-outlined-border {
    border-color: #14532D !important;
    border-width: 2px !important;
}

.accounts-tab-container .mud-input-outlined:focus-within,
.mud-tabs-panels .accounts-tab-container .mud-input-outlined:focus-within {
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.2) !important;
    border-radius: 8px !important;
}

/* Control Labels */
.accounts-tab-container .mud-input-label-outlined,
.mud-tabs-panels .accounts-tab-container .mud-input-label-outlined {
    color: #15803D !important;
    font-weight: 600 !important;
}

.accounts-tab-container .mud-input-control:focus-within .mud-input-label-outlined,
.mud-tabs-panels .accounts-tab-container .mud-input-control:focus-within .mud-input-label-outlined {
    color: #14532D !important;
    font-weight: 700 !important;
}

.accounts-tab-container .mud-input-slot,
.mud-tabs-panels .accounts-tab-container .mud-input-slot {
    color: #0F172A !important;
    font-weight: 500 !important;
}

.accounts-tab-container .mud-select .mud-select-input,
.mud-tabs-panels .accounts-tab-container .mud-select .mud-select-input {
    color: #0F172A !important;
    font-weight: 500 !important;
}

.accounts-tab-container .mud-input-adornment svg,
.accounts-tab-container .mud-select-input-adornment svg,
.mud-tabs-panels .accounts-tab-container .mud-input-adornment svg,
.mud-tabs-panels .accounts-tab-container .mud-select-input-adornment svg {
    color: #15803D !important;
}

.accounts-tab-container .mud-input-helper-text,
.mud-tabs-panels .accounts-tab-container .mud-input-helper-text {
    color: #15803D !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
}

/* Action Buttons in Assets */
.accounts-tab-container .mud-button-filled.mud-button-filled-primary,
.mud-tabs-panels .accounts-tab-container .mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, #15803D 0%, #16A34A 100%) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(21, 128, 61, 0.3) !important;
}

/* Assets Table Head & Borders */
.accounts-tab-container .mud-table,
.mud-tabs-panels .accounts-tab-container .mud-table {
    border: 2px solid #15803D !important;
    border-radius: 10px !important;
    overflow: hidden;
    background: #FFFFFF !important;
    box-shadow: 0 2px 10px rgba(21, 128, 61, 0.12) !important;
}

.accounts-tab-container .mud-table-head .mud-table-cell,
.mud-tabs-panels .accounts-tab-container .mud-table-head .mud-table-cell {
    background: linear-gradient(180deg, rgba(21, 128, 61, 0.30) 0%, rgba(22, 163, 74, 0.20) 100%) !important;
    color: #14532D !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #15803D !important;
}

.accounts-tab-container .mud-table-body .mud-table-cell,
.mud-tabs-panels .accounts-tab-container .mud-table-body .mud-table-cell {
    border-bottom: 1px solid rgba(21, 128, 61, 0.22) !important;
}


/* ==========================================================================
   Dropdown / Popover Styling
   ========================================================================== */

.players-popover .mud-list-item-clickable:hover {
    background-color: #FEF3C7 !important;
    color: #78350F !important;
}

.players-popover .mud-selected-item {
    background-color: #FDE68A !important;
    color: #78350F !important;
    font-weight: 700 !important;
}

.mud-popover .mud-list-item-clickable:hover {
    background-color: #F1F5F9 !important;
    color: #1E293B !important;
}

.mud-popover .mud-selected-item {
    background-color: #FEF3C7 !important;
    color: #78350F !important;
    font-weight: 700 !important;
}

/* ==========================================================================
   Per-Tab MudBlazor Palette Scoping
   (Re-points the theme's primary color inside each tab so every component using
   Color.Primary - chips, icon buttons, selected rows, inline var(--mud-palette-primary)
   styles - automatically adopts that tab's color scheme.)
   ========================================================================== */

.players-tab-container {
    --mud-palette-primary: #92400E;
    --mud-palette-primary-rgb: 146,64,14;
    --mud-palette-primary-text: #FFFFFF;
    --mud-palette-primary-darken: #78350F;
    --mud-palette-primary-lighten: #B45309;
    --mud-palette-primary-hover: rgba(146,64,14,0.06);
}

.accounts-tab-container {
    --mud-palette-primary: #15803D;
    --mud-palette-primary-rgb: 21,128,61;
    --mud-palette-primary-text: #FFFFFF;
    --mud-palette-primary-darken: #14532D;
    --mud-palette-primary-lighten: #16A34A;
    --mud-palette-primary-hover: rgba(21,128,61,0.06);
}

.strategies-tab-container {
    --mud-palette-primary: #0284C7;
    --mud-palette-primary-rgb: 2,132,199;
    --mud-palette-primary-text: #FFFFFF;
    --mud-palette-primary-darken: #0369A1;
    --mud-palette-primary-lighten: #38BDF8;
    --mud-palette-primary-hover: rgba(2,132,199,0.06);
}

.analysis-tab-container {
    --mud-palette-primary: #D97706;
    --mud-palette-primary-rgb: 217,119,6;
    --mud-palette-primary-text: #FFFFFF;
    --mud-palette-primary-darken: #B45309;
    --mud-palette-primary-lighten: #F59E0B;
    --mud-palette-primary-hover: rgba(217,119,6,0.06);
}

/* Assets: input values in deep dollar green */
.mud-tabs-panels .accounts-tab-container .mud-input-slot,
.mud-tabs-panels .accounts-tab-container .mud-select .mud-select-input {
    color: #14532D !important;
    font-weight: 600 !important;
}

.mud-tabs-panels .accounts-tab-container .mud-checkbox .mud-typography,
.mud-tabs-panels .accounts-tab-container .mud-checkbox .mud-checkbox-text {
    color: #14532D !important;
    font-weight: 600 !important;
}

.mud-tabs-panels .accounts-tab-container .mud-checkbox svg {
    color: #15803D !important;
    fill: currentColor !important;
}

.mud-tabs-panels .accounts-tab-container .mud-button-outlined.mud-button-outlined-primary {
    border-color: #15803D !important;
    color: #15803D !important;
    font-weight: 600 !important;
}

.mud-tabs-panels .accounts-tab-container .mud-button-outlined.mud-button-outlined-primary:hover {
    background-color: rgba(21, 128, 61, 0.08) !important;
}


/* ==========================================================================
   TAB 3: SCENARIOS - Complete Morning Light Blue Color Schema (Scenic Landscape)
   (Clean white card fill, morning-sky section headings, light blue control outlines)
   ========================================================================== */

.strategies-tab-container {
    padding: 4px 0;
}

/* Cards & Surface styling */
.mud-tabs-panels .strategies-tab-container .mud-card,
.mud-tabs-panels .strategies-tab-container .mud-paper {
    background: #FFFFFF !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.05) !important;
}

.mud-tabs-panels .strategies-tab-container .mud-card:hover,
.mud-tabs-panels .strategies-tab-container .mud-paper:hover {
    border-color: #0284C7 !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12) !important;
}


/* Card Headers & Section Banners (morning sky) */
.mud-tabs-panels .strategies-tab-container .mud-card-header {
    background: linear-gradient(180deg, rgba(186, 230, 253, 0.55) 0%, rgba(224, 242, 254, 0.2) 100%) !important;
    border: 1px solid rgba(2, 132, 199, 0.25) !important;
    border-radius: 10px !important;
    margin-bottom: 8px !important;
}

.mud-tabs-panels .strategies-tab-container .mud-card-header .mud-typography,
.mud-tabs-panels .strategies-tab-container .mud-typography-subtitle1,
.mud-tabs-panels .strategies-tab-container .mud-typography-subtitle2 {
    color: #075985 !important;
    font-weight: 700 !important;
}

/* Control Outlines */
.mud-tabs-panels .strategies-tab-container .mud-input-outlined-border {
    border-color: #0284C7 !important;
    border-width: 1.5px !important;
    border-radius: 8px !important;
    background-color: transparent !important;
}

.mud-tabs-panels .strategies-tab-container .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #0369A1 !important;
}

.mud-tabs-panels .strategies-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border {
    border-color: #075985 !important;
    border-width: 2px !important;
}

.mud-tabs-panels .strategies-tab-container .mud-input-outlined:focus-within {
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2) !important;
    border-radius: 8px !important;
}

/* Control Labels */
.mud-tabs-panels .strategies-tab-container .mud-input-label-outlined {
    color: #0284C7 !important;
    font-weight: 600 !important;
}

.mud-tabs-panels .strategies-tab-container .mud-input-control:focus-within .mud-input-label-outlined {
    color: #075985 !important;
    font-weight: 700 !important;
}

/* Input Values */
.mud-tabs-panels .strategies-tab-container .mud-input-slot,
.mud-tabs-panels .strategies-tab-container .mud-select .mud-select-input {
    color: #0C4A6E !important;
    font-weight: 600 !important;
}

/* Icons, Adornments & Helper Text */
.mud-tabs-panels .strategies-tab-container .mud-input-adornment svg,
.mud-tabs-panels .strategies-tab-container .mud-select-input-adornment svg {
    color: #0284C7 !important;
}

.mud-tabs-panels .strategies-tab-container .mud-input-helper-text {
    color: #0369A1 !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
}

/* Checkboxes */
.mud-tabs-panels .strategies-tab-container .mud-checkbox .mud-typography,
.mud-tabs-panels .strategies-tab-container .mud-checkbox .mud-checkbox-text {
    color: #075985 !important;
    font-weight: 600 !important;
}

.mud-tabs-panels .strategies-tab-container .mud-checkbox svg {
    color: #0284C7 !important;
    fill: currentColor !important;
}

/* Buttons */
.mud-tabs-panels .strategies-tab-container .mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, #0369A1 0%, #38BDF8 100%) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3) !important;
}

.mud-tabs-panels .strategies-tab-container .mud-button-outlined.mud-button-outlined-primary {
    border-color: #0284C7 !important;
    color: #0369A1 !important;
    font-weight: 600 !important;
}

.mud-tabs-panels .strategies-tab-container .mud-button-outlined.mud-button-outlined-primary:hover {
    background-color: rgba(2, 132, 199, 0.08) !important;
}

.mud-tabs-panels .strategies-tab-container .mud-button-text.mud-button-text-primary {
    color: #0369A1 !important;
}

/* Tables */
.mud-tabs-panels .strategies-tab-container .mud-table {
    border: 1px solid rgba(2, 132, 199, 0.25) !important;
}

.mud-tabs-panels .strategies-tab-container .mud-table-head .mud-table-cell {
    background-color: rgba(2, 132, 199, 0.08) !important;
    color: #075985 !important;
}


/* ==========================================================================
   TAB 4: PROJECTIONS - Projected Light Beam Color Schema
   (Clean white card fill, beam-of-light section headings radiating from the left,
   amber-gold control outlines)
   ========================================================================== */

/* No top padding: the tab panel's own 16px is the space above the breadcrumb. */
.analysis-tab-container {
    padding: 0 0 4px;
}

/* Cards & Surface styling */
.mud-tabs-panels .analysis-tab-container .mud-card,
.mud-tabs-panels .analysis-tab-container .mud-paper {
    background: #FFFFFF !important;
    border: 1px solid rgba(217, 119, 6, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.1) !important;
}

.mud-tabs-panels .analysis-tab-container .mud-card:hover,
.mud-tabs-panels .analysis-tab-container .mud-paper:hover {
    border-color: #F59E0B !important;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.22) !important;
}

/* Card Headers - beam of light projecting from the left edge */
.mud-tabs-panels .analysis-tab-container .mud-card-header {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.32) 0%, rgba(253, 224, 71, 0.16) 40%, rgba(254, 249, 195, 0.06) 75%, rgba(255, 255, 255, 0) 100%) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    border-radius: 10px !important;
    margin-bottom: 8px !important;
}

.mud-tabs-panels .analysis-tab-container .mud-card-header .mud-typography,
.mud-tabs-panels .analysis-tab-container .mud-typography-subtitle1,
.mud-tabs-panels .analysis-tab-container .mud-typography-h6 {
    color: #92400E !important;
    font-weight: 700 !important;
}

/* Control Outlines */
.mud-tabs-panels .analysis-tab-container .mud-input-outlined-border {
    border-color: #D97706 !important;
    border-width: 1.5px !important;
    border-radius: 8px !important;
    background-color: transparent !important;
}

.mud-tabs-panels .analysis-tab-container .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #B45309 !important;
}

.mud-tabs-panels .analysis-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border {
    border-color: #92400E !important;
    border-width: 2px !important;
}

.mud-tabs-panels .analysis-tab-container .mud-input-outlined:focus-within {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3) !important;
    border-radius: 8px !important;
}

/* Control Labels & Values */
.mud-tabs-panels .analysis-tab-container .mud-input-label-outlined {
    color: #B45309 !important;
    font-weight: 600 !important;
}

.mud-tabs-panels .analysis-tab-container .mud-input-control:focus-within .mud-input-label-outlined {
    color: #92400E !important;
    font-weight: 700 !important;
}

.mud-tabs-panels .analysis-tab-container .mud-input-slot,
.mud-tabs-panels .analysis-tab-container .mud-select .mud-select-input {
    color: #78350F !important;
    font-weight: 600 !important;
}

.mud-tabs-panels .analysis-tab-container .mud-input-adornment svg,
.mud-tabs-panels .analysis-tab-container .mud-select-input-adornment svg {
    color: #D97706 !important;
}

.mud-tabs-panels .analysis-tab-container .mud-input-helper-text {
    color: #B45309 !important;
}

.mud-tabs-panels .analysis-tab-container .mud-checkbox .mud-typography,
.mud-tabs-panels .analysis-tab-container .mud-checkbox .mud-checkbox-text {
    color: #92400E !important;
    font-weight: 600 !important;
}

.mud-tabs-panels .analysis-tab-container .mud-checkbox svg {
    color: #D97706 !important;
    fill: currentColor !important;
}

/* Buttons - glowing beam */
.mud-tabs-panels .analysis-tab-container .mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(100deg, #B45309 0%, #F59E0B 55%, #FCD34D 100%) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.45) !important;
}

.mud-tabs-panels .analysis-tab-container .mud-button-outlined.mud-button-outlined-primary {
    border-color: #D97706 !important;
    color: #B45309 !important;
    font-weight: 600 !important;
}

.mud-tabs-panels .analysis-tab-container .mud-button-outlined.mud-button-outlined-primary:hover {
    background-color: rgba(251, 191, 36, 0.12) !important;
}

/* Tables - header row lit by the beam */
.mud-tabs-panels .analysis-tab-container .mud-table {
    border: 1px solid rgba(217, 119, 6, 0.25) !important;
}

.mud-tabs-panels .analysis-tab-container .mud-table-head .mud-table-cell {
    background: linear-gradient(180deg, rgba(253, 224, 71, 0.22) 0%, rgba(254, 243, 199, 0.35) 100%) !important;
    color: #92400E !important;
}

.mud-tabs-panels .analysis-tab-container .mud-table-head .mud-table-cell .mud-icon-root {
    color: #D97706 !important;
}

/* ==========================================================================
   Disabled Control Visual Indication (Washed-Out Hue per Tab & Header)
   Analogous to Black -> Grey, each control's own color (woodbrown, dollar green,
   morning light blue, projected amber, or header graphite/warning/error) fades
   to a washed-out tint of that same hue when disabled, with a clean white box.
   ========================================================================== */

/* Base disabled cursor & clean background (no grey fill, no dashed border) */
.endgame-header-panel .mud-input.mud-disabled,
.mud-tabs-panels .mud-input.mud-disabled {
    background-color: transparent !important;
    cursor: default !important;
}

.endgame-header-panel .mud-input.mud-disabled .mud-input-outlined-border,
.mud-tabs-panels .mud-input.mud-disabled .mud-input-outlined-border {
    border-style: solid !important;
    border-width: 1px !important;
    background-color: transparent !important;
}

.endgame-header-panel .mud-input.mud-disabled .mud-input-slot,
.endgame-header-panel .mud-select:has(.mud-disabled) .mud-select-input,
.mud-tabs-panels .mud-input.mud-disabled .mud-input-slot,
.mud-tabs-panels .mud-select:has(.mud-disabled) .mud-select-input {
    cursor: default !important;
}

/* --------------------------------------------------------------------------
   1. HEADER PANEL (Dark Navy Theme) - Washed-Out Emerald/Sky/Amber/Rose
   -------------------------------------------------------------------------- */
.endgame-header-panel .mud-input.mud-disabled {
    background-color: rgba(15, 23, 42, 0.4) !important;
}

.endgame-header-panel .mud-input.mud-disabled .mud-input-outlined-border {
    border-color: rgba(148, 163, 184, 0.22) !important;
}

.endgame-header-panel .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.endgame-header-panel .mud-input-label-outlined.mud-disabled,
.endgame-header-panel .mud-input.mud-disabled .mud-input-slot,
.endgame-header-panel .mud-select:has(.mud-disabled) .mud-select-input,
.endgame-header-panel .mud-input.mud-disabled .mud-input-adornment svg,
.endgame-header-panel .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.endgame-header-panel .mud-input-control:has(.mud-disabled) .mud-input-helper-text {
    color: rgba(148, 163, 184, 0.38) !important;
    -webkit-text-fill-color: rgba(148, 163, 184, 0.38) !important;
}

.endgame-header-panel .mud-button-filled.mud-button-filled-primary:disabled,
.endgame-header-panel .mud-button-filled.mud-button-filled-primary.mud-disabled {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.32) 0%, rgba(16, 185, 129, 0.32) 100%) !important;
    color: rgba(226, 232, 240, 0.45) !important;
    box-shadow: none !important;
}

.endgame-header-panel .mud-button-outlined.mud-button-outlined-primary:disabled,
.endgame-header-panel .mud-button-outlined.mud-button-outlined-primary.mud-disabled {
    background-color: rgba(15, 23, 42, 0.3) !important;
    border-color: rgba(52, 211, 153, 0.22) !important;
    color: rgba(226, 232, 240, 0.35) !important;
    box-shadow: none !important;
}

.endgame-header-panel .mud-button-outlined.mud-button-outlined-secondary:disabled,
.endgame-header-panel .mud-button-outlined.mud-button-outlined-secondary.mud-disabled {
    background-color: rgba(15, 23, 42, 0.3) !important;
    border-color: rgba(56, 189, 248, 0.22) !important;
    color: rgba(125, 211, 252, 0.35) !important;
    box-shadow: none !important;
}

.endgame-header-panel .mud-button-outlined.mud-button-outlined-warning:disabled,
.endgame-header-panel .mud-button-outlined.mud-button-outlined-warning.mud-disabled {
    background-color: rgba(15, 23, 42, 0.3) !important;
    border-color: rgba(251, 191, 36, 0.22) !important;
    color: rgba(251, 191, 36, 0.35) !important;
    box-shadow: none !important;
}

.endgame-header-panel .mud-button-outlined.mud-button-outlined-error:disabled,
.endgame-header-panel .mud-button-outlined.mud-button-outlined-error.mud-disabled {
    background-color: rgba(15, 23, 42, 0.3) !important;
    border-color: rgba(248, 113, 113, 0.22) !important;
    color: rgba(252, 165, 165, 0.35) !important;
    box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   2. TAB 1: HOUSEHOLD - Washed-Out Woodbrown (#92400E -> soft tan/woodbrown)
   -------------------------------------------------------------------------- */
.players-tab-container .mud-input.mud-disabled .mud-input-outlined-border,
.mud-tabs-panels .players-tab-container .mud-input.mud-disabled .mud-input-outlined-border {
    border-color: rgba(146, 64, 14, 0.35) !important;
}

.players-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.players-tab-container .mud-input-label-outlined.mud-disabled,
.players-tab-container .mud-input.mud-disabled .mud-input-slot,
.players-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.players-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.players-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.players-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text,
.mud-tabs-panels .players-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.mud-tabs-panels .players-tab-container .mud-input.mud-disabled .mud-input-slot,
.mud-tabs-panels .players-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.mud-tabs-panels .players-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.mud-tabs-panels .players-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.mud-tabs-panels .players-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text {
    color: rgba(146, 64, 14, 0.42) !important;
    -webkit-text-fill-color: rgba(146, 64, 14, 0.42) !important;
}

.players-tab-container .mud-checkbox:has(.mud-disabled) .mud-typography,
.players-tab-container .mud-checkbox:has(.mud-disabled) .mud-checkbox-text,
.players-tab-container .mud-checkbox:has(.mud-disabled) svg {
    color: rgba(146, 64, 14, 0.42) !important;
}

/* --------------------------------------------------------------------------
   3. TAB 2: ASSETS - Washed-Out Dollar Green (#15803D -> soft sage/mint green)
   -------------------------------------------------------------------------- */
.accounts-tab-container .mud-input.mud-disabled .mud-input-outlined-border,
.mud-tabs-panels .accounts-tab-container .mud-input.mud-disabled .mud-input-outlined-border {
    border-color: rgba(21, 128, 61, 0.35) !important;
}

.accounts-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.accounts-tab-container .mud-input-label-outlined.mud-disabled,
.accounts-tab-container .mud-input.mud-disabled .mud-input-slot,
.accounts-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.accounts-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.accounts-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.accounts-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text,
.mud-tabs-panels .accounts-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.mud-tabs-panels .accounts-tab-container .mud-input.mud-disabled .mud-input-slot,
.mud-tabs-panels .accounts-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.mud-tabs-panels .accounts-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.mud-tabs-panels .accounts-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.mud-tabs-panels .accounts-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text {
    color: rgba(21, 128, 61, 0.42) !important;
    -webkit-text-fill-color: rgba(21, 128, 61, 0.42) !important;
}

.accounts-tab-container .mud-button-filled.mud-button-filled-primary:disabled,
.mud-tabs-panels .accounts-tab-container .mud-button-filled.mud-button-filled-primary:disabled {
    background: linear-gradient(135deg, rgba(21, 128, 61, 0.36) 0%, rgba(22, 163, 74, 0.36) 100%) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: none !important;
}

.accounts-tab-container .mud-button-outlined.mud-button-outlined-primary:disabled,
.mud-tabs-panels .accounts-tab-container .mud-button-outlined.mud-button-outlined-primary:disabled {
    background-color: transparent !important;
    border-color: rgba(21, 128, 61, 0.35) !important;
    color: rgba(21, 128, 61, 0.42) !important;
    box-shadow: none !important;
}

.accounts-tab-container .mud-icon-button:disabled,
.accounts-tab-container .mud-icon-button:disabled svg {
    color: rgba(21, 128, 61, 0.35) !important;
}

/* --------------------------------------------------------------------------
   4. TAB 3: SCENARIOS - Washed-Out Morning Light Blue (#0284C7 -> soft sky blue)
   -------------------------------------------------------------------------- */
.strategies-tab-container .mud-input.mud-disabled .mud-input-outlined-border,
.mud-tabs-panels .strategies-tab-container .mud-input.mud-disabled .mud-input-outlined-border {
    border-color: rgba(2, 132, 199, 0.35) !important;
}

.strategies-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.strategies-tab-container .mud-input-label-outlined.mud-disabled,
.strategies-tab-container .mud-input.mud-disabled .mud-input-slot,
.strategies-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.strategies-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.strategies-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.strategies-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text,
.mud-tabs-panels .strategies-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.mud-tabs-panels .strategies-tab-container .mud-input.mud-disabled .mud-input-slot,
.mud-tabs-panels .strategies-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.mud-tabs-panels .strategies-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.mud-tabs-panels .strategies-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.mud-tabs-panels .strategies-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text {
    color: rgba(2, 132, 199, 0.42) !important;
    -webkit-text-fill-color: rgba(2, 132, 199, 0.42) !important;
}

.strategies-tab-container .mud-checkbox:has(.mud-disabled) .mud-typography,
.strategies-tab-container .mud-checkbox:has(.mud-disabled) .mud-checkbox-text,
.strategies-tab-container .mud-checkbox:has(.mud-disabled) svg,
.mud-tabs-panels .strategies-tab-container .mud-checkbox:has(.mud-disabled) .mud-typography,
.mud-tabs-panels .strategies-tab-container .mud-checkbox:has(.mud-disabled) .mud-checkbox-text,
.mud-tabs-panels .strategies-tab-container .mud-checkbox:has(.mud-disabled) svg {
    color: rgba(2, 132, 199, 0.42) !important;
}

.strategies-tab-container .mud-button-filled.mud-button-filled-primary:disabled,
.mud-tabs-panels .strategies-tab-container .mud-button-filled.mud-button-filled-primary:disabled {
    background: linear-gradient(135deg, rgba(3, 105, 161, 0.36) 0%, rgba(56, 189, 248, 0.36) 100%) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: none !important;
}

.strategies-tab-container .mud-button-outlined.mud-button-outlined-primary:disabled,
.mud-tabs-panels .strategies-tab-container .mud-button-outlined.mud-button-outlined-primary:disabled {
    background-color: transparent !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
    color: rgba(2, 132, 199, 0.42) !important;
    box-shadow: none !important;
}

.strategies-tab-container .mud-button-text:disabled,
.mud-tabs-panels .strategies-tab-container .mud-button-text:disabled,
.strategies-tab-container .mud-icon-button:disabled,
.strategies-tab-container .mud-icon-button:disabled svg,
.mud-tabs-panels .strategies-tab-container .mud-icon-button:disabled,
.mud-tabs-panels .strategies-tab-container .mud-icon-button:disabled svg {
    color: rgba(2, 132, 199, 0.35) !important;
}

/* --------------------------------------------------------------------------
   5. TAB 4: PROJECTIONS - Washed-Out Projected Amber (#D97706 -> soft warm gold)
   -------------------------------------------------------------------------- */
.analysis-tab-container .mud-input.mud-disabled .mud-input-outlined-border,
.mud-tabs-panels .analysis-tab-container .mud-input.mud-disabled .mud-input-outlined-border {
    border-color: rgba(217, 119, 6, 0.35) !important;
}

.analysis-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.analysis-tab-container .mud-input-label-outlined.mud-disabled,
.analysis-tab-container .mud-input.mud-disabled .mud-input-slot,
.analysis-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.analysis-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.analysis-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.analysis-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text,
.mud-tabs-panels .analysis-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.mud-tabs-panels .analysis-tab-container .mud-input.mud-disabled .mud-input-slot,
.mud-tabs-panels .analysis-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.mud-tabs-panels .analysis-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.mud-tabs-panels .analysis-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.mud-tabs-panels .analysis-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text {
    color: rgba(217, 119, 6, 0.42) !important;
    -webkit-text-fill-color: rgba(217, 119, 6, 0.42) !important;
}

.analysis-tab-container .mud-button-filled.mud-button-filled-primary:disabled,
.mud-tabs-panels .analysis-tab-container .mud-button-filled.mud-button-filled-primary:disabled {
    background: linear-gradient(100deg, rgba(180, 83, 9, 0.36) 0%, rgba(245, 158, 11, 0.36) 55%, rgba(252, 211, 77, 0.36) 100%) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: none !important;
}

.analysis-tab-container .mud-button-outlined.mud-button-outlined-primary:disabled,
.mud-tabs-panels .analysis-tab-container .mud-button-outlined.mud-button-outlined-primary:disabled {
    background-color: transparent !important;
    border-color: rgba(217, 119, 6, 0.35) !important;
    color: rgba(217, 119, 6, 0.42) !important;
    box-shadow: none !important;
}

.analysis-tab-container .mud-icon-button:disabled,
.analysis-tab-container .mud-icon-button:disabled svg,
.mud-tabs-panels .analysis-tab-container .mud-icon-button:disabled,
.mud-tabs-panels .analysis-tab-container .mud-icon-button:disabled svg {
    color: rgba(217, 119, 6, 0.35) !important;
}

/* ==========================================================================
   Discard Changes Button (Light Orange)
   ========================================================================== */
.eg-btn-discard {
    background-color: #FED7AA !important;
    border: 1px solid #FDBA74 !important;
    color: #9A3412 !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease-in-out !important;
}

.eg-btn-discard:hover:not(:disabled) {
    background-color: #FDBA74 !important;
    border-color: #FB923C !important;
    color: #7C2D12 !important;
    box-shadow: 0 2px 6px rgba(251, 146, 60, 0.35) !important;
}

.eg-btn-discard:disabled,
.eg-btn-discard.mud-disabled {
    background-color: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: rgba(0, 0, 0, 0.38) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}
/* ==========================================================================
   PROJECTIONS: numbered section headings (1 deep amber, 2 gold, 3 light gold,
   beam of light fading to the right). When sections 1 and 2 are adjusted for
   inflation, their headings shift to a deeper bronze-gold and their cards take
   a faint cream tint.
   ========================================================================== */
.analysis-tab-container .eg-proj-section-header {
    --eg-proj-accent: #FBBF24;
    --eg-proj-beam: rgba(251, 191, 36, 0.22);
    --eg-proj-beam-mid: rgba(254, 240, 138, 0.10);
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    min-height: 56px;
    margin: 9px 0 6px;
    padding: 6px 12px;
    border-left: 5px solid var(--eg-proj-accent);
    background: linear-gradient(90deg, var(--eg-proj-beam) 0%, var(--eg-proj-beam-mid) 55%, rgba(255, 255, 255, 0) 100%);
}

.analysis-tab-container .eg-proj-section-header.eg-proj-adjusted {
    --eg-proj-accent: #B7791F;
    --eg-proj-beam: rgba(214, 170, 50, 0.26);
    --eg-proj-beam-mid: rgba(245, 225, 130, 0.10);
}

.analysis-tab-container .eg-proj-section-text {
    min-width: 0;
    flex: 1 1 auto;
}

.analysis-tab-container .eg-proj-section-title {
    font-size: 1rem;
    font-weight: 800;
    color: #78350F;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analysis-tab-container .eg-proj-section-subtitle {
    font-size: 0.75rem;
    line-height: 1.3;
    margin-top: 3px;
    color: #92400E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analysis-tab-container .eg-proj-section-tag {
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid var(--eg-proj-accent);
    color: #92400E;
    background: #FFFBEB;
}

.analysis-tab-container .eg-proj-adjusted .eg-proj-section-tag {
    background: var(--eg-proj-accent);
    color: #FFFFFF;
}

.mud-tabs-panels .analysis-tab-container .eg-proj-adjusted-body .mud-card,
.mud-tabs-panels .analysis-tab-container .eg-proj-adjusted-body .mud-paper {
    background: #FFFCF2 !important;
    border-color: rgba(161, 98, 7, 0.35) !important;
}

.analysis-tab-container .eg-proj-dollars-caption {
    color: #78716C;
    text-align: right;
    margin-top: 2px;
}

.analysis-tab-container .eg-proj-dollars-toggle .mud-toggle-item {
    text-transform: none;
}

/* Analysis tab: the breadcrumb that moves between Comparison, Summary and Year-By-Year. Its height comes from the
   two breadcrumb lines and the inflation control beside them, which keeps its space in every view. */

.analysis-tab-container .eg-proj-breadcrumb {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 1rem;
}

/* Comparison › Summary on the first line, with › Year-By-Year Breakdown on a second line under Summary */
.analysis-tab-container .eg-proj-crumb-tree {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: center;
    column-gap: 2px;
    row-gap: 0;
}

.analysis-tab-container .eg-proj-crumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.analysis-tab-container .eg-proj-crumb-item-0 {
    grid-column: 1;
    grid-row: 1;
}

.analysis-tab-container .eg-proj-crumb-item-1 {
    grid-column: 2;
    grid-row: 1;
}

.analysis-tab-container .eg-proj-crumb-item-2 {
    grid-column: 2;
    grid-row: 2;
}

.analysis-tab-container .eg-proj-breadcrumb-title {
    font-weight: 700;
    margin-right: 4px;
    padding: 1px 0;
}

.analysis-tab-container .eg-proj-breadcrumb-separator {
    color: #78716C;
}

.analysis-tab-container .eg-proj-crumb {
    background: none;
    border: 0;
    padding: 1px 4px;
    font: inherit;
    color: #B45309;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.analysis-tab-container .eg-proj-crumb:hover:not(:disabled) {
    color: #92400E;
}

.analysis-tab-container .eg-proj-crumb-current {
    font-weight: 700;
    cursor: default;
    text-decoration: none;
}

.analysis-tab-container .eg-proj-crumb:disabled {
    color: #A8A29E;
    cursor: not-allowed;
    text-decoration: none;
}

/* Year-by-Year has no inflation control, but its space is kept so the section heading stays put between the views */
.analysis-tab-container .eg-proj-dollars-block-reserved {
    visibility: hidden;
}

/* Comparison table: the small button on a row that opens that scenario's year-by-year breakdown */
.scenario-comparison-table .eg-proj-row-link {
    margin-left: auto;
    flex-shrink: 0;
    background: none;
    border: 0;
    padding: 0 2px;
    line-height: 1;
    color: var(--mud-palette-primary);
    cursor: pointer;
}

/* Analysis tab: a heading or label with a tooltip that explains it */
.eg-help-label {
    cursor: help;
    border-bottom: 1px dotted currentColor;
}

/* Comparison table headings: keep each line whole so the sort arrow sits right beside the heading text */
.scenario-comparison-table th .eg-help-label {
    white-space: nowrap;
}

/* Analysis tab: the selected scenario's summary cards, five across when there is room */
.eg-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

/* A card's value sits on its own line, between its label and its caption, even though its tooltip wraps it. */
.eg-kpi-grid .mud-tooltip-root {
    display: block;
    width: fit-content;
}

.eg-help-tip {
    white-space: pre-line;
    text-align: left;
    max-width: 460px;
}

/* Year-by-year breakdown: the narrow first column of life-event markers (RMDs begin, a death) */
.yby-table .mud-table-cell.eg-yby-event-cell {
    width: 1%;
    padding: 2px 4px 2px 8px !important;
    text-align: left;
    white-space: nowrap;
}


.eg-yby-event-cell .eg-yby-event-head-icon {
    font-size: 0.9rem;
    width: 0.9rem;
    height: 0.9rem;
    vertical-align: middle;
}

/* Year-by-year life-event markers (docs/RULES.md UX-28): circles of one size, side by side on one line. A stop is the
   start's marker with a slash in the opposite colour: red for money going out, green for money coming in or a cost
   ending. */
.eg-life-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    margin: 1px 0;
    padding: 0;
    border-radius: 50%;
    border: 1px solid currentColor;
    font-size: 0.6rem;
    font-weight: 800;
    line-height: 1;
    overflow: hidden;
    cursor: help;
}

/* The markers sit in one flex row, centred on the same line whatever is inside each (a letter or an icon). */
.eg-yby-event-cell .eg-life-chips {
    display: flex;
    align-items: center;
    gap: 2px;
}

.eg-yby-event-cell .mud-tooltip-root {
    display: inline-flex;
    align-items: center;
}

.eg-life-chip-stop::after {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: 50%;
    border-top: 2px solid var(--eg-slash-color);
    transform: rotate(-45deg);
}

/* RMDs: a red R; when they stop, a green slash. */
.eg-life-chip-rmd {
    color: #C62828;
    background-color: rgba(198, 40, 40, 0.07);
    --eg-slash-color: #047857;
}

/* A small "?" beside the life-events heading icon, so its legend is easy to find. */
.eg-yby-event-head-q {
    margin-left: 1px;
    font-size: 0.6rem;
    font-weight: 700;
    vertical-align: super;
    color: #64748B;
}

/* Income (docs/RULES.md EN-07): a green $; when it ends, a red slash. */
.eg-life-chip-income {
    color: #047857;
    background-color: rgba(4, 120, 87, 0.18);
    border-width: 1.5px;
    --eg-slash-color: #C62828;
}

/* Expenses (docs/RULES.md EN-08): a red $; when one ends, a green slash. */
.eg-life-chip-expense {
    color: #C62828;
    background-color: rgba(198, 40, 40, 0.07);
    --eg-slash-color: #047857;
}

/* Blue for Medicare and Social Security, the benefits people paid into through their working years. Blue and green
   are a little heavier than red (thicker ring, deeper fill) so they stand out as much. */
.eg-life-chip-medicare,
.eg-life-chip-ss {
    color: #1565C0;
    background-color: rgba(21, 101, 192, 0.16);
    border-width: 1.5px;
}

.eg-life-chip-ss {
    font-size: 0.5rem;
    letter-spacing: -0.3px;
}

.eg-life-chip-death {
    color: #546e7a;
    background-color: rgba(84, 110, 122, 0.08);
}

.eg-life-chip .eg-life-chip-icon {
    font-size: 0.7rem;
    width: 0.7rem;
    height: 0.7rem;
}

/* Year-by-year breakdown: the tab panel does not scroll, the table does. endgame.js sets the table container's
   max-height so the table and the disclaimer below fit the panel. Inside the container the two header
   rows stay at the top and the first three columns (life events, Year, Age) stay at the left; endgame.js measures
   the first header row's height (--eg-yby-head1) and the first two columns' widths (--eg-yby-left2, --eg-yby-left3).
   Frozen cells get a solid background with the row's stripe or hover tint laid over it, so nothing shows through. */
.eg-yby-wrap .yby-table {
    overflow: visible;
}

.eg-yby-wrap .yby-table .mud-table-container {
    overflow: auto;
    overscroll-behavior: contain;
}

.eg-yby-wrap .yby-table .mud-table-head .mud-table-cell {
    position: sticky;
    z-index: 3;
}

/* The Analysis tab tints every header cell with a see-through gold gradient (background shorthand, !important),
   which would let the rows and columns scrolling under the frozen headings show through. Here the same gradient is
   laid over a solid surface. */
.mud-tabs-panels .analysis-tab-container .eg-yby-wrap .yby-table .mud-table-head .mud-table-cell {
    background:
        linear-gradient(180deg, rgba(253, 224, 71, 0.22) 0%, rgba(254, 243, 199, 0.35) 100%),
        var(--mud-palette-surface) !important;
}

.eg-yby-wrap .yby-table .mud-table-head .mud-table-row:first-child .mud-table-cell {
    top: 0;
}

.eg-yby-wrap .yby-table .mud-table-head .mud-table-row:nth-child(2) .mud-table-cell {
    top: var(--eg-yby-head1, 0px);
    box-shadow: inset 0 -1px 0 var(--mud-palette-table-lines);
}

/* The frozen corner: the empty first cell of the group row, and the event, Year and Age headings. */
.eg-yby-wrap .yby-table .mud-table-head .mud-table-row:first-child .mud-table-cell:first-child,
.eg-yby-wrap .yby-table .mud-table-head .mud-table-row:nth-child(2) .mud-table-cell:nth-child(-n+3) {
    z-index: 4;
}

.eg-yby-wrap .yby-table .mud-table-head .mud-table-row:first-child .mud-table-cell:first-child,
.eg-yby-wrap .yby-table .mud-table-head .mud-table-row:nth-child(2) .mud-table-cell:first-child,
.eg-yby-wrap .yby-table .mud-table-body .mud-table-cell:first-child {
    left: 0;
}

.eg-yby-wrap .yby-table .mud-table-head .mud-table-row:nth-child(2) .mud-table-cell:nth-child(2),
.eg-yby-wrap .yby-table .mud-table-body .mud-table-cell:nth-child(2) {
    left: var(--eg-yby-left2, 0px);
}

.eg-yby-wrap .yby-table .mud-table-head .mud-table-row:nth-child(2) .mud-table-cell:nth-child(3),
.eg-yby-wrap .yby-table .mud-table-body .mud-table-cell:nth-child(3) {
    left: var(--eg-yby-left3, 0px);
    box-shadow: inset -1px 0 0 var(--mud-palette-table-lines);
}

.eg-yby-wrap .yby-table .mud-table-head .mud-table-row:nth-child(2) .mud-table-cell:nth-child(3) {
    box-shadow: inset -1px -1px 0 var(--mud-palette-table-lines);
}

.eg-yby-wrap .yby-table .mud-table-body .mud-table-row {
    --eg-yby-row-tint: transparent;
}

.eg-yby-wrap .yby-table.mud-table-striped .mud-table-body .mud-table-row:nth-of-type(odd) {
    --eg-yby-row-tint: var(--mud-palette-table-striped);
}

.eg-yby-wrap .yby-table.mud-table-hover .mud-table-body .mud-table-row:hover {
    --eg-yby-row-tint: var(--mud-palette-table-hover);
}

.eg-yby-wrap .yby-table .mud-table-body .mud-table-cell:nth-child(-n+3) {
    position: sticky;
    z-index: 2;
    background-color: var(--mud-palette-surface) !important;
    background-image: linear-gradient(var(--eg-yby-row-tint), var(--eg-yby-row-tint)) !important;
}

.eg-yby-wrap .yby-table .mud-table-body .mud-table-cell:nth-child(-n+3):hover {
    position: sticky;
    z-index: 2;
    background-color: var(--mud-palette-surface) !important;
    background-image: linear-gradient(rgba(var(--mud-palette-primary-rgb), 0.16), rgba(var(--mud-palette-primary-rgb), 0.16)) !important;
    outline-offset: -1px;
}

/* Analysis tab, Comparison and Summary tables (.eg-frozen-wrap): like the year-by-year breakdown, the table scrolls
   inside its card while its heading rows stay at the top and its first column (the strategy's Name with its
   year-by-year button, or the Account) stays at the left. The table is at least --eg-frozen-min-width wide, so a
   narrow window scrolls it sideways instead of squeezing it. endgame.js sets the container's max-height so the view
   fits the panel, and measures each heading row's top (--eg-frozen-top-0, -1) and the first column's left
   (--eg-frozen-left-0). Frozen cells get a solid background with the row's stripe, hover or selection tint laid over
   it (--eg-row-tint), so nothing shows through. */
.eg-frozen-wrap .mud-table {
    overflow: visible;
}

.eg-frozen-wrap .mud-table-container {
    overflow: auto;
    overscroll-behavior: contain;
}

.eg-frozen-wrap .mud-table-root {
    min-width: var(--eg-frozen-min-width, 0px);
}

/* The Analysis tab's three tables (Comparison, Summary, Year-by-Year) share one scrollbar: 12px across and down, a
   grey thumb on a light track, the same in every view. */
/* Chromium drops ::-webkit-scrollbar rules when scrollbar-color is set, and the tab panel's scrollbar-color is
   inherited, so it is reset here. Firefox has no ::-webkit-scrollbar and gets the colors only. */
.eg-frozen-wrap .mud-table-container,
.eg-yby-wrap .yby-table .mud-table-container {
    scrollbar-color: auto;
}

@supports not selector(::-webkit-scrollbar) {
    .eg-frozen-wrap .mud-table-container,
    .eg-yby-wrap .yby-table .mud-table-container {
        scrollbar-color: #78909c #eceff1;
    }
}

.eg-frozen-wrap .mud-table-container::-webkit-scrollbar,
.eg-yby-wrap .yby-table .mud-table-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.eg-frozen-wrap .mud-table-container::-webkit-scrollbar-track,
.eg-yby-wrap .yby-table .mud-table-container::-webkit-scrollbar-track {
    background: #eceff1;
    border-radius: 6px;
}

.eg-frozen-wrap .mud-table-container::-webkit-scrollbar-thumb,
.eg-yby-wrap .yby-table .mud-table-container::-webkit-scrollbar-thumb {
    background-color: #78909c;
    border-radius: 6px;
    border: 2px solid #eceff1;
}

.eg-frozen-wrap .mud-table-container::-webkit-scrollbar-thumb:hover,
.eg-yby-wrap .yby-table .mud-table-container::-webkit-scrollbar-thumb:hover {
    background-color: #546e7a;
}

.eg-frozen-wrap .mud-table-head .mud-table-cell {
    position: sticky;
    z-index: 3;
    top: var(--eg-frozen-top-0, 0px);
}

.eg-frozen-wrap .mud-table-head .mud-table-row:nth-child(2) .mud-table-cell {
    top: var(--eg-frozen-top-1, 0px);
}

.mud-tabs-panels .analysis-tab-container .eg-frozen-wrap .mud-table-head .mud-table-cell {
    background:
        linear-gradient(180deg, rgba(253, 224, 71, 0.22) 0%, rgba(254, 243, 199, 0.35) 100%),
        var(--mud-palette-surface) !important;
}

.eg-frozen-wrap .mud-table-head .mud-table-cell.eg-frozen-head {
    left: var(--eg-frozen-left-0, 0px);
    z-index: 4;
    box-shadow: inset -1px 0 0 var(--mud-palette-table-lines);
}

.eg-frozen-wrap .mud-table-body .mud-table-row {
    --eg-row-tint: transparent;
}

.eg-frozen-wrap .mud-table-striped .mud-table-body .mud-table-row:nth-of-type(odd) {
    --eg-row-tint: var(--mud-palette-table-striped);
}

.eg-frozen-wrap .mud-table-hover .mud-table-body .mud-table-row:hover {
    --eg-row-tint: var(--mud-palette-table-hover);
}

.eg-frozen-wrap tfoot .mud-table-row {
    --eg-row-tint: var(--mud-palette-background-grey);
}

.eg-frozen-wrap tfoot .mud-table-row.eg-proj-property-row {
    --eg-row-tint: #F0FDFA;
}

.eg-frozen-wrap .mud-table-body .mud-table-cell:first-child,
.eg-frozen-wrap tfoot .mud-table-cell:first-child {
    position: sticky;
    left: var(--eg-frozen-left-0, 0px);
    z-index: 2;
    background-color: var(--mud-palette-surface) !important;
    background-image: linear-gradient(var(--eg-row-tint), var(--eg-row-tint)) !important;
    box-shadow: inset -1px 0 0 var(--mud-palette-table-lines);
}

/* Endgame wordmark: "End" in the board's charcoal, "game" in the queen's gold, subtle italic ".money" suffix, with the tagline below. */
.endgame-wordmark {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    line-height: 1.1;
    color: #111827;
    white-space: nowrap;
}

.endgame-wordmark-gold {
    background: linear-gradient(100deg, #B7791F 0%, #E9A92A 35%, #C8901C 70%, #8A6410 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #B7791F;
}

.endgame-wordmark-domain {
    font-family: 'Baskerville', 'Garamond', 'Palatino Linotype', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 0.40em;
    letter-spacing: 0.020em;
    color: rgba(15, 23, 42, 0.33);
    margin-left: 0.07em;
    position: relative;
    top: 0.01em;
}

.endgame-tagline {
    font-size: 0.875rem;
    letter-spacing: 0.3px;
    color: #334155;
    margin-top: 2px;
    opacity: 1;
    transition: opacity 0.8s ease-in-out;
}

/* The tagline fades out before it changes, then back in (RotatingTagline). */
.endgame-tagline.endgame-tagline-hidden {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .endgame-tagline {
        transition: none;
    }
}

/* File status line under the header buttons, right-aligned with Exit: a colored dot and the file name and state. */
.endgame-file-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    max-width: 460px;
    font-size: 0.78rem;
    color: #334155;
}

.endgame-file-status-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.endgame-file-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background-color: #94A3B8;
}

.endgame-file-status-saved .endgame-file-status-dot { background-color: #10B981; }
.endgame-file-status-loaded .endgame-file-status-dot { background-color: #0284C7; }
.endgame-file-status-modified .endgame-file-status-dot { background-color: #F59E0B; }
.endgame-file-status-failed .endgame-file-status-dot { background-color: #DC2626; }
.endgame-file-status-warning .endgame-file-status-dot { background-color: #EA580C; }

.endgame-file-status-warning {
    color: #9A3412;
    font-weight: 600;
}

.endgame-file-status-failed {
    color: #991B1B;
    font-weight: 600;
    cursor: help;
}

/* ==========================================================================
   TAB 3: INCOME - Light indigo (#4A6CD4)
   The Players tab's rules, recolored: tab, active outline, cards, controls,
   disabled controls and the per-tab primary color.
   ========================================================================== */
.income-tab-container .mud-grid-item.d-flex.align-end .mud-checkbox {
    margin-bottom: 2px !important;
}

.endgame-tabs.eg-active-income,
.endgame-tabs:has(.eg-tab-income.mud-tab-active) {
    border-color: #4A6CD4 !important;
}

.endgame-tabs.eg-active-income .mud-tabs-tabbar,
.endgame-tabs:has(.eg-tab-income.mud-tab-active) .mud-tabs-tabbar {
    border-bottom: 2.5px solid #4A6CD4 !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-income {
    color: #4A6CD4 !important;
    font-weight: 700 !important;
    background: #F6F8FE !important;
    border: 1.5px solid rgba(74, 108, 212, 0.35) !important;
    border-bottom: none !important;
    position: relative;
    z-index: 1;
    transition: none !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-income svg {
    color: #4A6CD4 !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-income:hover {
    background: #EDF1FC !important;
    border-color: rgba(74, 108, 212, 0.6) !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-income.mud-tab-active {
    color: #3A57B5 !important;
    font-weight: 800 !important;
    background: #FFFFFF !important;
    border: 2.5px solid #4A6CD4 !important;
    border-bottom: 3.5px solid #FFFFFF !important;
    box-shadow: 0 -3px 8px rgba(74, 108, 212, 0.15) !important;
}

.income-tab-container {
    padding: 4px 0;
}

.income-tab-container .mud-card,
.mud-tabs-panels .income-tab-container .mud-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(74, 108, 212, 0.35) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(74, 108, 212, 0.05) !important;
    transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.income-tab-container .mud-card:hover,
.mud-tabs-panels .income-tab-container .mud-card:hover {
    border-color: #4A6CD4 !important;
    box-shadow: 0 4px 12px rgba(74, 108, 212, 0.1) !important;
}

.income-tab-container .mud-card-header,
.mud-tabs-panels .income-tab-container .mud-card-header {
    background: linear-gradient(135deg, rgba(74, 108, 212, 0.12) 0%, rgba(123, 147, 227, 0.04) 100%) !important;
    border: 1px solid rgba(74, 108, 212, 0.25) !important;
    border-radius: 10px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    margin-bottom: 8px !important;
}

.income-tab-container .mud-card-header .mud-typography,
.mud-tabs-panels .income-tab-container .mud-card-header .mud-typography {
    color: #3A57B5 !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
}

.income-tab-container .mud-input-outlined-border,
.mud-tabs-panels .income-tab-container .mud-input-outlined-border {
    border-color: #4A6CD4 !important;
    border-width: 1.5px !important;
    border-radius: 8px !important;
    background-color: transparent !important; /* fieldset overlays the input; an opaque fill hides typed/selected values */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.income-tab-container .mud-input-outlined:hover .mud-input-outlined-border,
.mud-tabs-panels .income-tab-container .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #3A57B5 !important;
}

.income-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border,
.income-tab-container .mud-input-control:focus-within .mud-input-outlined-border,
.mud-tabs-panels .income-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border,
.mud-tabs-panels .income-tab-container .mud-input-control:focus-within .mud-input-outlined-border {
    border-color: #2E468F !important;
    border-width: 2px !important;
}

.income-tab-container .mud-input-outlined:focus-within,
.mud-tabs-panels .income-tab-container .mud-input-outlined:focus-within {
    box-shadow: 0 0 0 3px rgba(74, 108, 212, 0.2) !important;
    border-radius: 8px !important;
}

.income-tab-container .mud-input-label-outlined,
.mud-tabs-panels .income-tab-container .mud-input-label-outlined {
    color: #4A6CD4 !important;
    font-weight: 600 !important;
}

.income-tab-container .mud-input-control:focus-within .mud-input-label-outlined,
.mud-tabs-panels .income-tab-container .mud-input-control:focus-within .mud-input-label-outlined {
    color: #3A57B5 !important;
    font-weight: 700 !important;
}

.income-tab-container .mud-input-slot,
.mud-tabs-panels .income-tab-container .mud-input-slot {
    color: #1E2F5E !important;
    font-weight: 500 !important;
}

.income-tab-container .mud-select .mud-select-input,
.mud-tabs-panels .income-tab-container .mud-select .mud-select-input {
    color: #1E2F5E !important;
    font-weight: 500 !important;
}

.income-tab-container .mud-input-adornment svg,
.income-tab-container .mud-select-input-adornment svg,
.mud-tabs-panels .income-tab-container .mud-input-adornment svg,
.mud-tabs-panels .income-tab-container .mud-select-input-adornment svg {
    color: #4A6CD4 !important;
}

.income-tab-container .mud-input-helper-text,
.mud-tabs-panels .income-tab-container .mud-input-helper-text {
    color: #4A6CD4 !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
}

.income-tab-container .mud-checkbox .mud-typography,
.income-tab-container .mud-checkbox .mud-checkbox-text,
.mud-tabs-panels .income-tab-container .mud-checkbox .mud-typography,
.mud-tabs-panels .income-tab-container .mud-checkbox .mud-checkbox-text {
    color: #3A57B5 !important;
    font-weight: 600 !important;
}

.income-tab-container .mud-checkbox svg,
.mud-tabs-panels .income-tab-container .mud-checkbox svg {
    color: #4A6CD4 !important;
    fill: currentColor !important;
}

.income-tab-container .mud-checkbox.mud-checked svg,
.income-tab-container .mud-checkbox:has(.mud-checkbox-true) svg,
.mud-tabs-panels .income-tab-container .mud-checkbox.mud-checked svg,
.mud-tabs-panels .income-tab-container .mud-checkbox:has(.mud-checkbox-true) svg {
    color: #4A6CD4 !important;
    fill: currentColor !important;
}

.income-tab-container {
    --mud-palette-primary: #4A6CD4;
    --mud-palette-primary-rgb: 74,108,212;
    --mud-palette-primary-text: #FFFFFF;
    --mud-palette-primary-darken: #3A57B5;
    --mud-palette-primary-lighten: #7B93E3;
    --mud-palette-primary-hover: rgba(74,108,212,0.06);
}

.income-tab-container .mud-input.mud-disabled .mud-input-outlined-border,
.mud-tabs-panels .income-tab-container .mud-input.mud-disabled .mud-input-outlined-border {
    border-color: rgba(74, 108, 212, 0.35) !important;
}

.income-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.income-tab-container .mud-input-label-outlined.mud-disabled,
.income-tab-container .mud-input.mud-disabled .mud-input-slot,
.income-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.income-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.income-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.income-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text,
.mud-tabs-panels .income-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.mud-tabs-panels .income-tab-container .mud-input.mud-disabled .mud-input-slot,
.mud-tabs-panels .income-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.mud-tabs-panels .income-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.mud-tabs-panels .income-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.mud-tabs-panels .income-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text {
    color: rgba(74, 108, 212, 0.42) !important;
    -webkit-text-fill-color: rgba(74, 108, 212, 0.42) !important;
}

.income-tab-container .mud-checkbox:has(.mud-disabled) .mud-typography,
.income-tab-container .mud-checkbox:has(.mud-disabled) .mud-checkbox-text,
.income-tab-container .mud-checkbox:has(.mud-disabled) svg {
    color: rgba(74, 108, 212, 0.42) !important;
}

/* ==========================================================================
   TAB 4: EXPENSES - Dark purple (#6B21A8)
   The Players tab's rules, recolored: tab, active outline, cards, controls,
   disabled controls and the per-tab primary color.
   ========================================================================== */
.expenses-tab-container .mud-grid-item.d-flex.align-end .mud-checkbox {
    margin-bottom: 2px !important;
}

.endgame-tabs.eg-active-expenses,
.endgame-tabs:has(.eg-tab-expenses.mud-tab-active) {
    border-color: #6B21A8 !important;
}

.endgame-tabs.eg-active-expenses .mud-tabs-tabbar,
.endgame-tabs:has(.eg-tab-expenses.mud-tab-active) .mud-tabs-tabbar {
    border-bottom: 2.5px solid #6B21A8 !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-expenses {
    color: #6B21A8 !important;
    font-weight: 700 !important;
    background: #FAF5FF !important;
    border: 1.5px solid rgba(107, 33, 168, 0.35) !important;
    border-bottom: none !important;
    position: relative;
    z-index: 1;
    transition: none !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-expenses svg {
    color: #6B21A8 !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-expenses:hover {
    background: #F3E8FF !important;
    border-color: rgba(107, 33, 168, 0.6) !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-expenses.mud-tab-active {
    color: #581C87 !important;
    font-weight: 800 !important;
    background: #FFFFFF !important;
    border: 2.5px solid #6B21A8 !important;
    border-bottom: 3.5px solid #FFFFFF !important;
    box-shadow: 0 -3px 8px rgba(107, 33, 168, 0.15) !important;
}

.expenses-tab-container {
    padding: 4px 0;
}

.expenses-tab-container .mud-card,
.mud-tabs-panels .expenses-tab-container .mud-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(107, 33, 168, 0.35) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(107, 33, 168, 0.05) !important;
    transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.expenses-tab-container .mud-card:hover,
.mud-tabs-panels .expenses-tab-container .mud-card:hover {
    border-color: #6B21A8 !important;
    box-shadow: 0 4px 12px rgba(107, 33, 168, 0.1) !important;
}

.expenses-tab-container .mud-card-header,
.mud-tabs-panels .expenses-tab-container .mud-card-header {
    background: linear-gradient(135deg, rgba(107, 33, 168, 0.12) 0%, rgba(168, 85, 247, 0.04) 100%) !important;
    border: 1px solid rgba(107, 33, 168, 0.25) !important;
    border-radius: 10px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    margin-bottom: 8px !important;
}

.expenses-tab-container .mud-card-header .mud-typography,
.mud-tabs-panels .expenses-tab-container .mud-card-header .mud-typography {
    color: #581C87 !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
}

.expenses-tab-container .mud-input-outlined-border,
.mud-tabs-panels .expenses-tab-container .mud-input-outlined-border {
    border-color: #6B21A8 !important;
    border-width: 1.5px !important;
    border-radius: 8px !important;
    background-color: transparent !important; /* fieldset overlays the input; an opaque fill hides typed/selected values */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.expenses-tab-container .mud-input-outlined:hover .mud-input-outlined-border,
.mud-tabs-panels .expenses-tab-container .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #581C87 !important;
}

.expenses-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border,
.expenses-tab-container .mud-input-control:focus-within .mud-input-outlined-border,
.mud-tabs-panels .expenses-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border,
.mud-tabs-panels .expenses-tab-container .mud-input-control:focus-within .mud-input-outlined-border {
    border-color: #4C1D95 !important;
    border-width: 2px !important;
}

.expenses-tab-container .mud-input-outlined:focus-within,
.mud-tabs-panels .expenses-tab-container .mud-input-outlined:focus-within {
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.2) !important;
    border-radius: 8px !important;
}

.expenses-tab-container .mud-input-label-outlined,
.mud-tabs-panels .expenses-tab-container .mud-input-label-outlined {
    color: #6B21A8 !important;
    font-weight: 600 !important;
}

.expenses-tab-container .mud-input-control:focus-within .mud-input-label-outlined,
.mud-tabs-panels .expenses-tab-container .mud-input-control:focus-within .mud-input-label-outlined {
    color: #581C87 !important;
    font-weight: 700 !important;
}

.expenses-tab-container .mud-input-slot,
.mud-tabs-panels .expenses-tab-container .mud-input-slot {
    color: #2E1065 !important;
    font-weight: 500 !important;
}

.expenses-tab-container .mud-select .mud-select-input,
.mud-tabs-panels .expenses-tab-container .mud-select .mud-select-input {
    color: #2E1065 !important;
    font-weight: 500 !important;
}

.expenses-tab-container .mud-input-adornment svg,
.expenses-tab-container .mud-select-input-adornment svg,
.mud-tabs-panels .expenses-tab-container .mud-input-adornment svg,
.mud-tabs-panels .expenses-tab-container .mud-select-input-adornment svg {
    color: #6B21A8 !important;
}

.expenses-tab-container .mud-input-helper-text,
.mud-tabs-panels .expenses-tab-container .mud-input-helper-text {
    color: #6B21A8 !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
}

.expenses-tab-container .mud-checkbox .mud-typography,
.expenses-tab-container .mud-checkbox .mud-checkbox-text,
.mud-tabs-panels .expenses-tab-container .mud-checkbox .mud-typography,
.mud-tabs-panels .expenses-tab-container .mud-checkbox .mud-checkbox-text {
    color: #581C87 !important;
    font-weight: 600 !important;
}

.expenses-tab-container .mud-checkbox svg,
.mud-tabs-panels .expenses-tab-container .mud-checkbox svg {
    color: #6B21A8 !important;
    fill: currentColor !important;
}

.expenses-tab-container .mud-checkbox.mud-checked svg,
.expenses-tab-container .mud-checkbox:has(.mud-checkbox-true) svg,
.mud-tabs-panels .expenses-tab-container .mud-checkbox.mud-checked svg,
.mud-tabs-panels .expenses-tab-container .mud-checkbox:has(.mud-checkbox-true) svg {
    color: #6B21A8 !important;
    fill: currentColor !important;
}

.expenses-tab-container {
    --mud-palette-primary: #6B21A8;
    --mud-palette-primary-rgb: 107,33,168;
    --mud-palette-primary-text: #FFFFFF;
    --mud-palette-primary-darken: #581C87;
    --mud-palette-primary-lighten: #A855F7;
    --mud-palette-primary-hover: rgba(107,33,168,0.06);
}

.expenses-tab-container .mud-input.mud-disabled .mud-input-outlined-border,
.mud-tabs-panels .expenses-tab-container .mud-input.mud-disabled .mud-input-outlined-border {
    border-color: rgba(107, 33, 168, 0.35) !important;
}

.expenses-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.expenses-tab-container .mud-input-label-outlined.mud-disabled,
.expenses-tab-container .mud-input.mud-disabled .mud-input-slot,
.expenses-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.expenses-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.expenses-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.expenses-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text,
.mud-tabs-panels .expenses-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.mud-tabs-panels .expenses-tab-container .mud-input.mud-disabled .mud-input-slot,
.mud-tabs-panels .expenses-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.mud-tabs-panels .expenses-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.mud-tabs-panels .expenses-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.mud-tabs-panels .expenses-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text {
    color: rgba(107, 33, 168, 0.42) !important;
    -webkit-text-fill-color: rgba(107, 33, 168, 0.42) !important;
}

.expenses-tab-container .mud-checkbox:has(.mud-disabled) .mud-typography,
.expenses-tab-container .mud-checkbox:has(.mud-disabled) .mud-checkbox-text,
.expenses-tab-container .mud-checkbox:has(.mud-disabled) svg {
    color: rgba(107, 33, 168, 0.42) !important;
}

/* ==========================================================================
   TAB 6: PROPERTY - Teal (#0F766E)
   The Players tab's rules, recolored: tab, active outline, cards, controls,
   disabled controls and the per-tab primary color.
   ========================================================================== */
.property-tab-container .mud-grid-item.d-flex.align-end .mud-checkbox {
    margin-bottom: 2px !important;
}

.endgame-tabs.eg-active-property,
.endgame-tabs:has(.eg-tab-property.mud-tab-active) {
    border-color: #0F766E !important;
}

.endgame-tabs.eg-active-property .mud-tabs-tabbar,
.endgame-tabs:has(.eg-tab-property.mud-tab-active) .mud-tabs-tabbar {
    border-bottom: 2.5px solid #0F766E !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-property {
    color: #0F766E !important;
    font-weight: 700 !important;
    background: #F0FDFA !important;
    border: 1.5px solid rgba(15, 118, 110, 0.35) !important;
    border-bottom: none !important;
    position: relative;
    z-index: 1;
    transition: none !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-property svg {
    color: #0F766E !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-property:hover {
    background: #CCFBF1 !important;
    border-color: rgba(15, 118, 110, 0.6) !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-property.mud-tab-active {
    color: #115E59 !important;
    font-weight: 800 !important;
    background: #FFFFFF !important;
    border: 2.5px solid #0F766E !important;
    border-bottom: 3.5px solid #FFFFFF !important;
    box-shadow: 0 -3px 8px rgba(15, 118, 110, 0.15) !important;
}

.property-tab-container {
    padding: 4px 0;
}

.property-tab-container .mud-card,
.mud-tabs-panels .property-tab-container .mud-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(15, 118, 110, 0.35) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.05) !important;
    transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.property-tab-container .mud-card:hover,
.mud-tabs-panels .property-tab-container .mud-card:hover {
    border-color: #0F766E !important;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.1) !important;
}

.property-tab-container .mud-card-header,
.mud-tabs-panels .property-tab-container .mud-card-header {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12) 0%, rgba(45, 212, 191, 0.04) 100%) !important;
    border: 1px solid rgba(15, 118, 110, 0.25) !important;
    border-radius: 10px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    margin-bottom: 8px !important;
}

.property-tab-container .mud-card-header .mud-typography,
.mud-tabs-panels .property-tab-container .mud-card-header .mud-typography {
    color: #115E59 !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
}

.property-tab-container .mud-input-outlined-border,
.mud-tabs-panels .property-tab-container .mud-input-outlined-border {
    border-color: #0F766E !important;
    border-width: 1.5px !important;
    border-radius: 8px !important;
    background-color: transparent !important; /* fieldset overlays the input; an opaque fill hides typed/selected values */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.property-tab-container .mud-input-outlined:hover .mud-input-outlined-border,
.mud-tabs-panels .property-tab-container .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #115E59 !important;
}

.property-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border,
.property-tab-container .mud-input-control:focus-within .mud-input-outlined-border,
.mud-tabs-panels .property-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border,
.mud-tabs-panels .property-tab-container .mud-input-control:focus-within .mud-input-outlined-border {
    border-color: #134E4A !important;
    border-width: 2px !important;
}

.property-tab-container .mud-input-outlined:focus-within,
.mud-tabs-panels .property-tab-container .mud-input-outlined:focus-within {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2) !important;
    border-radius: 8px !important;
}

.property-tab-container .mud-input-label-outlined,
.mud-tabs-panels .property-tab-container .mud-input-label-outlined {
    color: #0F766E !important;
    font-weight: 600 !important;
}

.property-tab-container .mud-input-control:focus-within .mud-input-label-outlined,
.mud-tabs-panels .property-tab-container .mud-input-control:focus-within .mud-input-label-outlined {
    color: #115E59 !important;
    font-weight: 700 !important;
}

.property-tab-container .mud-input-slot,
.mud-tabs-panels .property-tab-container .mud-input-slot {
    color: #042F2E !important;
    font-weight: 500 !important;
}

.property-tab-container .mud-select .mud-select-input,
.mud-tabs-panels .property-tab-container .mud-select .mud-select-input {
    color: #042F2E !important;
    font-weight: 500 !important;
}

.property-tab-container .mud-input-adornment svg,
.property-tab-container .mud-select-input-adornment svg,
.mud-tabs-panels .property-tab-container .mud-input-adornment svg,
.mud-tabs-panels .property-tab-container .mud-select-input-adornment svg {
    color: #0F766E !important;
}

.property-tab-container .mud-input-helper-text,
.mud-tabs-panels .property-tab-container .mud-input-helper-text {
    color: #0F766E !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
}

.property-tab-container .mud-checkbox .mud-typography,
.property-tab-container .mud-checkbox .mud-checkbox-text,
.mud-tabs-panels .property-tab-container .mud-checkbox .mud-typography,
.mud-tabs-panels .property-tab-container .mud-checkbox .mud-checkbox-text {
    color: #115E59 !important;
    font-weight: 600 !important;
}

.property-tab-container .mud-checkbox svg,
.mud-tabs-panels .property-tab-container .mud-checkbox svg {
    color: #0F766E !important;
    fill: currentColor !important;
}

.property-tab-container .mud-checkbox.mud-checked svg,
.property-tab-container .mud-checkbox:has(.mud-checkbox-true) svg,
.mud-tabs-panels .property-tab-container .mud-checkbox.mud-checked svg,
.mud-tabs-panels .property-tab-container .mud-checkbox:has(.mud-checkbox-true) svg {
    color: #0F766E !important;
    fill: currentColor !important;
}

.property-tab-container {
    --mud-palette-primary: #0F766E;
    --mud-palette-primary-rgb: 15,118,110;
    --mud-palette-primary-text: #FFFFFF;
    --mud-palette-primary-darken: #115E59;
    --mud-palette-primary-lighten: #14B8A6;
    --mud-palette-primary-hover: rgba(15,118,110,0.06);
}

.property-tab-container .mud-input.mud-disabled .mud-input-outlined-border,
.mud-tabs-panels .property-tab-container .mud-input.mud-disabled .mud-input-outlined-border {
    border-color: rgba(15, 118, 110, 0.35) !important;
}

.property-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.property-tab-container .mud-input-label-outlined.mud-disabled,
.property-tab-container .mud-input.mud-disabled .mud-input-slot,
.property-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.property-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.property-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.property-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text,
.mud-tabs-panels .property-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.mud-tabs-panels .property-tab-container .mud-input.mud-disabled .mud-input-slot,
.mud-tabs-panels .property-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.mud-tabs-panels .property-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.mud-tabs-panels .property-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.mud-tabs-panels .property-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text {
    color: rgba(15, 118, 110, 0.42) !important;
    -webkit-text-fill-color: rgba(15, 118, 110, 0.42) !important;
}

.property-tab-container .mud-checkbox:has(.mud-disabled) .mud-typography,
.property-tab-container .mud-checkbox:has(.mud-disabled) .mud-checkbox-text,
.property-tab-container .mud-checkbox:has(.mud-disabled) svg {
    color: rgba(15, 118, 110, 0.42) !important;
}

/* ==========================================================================
   TAB 1: BOARD - Slate (#475569), like a chess board's dark squares
   The Players tab's rules, recolored: tab, active outline, cards, controls,
   disabled controls and the per-tab primary color.
   ========================================================================== */
.plan-tab-container .mud-grid-item.d-flex.align-end .mud-checkbox {
    margin-bottom: 2px !important;
}

.endgame-tabs.eg-active-plan,
.endgame-tabs:has(.eg-tab-plan.mud-tab-active) {
    border-color: #475569 !important;
}

.endgame-tabs.eg-active-plan .mud-tabs-tabbar,
.endgame-tabs:has(.eg-tab-plan.mud-tab-active) .mud-tabs-tabbar {
    border-bottom: 2.5px solid #475569 !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-plan {
    color: #475569 !important;
    font-weight: 700 !important;
    background: #F8FAFC !important;
    border: 1.5px solid rgba(71, 85, 105, 0.35) !important;
    border-bottom: none !important;
    position: relative;
    z-index: 1;
    transition: none !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-plan svg {
    color: #475569 !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-plan:hover {
    background: #F1F5F9 !important;
    border-color: rgba(71, 85, 105, 0.6) !important;
}

.endgame-tabs .mud-tabs-tabbar .mud-tab.eg-tab-plan.mud-tab-active {
    color: #334155 !important;
    font-weight: 800 !important;
    background: #FFFFFF !important;
    border: 2.5px solid #475569 !important;
    border-bottom: 3.5px solid #FFFFFF !important;
    box-shadow: 0 -3px 8px rgba(71, 85, 105, 0.15) !important;
}

.plan-tab-container {
    padding: 4px 0;
}

.plan-tab-container .mud-card,
.mud-tabs-panels .plan-tab-container .mud-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(71, 85, 105, 0.35) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(71, 85, 105, 0.05) !important;
    transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.plan-tab-container .mud-card:hover,
.mud-tabs-panels .plan-tab-container .mud-card:hover {
    border-color: #475569 !important;
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.1) !important;
}

.plan-tab-container .mud-card-header,
.mud-tabs-panels .plan-tab-container .mud-card-header {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.12) 0%, rgba(100, 116, 139, 0.04) 100%) !important;
    border: 1px solid rgba(71, 85, 105, 0.25) !important;
    border-radius: 10px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    margin-bottom: 8px !important;
}

.plan-tab-container .mud-card-header .mud-typography,
.mud-tabs-panels .plan-tab-container .mud-card-header .mud-typography {
    color: #334155 !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
}

.plan-tab-container .mud-input-outlined-border,
.mud-tabs-panels .plan-tab-container .mud-input-outlined-border {
    border-color: #475569 !important;
    border-width: 1.5px !important;
    border-radius: 8px !important;
    background-color: transparent !important; /* fieldset overlays the input; an opaque fill hides typed/selected values */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.plan-tab-container .mud-input-outlined:hover .mud-input-outlined-border,
.mud-tabs-panels .plan-tab-container .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #334155 !important;
}

.plan-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border,
.plan-tab-container .mud-input-control:focus-within .mud-input-outlined-border,
.mud-tabs-panels .plan-tab-container .mud-input-outlined:focus-within .mud-input-outlined-border,
.mud-tabs-panels .plan-tab-container .mud-input-control:focus-within .mud-input-outlined-border {
    border-color: #1E293B !important;
    border-width: 2px !important;
}

.plan-tab-container .mud-input-outlined:focus-within,
.mud-tabs-panels .plan-tab-container .mud-input-outlined:focus-within {
    box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.2) !important;
    border-radius: 8px !important;
}

.plan-tab-container .mud-input-label-outlined,
.mud-tabs-panels .plan-tab-container .mud-input-label-outlined {
    color: #475569 !important;
    font-weight: 600 !important;
}

.plan-tab-container .mud-input-control:focus-within .mud-input-label-outlined,
.mud-tabs-panels .plan-tab-container .mud-input-control:focus-within .mud-input-label-outlined {
    color: #334155 !important;
    font-weight: 700 !important;
}

.plan-tab-container .mud-input-slot,
.mud-tabs-panels .plan-tab-container .mud-input-slot {
    color: #0F172A !important;
    font-weight: 500 !important;
}

.plan-tab-container .mud-select .mud-select-input,
.mud-tabs-panels .plan-tab-container .mud-select .mud-select-input {
    color: #0F172A !important;
    font-weight: 500 !important;
}

.plan-tab-container .mud-input-adornment svg,
.plan-tab-container .mud-select-input-adornment svg,
.mud-tabs-panels .plan-tab-container .mud-input-adornment svg,
.mud-tabs-panels .plan-tab-container .mud-select-input-adornment svg {
    color: #475569 !important;
}

.plan-tab-container .mud-input-helper-text,
.mud-tabs-panels .plan-tab-container .mud-input-helper-text {
    color: #475569 !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
}

.plan-tab-container .mud-checkbox .mud-typography,
.plan-tab-container .mud-checkbox .mud-checkbox-text,
.mud-tabs-panels .plan-tab-container .mud-checkbox .mud-typography,
.mud-tabs-panels .plan-tab-container .mud-checkbox .mud-checkbox-text {
    color: #334155 !important;
    font-weight: 600 !important;
}

.plan-tab-container .mud-checkbox svg,
.mud-tabs-panels .plan-tab-container .mud-checkbox svg {
    color: #475569 !important;
    fill: currentColor !important;
}

.plan-tab-container .mud-checkbox.mud-checked svg,
.plan-tab-container .mud-checkbox:has(.mud-checkbox-true) svg,
.mud-tabs-panels .plan-tab-container .mud-checkbox.mud-checked svg,
.mud-tabs-panels .plan-tab-container .mud-checkbox:has(.mud-checkbox-true) svg {
    color: #475569 !important;
    fill: currentColor !important;
}

.plan-tab-container {
    --mud-palette-primary: #475569;
    --mud-palette-primary-rgb: 71,85,105;
    --mud-palette-primary-text: #FFFFFF;
    --mud-palette-primary-darken: #334155;
    --mud-palette-primary-lighten: #64748B;
    --mud-palette-primary-hover: rgba(71,85,105,0.06);
}

.plan-tab-container .mud-input.mud-disabled .mud-input-outlined-border,
.mud-tabs-panels .plan-tab-container .mud-input.mud-disabled .mud-input-outlined-border {
    border-color: rgba(71, 85, 105, 0.35) !important;
}

.plan-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.plan-tab-container .mud-input-label-outlined.mud-disabled,
.plan-tab-container .mud-input.mud-disabled .mud-input-slot,
.plan-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.plan-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.plan-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.plan-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text,
.mud-tabs-panels .plan-tab-container .mud-input-control:has(.mud-disabled) .mud-input-label-outlined,
.mud-tabs-panels .plan-tab-container .mud-input.mud-disabled .mud-input-slot,
.mud-tabs-panels .plan-tab-container .mud-select:has(.mud-disabled) .mud-select-input,
.mud-tabs-panels .plan-tab-container .mud-input.mud-disabled .mud-input-adornment svg,
.mud-tabs-panels .plan-tab-container .mud-select:has(.mud-disabled) .mud-select-input-adornment svg,
.mud-tabs-panels .plan-tab-container .mud-input-control:has(.mud-disabled) .mud-input-helper-text {
    color: rgba(71, 85, 105, 0.42) !important;
    -webkit-text-fill-color: rgba(71, 85, 105, 0.42) !important;
}

.plan-tab-container .mud-checkbox:has(.mud-disabled) .mud-typography,
.plan-tab-container .mud-checkbox:has(.mud-disabled) .mud-checkbox-text,
.plan-tab-container .mud-checkbox:has(.mud-disabled) svg {
    color: rgba(71, 85, 105, 0.42) !important;
}

/* Plan tab: the Projection Assumptions rates stack one per line in a column a quarter of the page wide, like the
   Plan Year field (the whole width on narrow screens). */
/* The Plan Year's warning icon, just inside the (read-only) field. */
/* Board tab: the text beside a field (the Model Year's description, General Inflation %'s note) starts on the line of the
   value in the field's box, not at the top of its label (docs/RULES.md UX-34). */
.plan-tab-container .eg-base-year-description,
.plan-tab-container .eg-plan-rate-note {
    padding-top: 18px;
}

.eg-plan-year-warning.mud-icon-button {
    position: absolute;
    top: 10px;
    right: 6px;
    z-index: 1;
}

/* Field warnings (FieldWarnings, see "Errors, Warnings and Validation" in AGENTS.md): amber helper text and warning
   icon until the person reads the explanation and clicks OK. */
.eg-field-warning .mud-input-helper-text,
.mud-tabs-panels .eg-field-warning .mud-input-helper-text {
    color: #B45309 !important;
    font-weight: 600 !important;
}

.eg-field-warning .mud-input-adornment svg,
.mud-tabs-panels .eg-field-warning .mud-input-adornment svg {
    color: #D97706 !important;
}

.eg-field-warning-popover {
    max-width: 300px;
    border: 1px solid #FCD34D;
    background: #FFFBEB !important;
    color: #78350F;
}

/* --------------------------------------------------------------------------
   Closed tabs: Finances through Projections stay disabled until the Players
   tab's Base Year, Birth Year and Life Expectancy Age are filled in. Placed last
   so it wins over each tab's own colors.
   -------------------------------------------------------------------------- */
.endgame-tabs .mud-tabs-tabbar .mud-tab.mud-disabled {
    opacity: 0.45 !important;
    filter: grayscale(100%) !important;
    cursor: not-allowed !important;
}

/* --------------------------------------------------------------------------
   Error state (docs/RULES.md UX-04): a control whose value is missing or
   invalid shows a red outline, a red label and its message in red in place of
   the helper text, on every tab and when hovered or focused. Placed last and
   made more specific than each tab's own outline colors so it always wins.
   -------------------------------------------------------------------------- */
.mud-tabs-panels .mud-input-control .mud-input.mud-input-error .mud-input-outlined-border,
.mud-tabs-panels .mud-input-control .mud-input.mud-input-error:hover .mud-input-outlined-border,
.mud-tabs-panels .mud-input-control:focus-within .mud-input.mud-input-error .mud-input-outlined-border {
    border-color: var(--mud-palette-error) !important;
}

.mud-tabs-panels .mud-input-control .mud-input-label.mud-input-error,
.mud-tabs-panels .mud-input-control .mud-input-helper-text.mud-input-error,
.mud-tabs-panels .mud-input-control .mud-input-error .mud-input-helper-text {
    color: var(--mud-palette-error) !important;
}

/* --------------------------------------------------------------------------
   Master lists (Income, Expenses, Accounts, Property, Scenarios): the selected card gets a 3px outline
   in the tab's color (a 1px border plus a 2px inset ring, so the content does not
   shift) and a tinted fill. A card with something to fix keeps a red outline,
   selected or not (UX-04).
   -------------------------------------------------------------------------- */
.mud-tabs-panels .strategies-tab-container .mud-card.eg-list-selected,
.mud-tabs-panels .strategies-tab-container .mud-card.eg-list-selected:hover {
    border-color: #0284C7 !important;
    box-shadow: inset 0 0 0 2px #0284C7, 0 4px 12px rgba(2, 132, 199, 0.18) !important;
    background: linear-gradient(180deg, rgba(186, 230, 253, 0.45) 0%, rgba(224, 242, 254, 0.25) 100%) !important;
}

.mud-tabs-panels .income-tab-container .mud-card.eg-list-selected,
.mud-tabs-panels .income-tab-container .mud-card.eg-list-selected:hover {
    border-color: #4A6CD4 !important;
    box-shadow: inset 0 0 0 2px #4A6CD4, 0 4px 12px rgba(74, 108, 212, 0.18) !important;
    background: linear-gradient(180deg, rgba(199, 210, 254, 0.55) 0%, rgba(238, 242, 255, 0.3) 100%) !important;
}

.mud-tabs-panels .accounts-tab-container .mud-card.eg-list-selected,
.mud-tabs-panels .accounts-tab-container .mud-card.eg-list-selected:hover {
    border-color: #15803D !important;
    box-shadow: inset 0 0 0 2px #15803D, 0 4px 12px rgba(21, 128, 61, 0.18) !important;
    background: linear-gradient(180deg, rgba(187, 247, 208, 0.5) 0%, rgba(240, 253, 244, 0.3) 100%) !important;
}

.mud-tabs-panels .expenses-tab-container .mud-card.eg-list-selected,
.mud-tabs-panels .expenses-tab-container .mud-card.eg-list-selected:hover {
    border-color: #6B21A8 !important;
    box-shadow: inset 0 0 0 2px #6B21A8, 0 4px 12px rgba(107, 33, 168, 0.18) !important;
    background: linear-gradient(180deg, rgba(233, 213, 255, 0.55) 0%, rgba(250, 245, 255, 0.3) 100%) !important;
}

.mud-tabs-panels .property-tab-container .mud-card.eg-list-selected,
.mud-tabs-panels .property-tab-container .mud-card.eg-list-selected:hover {
    border-color: #0F766E !important;
    box-shadow: inset 0 0 0 2px #0F766E, 0 4px 12px rgba(15, 118, 110, 0.18) !important;
    background: linear-gradient(180deg, rgba(153, 246, 228, 0.5) 0%, rgba(240, 253, 250, 0.3) 100%) !important;
}

.mud-tabs-panels .mud-card.eg-list-card.eg-list-issue {
    border-color: var(--mud-palette-error) !important;
}

.mud-tabs-panels .mud-card.eg-list-card.eg-list-issue.eg-list-selected {
    box-shadow: inset 0 0 0 2px var(--mud-palette-error), 0 4px 12px rgba(220, 38, 38, 0.18) !important;
}

/* Analysis tab: the disclaimer is one small line with no box, so the tables keep the room (it wraps only on
   narrow screens). The view above it gives up its bottom margin, so only the disclaimer's own small gap is left. */
.analysis-tab-container :has(+ .eg-proj-disclaimer) > :last-child {
    margin-bottom: 0 !important;
}

/* List cards (Accounts, Property, Income, Expenses: ListItemCard): the amount line, then smaller grey detail lines. */
.eg-list-card-rows .eg-list-card-amount {
    font-size: 0.78rem;
}

.eg-list-card-rows .eg-list-card-detail {
    font-size: 0.7rem;
    color: #546e7a;
}

/* Strategies tab: account pickers and the payment account list take half the card, so their long explanations
   can run the full width above them. On narrow screens they take the full width. */
.eg-half-width {
    width: 50%;
}

@media (max-width: 960px) {
    .eg-half-width {
        width: 100%;
    }
}

/* Projections balances table: the Property footer row (docs/RULES.md EN-12), tinted in the Property tab's teal. */
.eg-proj-property-row {
    background-color: #F0FDFA;
}

.eg-proj-disclaimer {
    margin-top: 4px;
    font-size: 0.72rem;
    line-height: 1.4;
    color: #64748B;
    padding: 2px 0;
    text-align: center;
}

.eg-proj-disclaimer strong {
    color: #475569;
}

/* Year-by-year breakdown: clicking a column group's heading collapses the group to its total column or expands it
   again (saved with the model). A collapsed group's name sits [in brackets]. */
.eg-yby-group-head {
    cursor: pointer;
    user-select: none;
}

.eg-yby-group-head:hover {
    filter: brightness(0.92);
}

.eg-yby-group-head:focus-visible {
    outline: 2px solid var(--eg-group-color, currentColor);
    outline-offset: -2px;
}

.eg-yby-group-icon.mud-icon-root {
    font-size: 1.1rem;
    color: var(--eg-group-color, currentColor);
    flex-shrink: 0;
}

/* Year-by-year breakdown: a heading over colored values (accounts by type, property, expenses) takes the values' color
   instead of the Analysis tab's brown, from --eg-head-color set on the heading. */
.mud-tabs-panels .analysis-tab-container .eg-yby-wrap .yby-table .mud-table-head .mud-table-cell.eg-yby-colored-head,
.mud-tabs-panels .analysis-tab-container .eg-yby-wrap .yby-table .mud-table-head .mud-table-cell.eg-yby-colored-head strong {
    color: var(--eg-head-color) !important;
}

/* The year-by-year table is only as wide as its columns, so with groups collapsed the columns sit close together
   instead of spreading across the screen; with many columns it scrolls sideways as before. */
.eg-yby-wrap .yby-table .mud-table-root {
    width: max-content;
}

/* Year-by-year breakdown: the Opening row's label spans the Year and Age columns, so in that row the third cell is the
   first account, which must scroll like the rest; the spanning cell takes the frozen columns' right edge. */
.eg-yby-wrap .yby-table .mud-table-body .eg-yby-opening-row .mud-table-cell:nth-child(3),
.eg-yby-wrap .yby-table .mud-table-body .eg-yby-opening-row .mud-table-cell:nth-child(3):hover {
    position: static;
    background-color: transparent !important;
    background-image: linear-gradient(var(--eg-yby-row-tint), var(--eg-yby-row-tint)) !important;
    box-shadow: none;
}

.eg-yby-wrap .yby-table .mud-table-body .eg-yby-opening-row .mud-table-cell:nth-child(2) {
    box-shadow: inset -1px 0 0 var(--mud-palette-table-lines);
}

/* Ages sit close to the year, lined up digit for digit (figure spaces pad them). */
.yby-table .mud-table-cell.eg-yby-age-cell {
    padding-left: 2px !important;
    text-align: right;
    white-space: pre !important;
    font-variant-numeric: tabular-nums;
}

/* Analysis tables: the cell selected with a click or the arrow keys (endgame.js), and the brief "Copied" mark a cell
   shows after Ctrl+C or a right-click copies its tooltip. Inline, never a pop-up (UX-15). */
.analysis-tab-container .mud-table tbody td.eg-cell-focus {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
    background-color: rgba(var(--mud-palette-primary-rgb), 0.12) !important;
}

.analysis-tab-container .mud-table tbody td .mud-tooltip-root:focus,
.analysis-tab-container .mud-table tbody td:focus {
    outline: none;
}

.analysis-tab-container .mud-table tbody td.eg-cell-copied {
    outline: 2px solid var(--mud-palette-success);
    outline-offset: -2px;
}

.eg-cell-copied-mark {
    position: fixed;
    padding: 0 3px;
    border-radius: 3px;
    font-size: 0.65rem;
    line-height: 1.3;
    color: #fff;
    background-color: var(--mud-palette-success);
    pointer-events: none;
    z-index: 2000;
}

/* Read-only models (docs/RULES.md UX-24): each editing tab sits in a fieldset that is disabled while the model is
   read-only, which disables its native inputs and buttons. Lists can still be clicked to look at each item; the
   MudBlazor controls that open on a click of their own (selects, pickers) are kept closed. */
fieldset.eg-readonly-scope {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

fieldset.eg-readonly-scope:disabled .mud-select,
fieldset.eg-readonly-scope:disabled .mud-picker,
fieldset.eg-readonly-scope:disabled .mud-autocomplete,
fieldset.eg-readonly-scope:disabled .mud-input-adornment,
fieldset.eg-readonly-scope:disabled .mud-toggle-group {
    pointer-events: none;
}

/* Read-only model (docs/RULES.md UX-24): a small chip on the status line under the toolbar, so it takes no room from
   the tabs. Its tooltip gives the reason; clicking it opens the License page. */
.eg-readonly-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 1px 8px;
    border-radius: 10px;
    border: 1px solid #D97706;
    background: #FEF3C7;
    color: #92400E;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
}

.eg-readonly-chip:hover,
.eg-readonly-chip:focus-visible {
    background: #FDE68A;
    outline: none;
}

/* The edition in use and its year (EN-17): a small chip on the status line, slate for Free and green for a paid
   edition. Its tooltip gives the Plan Years it plans; clicking it opens the License page. */
.eg-edition-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 1px 8px;
    border-radius: 10px;
    border: 1px solid #64748B;
    background: #F1F5F9;
    color: #334155;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
}

.eg-edition-chip:hover,
.eg-edition-chip:focus-visible {
    background: #E2E8F0;
    outline: none;
}

.eg-edition-chip.eg-edition-chip-paid {
    border-color: #059669;
    background: #D1FAE5;
    color: #065F46;
}

.eg-edition-chip.eg-edition-chip-paid:hover,
.eg-edition-chip.eg-edition-chip-paid:focus-visible {
    background: #A7F3D0;
}

/* The sample plan (docs/RULES.md UX-27): a blue Sample plan chip and a Start My Plan button on the status line. */
.eg-readonly-chip.eg-sample-chip {
    border-color: #2563EB;
    background: #DBEAFE;
    color: #1E40AF;
}

.eg-readonly-chip.eg-sample-chip:hover,
.eg-readonly-chip.eg-sample-chip:focus-visible {
    background: #BFDBFE;
}

.eg-start-plan-btn {
    margin-top: 4px;
    padding: 2px 10px;
    border: none;
    border-radius: 10px;
    background: #059669;
    color: #FFFFFF;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
}

.eg-start-plan-btn:hover,
.eg-start-plan-btn:focus-visible {
    background: #047857;
    outline: none;
}

/* Sample plan cards (docs/RULES.md UX-27): on the Welcome page and in the New panel. */
.eg-sample-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.eg-sample-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: #F8FAFC;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 10px;
    color: #334155;
    font-size: 0.85rem;
    line-height: 1.4;
}

.eg-sample-card-title {
    font-weight: 700;
    color: #0F172A;
    font-size: 0.92rem;
}

.eg-sample-card-summary {
    flex: 1 1 auto;
}

.eg-sample-card .eg-sample-card-btn {
    margin-top: 4px;
    text-transform: none;
    font-weight: 700;
    background: #FFFFFF;
}

/* A confirmation panel under the toolbar (Exit): the icon and a short text on the left, the buttons together on the
   right, on one line where it fits. */
.eg-confirm-panel {
    display: flex;
    align-items: center;
    gap: 8px 12px;
}

.eg-confirm-panel-text {
    flex: 1 1 auto;
    min-width: 0;
}

.eg-confirm-panel-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

@media (max-width: 760px) {
    .eg-confirm-panel {
        flex-wrap: wrap;
    }

    .eg-confirm-panel-buttons {
        margin-left: auto;
    }
}

.eg-new-panel .eg-sample-picker {
    margin-top: 6px;
}

/* The Welcome page (docs/RULES.md UX-27): what Endgame does, and the two ways in. Same light slate as the License page. */
.eg-welcome-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
}

.eg-welcome {
    width: 100%;
    max-width: 860px;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #CBD5E1;
    border: 1.5px solid rgba(16, 185, 129, 0.35);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25), 0 0 40px rgba(16, 185, 129, 0.15);
    color: #1E293B;
}

.eg-welcome-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: #B8C4D2;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.eg-welcome-icon {
    width: 68px;
    height: 54px;
    object-fit: contain;
}

.eg-welcome-wordmark {
    font-size: 2rem;
}

.eg-welcome-body {
    flex: 1 1 auto;
    padding: 20px 28px 16px;
    overflow-y: auto;
}

.eg-welcome-title {
    margin: 0 0 8px;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    color: #0F172A;
}

.eg-welcome-lead {
    margin: 0 0 16px;
    font-size: 1rem;
    line-height: 1.6;
    color: #334155;
}

.eg-welcome-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.eg-welcome-point {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #F1F5F9;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    font-size: 0.88rem;
    line-height: 1.45;
    color: #334155;
}

.eg-welcome-point .eg-welcome-point-icon {
    flex-shrink: 0;
    color: #059669;
}

.eg-welcome-point-title {
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 2px;
}

.eg-welcome-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.eg-welcome-action .mud-button-root {
    font-weight: 700;
    text-transform: none;
    border-radius: 10px;
}

.eg-welcome-action .mud-button-outlined {
    background: #FFFFFF;
}

.eg-welcome-action-note {
    margin-top: 6px;
    text-align: center;
    font-size: 0.8rem;
    color: #475569;
}

.eg-welcome-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 6px 16px;
    padding: 10px 24px;
    background: #B8C4D2;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 0.8rem;
    color: #475569;
}

.eg-welcome-footer-start {
    justify-self: start;
    white-space: nowrap;
}

.eg-welcome-footer-links {
    display: inline-flex;
    gap: 16px;
}

.eg-welcome-footer-end {
    justify-self: end;
    white-space: nowrap;
}

/* A text link that looks like one (Terms of Use, About Endgame): the primary color, underlined, a little bolder. */
.mud-link.eg-link,
a.eg-link {
    color: var(--mud-palette-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mud-link.eg-link:hover,
.mud-link.eg-link:focus-visible {
    color: var(--mud-palette-primary-darken);
    text-decoration-thickness: 2px;
}

/* The Welcome page's two states (docs/RULES.md UX-27): what Endgame is with the two ways in, or the six sample plans with
   Back. Both sit in the same grid cell; the one not shown is inert and hidden but keeps its size, so the page is the
   size of the larger and never changes size between them. The sample cards are sized so the two come out close. */
.eg-welcome-states {
    display: grid;
}

.eg-welcome-states > .eg-welcome-state {
    grid-area: 1 / 1;
    min-width: 0;
}

.eg-welcome-states > [inert] {
    visibility: hidden;
}

.eg-welcome-samples {
    display: flex;
    flex-direction: column;
}

/* All six cards in a 3 by 2 grid, every row as tall as the tallest, so every card is the same size. */
.eg-welcome-samples .eg-sample-picker {
    flex: 1 1 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 10px;
    margin-top: 6px;
}

.eg-welcome-samples .eg-sample-card {
    padding: 7px 10px;
    gap: 2px;
    font-size: 0.8rem;
    line-height: 1.28;
}

.eg-welcome-samples .eg-sample-card-title {
    font-size: 0.88rem;
}

.eg-welcome-samples .eg-sample-card .eg-sample-card-btn {
    margin-top: 2px;
}

.eg-welcome-samples-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.eg-welcome-samples-head .eg-welcome-point-title {
    margin-bottom: 0;
}

.eg-welcome-samples-head .mud-button-root {
    margin-left: -8px;
    text-transform: none;
    font-weight: 600;
}

@media (max-width: 760px) {
    .eg-welcome-points,
    .eg-welcome-actions {
        grid-template-columns: 1fr;
    }

    .eg-welcome-samples .eg-sample-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .eg-welcome-footer {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .eg-welcome-footer-start,
    .eg-welcome-footer-end {
        justify-self: center;
    }
}

@media (max-height: 820px) {
    .eg-welcome-header {
        padding: 6px 20px;
    }

    .eg-welcome-icon {
        width: 52px;
        height: 42px;
    }

    .eg-welcome-wordmark {
        font-size: 1.6rem;
    }

    .eg-welcome-body {
        padding: 14px 24px 12px;
    }

    .eg-welcome-title {
        font-size: 1.45rem;
    }

    .eg-welcome-lead {
        font-size: 0.92rem;
        margin-bottom: 12px;
    }

    .eg-welcome-points {
        margin-bottom: 14px;
    }
}

/* Small screens (docs/RULES.md UX-26): the page itself never scrolls; only the tab panel (and wide tables) do.
   The header is full size on large screens and compact on narrow or short ones, so the tabs keep their room. */
.endgame-header-icon {
    width: 86px;
    height: 69px;
}

.endgame-header-wordmark {
    font-size: 2.25rem;
}

.endgame-brand {
    flex-shrink: 0;
}

.endgame-status-row {
    max-width: 100%;
    min-width: 0;
}

/* The list tabs' item lists and the Accounts and Strategies editors fit the tab panel (--eg-panel-h, set by endgame.js),
   less the grid's spacing and the list's heading. */
.eg-list-scroll {
    max-height: max(160px, calc(var(--eg-panel-h, 744px) - 88px));
    overflow-y: auto;
}

/* The Expenses list, when the read-only From the Property tab card sits below it, leaves room for the card. */
.eg-list-scroll.eg-list-scroll-short {
    max-height: max(120px, calc(var(--eg-panel-h, 744px) - 88px - 190px));
}

.eg-editor-fill {
    height: max(280px, calc(var(--eg-panel-h, 744px) - 24px));
}

/* Narrow windows: toolbar buttons show only their icons (each keeps its tooltip, and its name for screen readers),
   a smaller logo, and tighter tabs with smaller icons. */
@media (max-width: 1240px) {
    .endgame-header-panel .endgame-toolbar {
        gap: 2px !important;
    }

    .endgame-header-panel .endgame-toolbar .mud-button-root.endgame-toolbar-btn {
        min-width: 0 !important;
        padding: 6px 8px !important;
    }

    .endgame-header-panel .endgame-toolbar .endgame-toolbar-btn .mud-button-label {
        font-size: 0 !important;
    }

    .endgame-header-panel .endgame-toolbar .endgame-toolbar-btn .mud-button-icon-start {
        margin: 0 !important;
    }

    .endgame-toolbar-divider {
        margin: 0 4px;
    }

    .endgame-header-icon {
        width: 60px;
        height: 48px;
    }

    .endgame-header-wordmark {
        font-size: 1.75rem;
    }

    .endgame-tabs .mud-tabs-tabbar {
        padding: 4px 6px 0 6px !important;
    }

    .endgame-tabs .mud-tabs-tabbar .mud-tab,
    .endgame-tabs .mud-tabs-tabbar .mud-tab.mud-ripple {
        margin: 0 1px !important;
        padding: 4px 6px !important;
        min-height: 38px !important;
        letter-spacing: 0.2px;
        font-size: 0.8rem !important;
    }

    .endgame-tabs .mud-tabs-tabbar .mud-tab .mud-icon-root {
        width: 22px;
        height: 22px;
        font-size: 22px;
    }
}

/* Very narrow windows: the tabs show only their names. */
@media (max-width: 1000px) {
    .endgame-tabs .mud-tabs-tabbar .mud-tab .mud-icon-root {
        display: none;
    }
}

/* Short windows (a small laptop): a compact header without the tagline, and less padding around the tab content. */
@media (max-height: 820px) {
    .endgame-header-panel.mud-paper {
        padding-top: 4px !important;
        padding-bottom: 4px !important;
        margin-bottom: 6px !important;
    }

    .endgame-header-icon {
        width: 52px;
        height: 42px;
    }

    .endgame-header-wordmark {
        font-size: 1.6rem;
    }

    .endgame-tagline {
        display: none;
    }

    .mud-main-content.endgame-main-content {
        padding: 6px 12px !important;
    }

    .endgame-tabs .mud-tabs-panels.pa-4 {
        padding: 10px 12px !important;
    }

    .endgame-tabs .mud-tabs-tabbar .mud-tab,
    .endgame-tabs .mud-tabs-tabbar .mud-tab.mud-ripple {
        min-height: 38px !important;
    }

    .endgame-tabs .mud-tabs-tabbar .mud-tab .mud-icon-root {
        width: 24px;
        height: 24px;
        font-size: 24px;
    }
}

/* License page (docs/RULES.md UX-25): the same size and light slate as the Welcome page, wider than it is high. The
   editions are columns of one table, so each feature compares across a row; the one in use is highlighted. */
/* A fixed height (docs/RULES.md UX-31): the License page never changes size while open, whatever it shows (a message,
   a license in use or ended, the key's browsers at its limit); the body scrolls if it must. */
.eg-license {
    position: relative;
    width: 100%;
    max-width: 860px;
    height: min(var(--eg-license-h, 730px), 94vh);
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #CBD5E1;
    border: 1.5px solid rgba(59, 130, 246, 0.35);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25), 0 0 40px rgba(59, 130, 246, 0.15);
    color: #1E293B;
}

.eg-license-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: #B8C4D2;
    border-bottom: 1px solid rgba(59, 130, 246, 0.25);
}

.eg-license-body {
    flex: 1 1 auto;
    padding: 14px 28px 12px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.5;
}

.eg-license-current {
    margin: 0;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.25;
    color: #0F172A;
}

.eg-license-key {
    display: flex;
    align-items: center;
    gap: 8px;
}

.eg-license-key .mud-input-control {
    margin-top: 0;
}

.eg-license-key .mud-button-root {
    flex-shrink: 0;
    margin-top: 4px;
}

.eg-license-terms {
    padding: 6px 8px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    text-align: left;
}

.eg-license-terms .eg-link {
    margin-left: 0.3em;
}

.eg-license-terms-note {
    font-size: 0.8rem;
    color: #475569;
    padding-left: 12px;
}

.eg-license-compare .eg-license-terms-row td {
    padding: 8px 10px 0;
    border-bottom: none;
}

.eg-license-session {
    font-size: 0.82rem;
    line-height: 1.3;
}

.eg-license-term {
    font-size: 0.75rem;
    color: #475569;
}

.eg-license-ended .eg-license-term {
    color: var(--mud-palette-error);
    font-weight: 600;
}

/* Pinned between the scrolling body and the footer, so a message or a key's browsers are never scrolled out of view (UX-31). */
.eg-license-feedback {
    flex: 0 0 auto;
    padding: 6px 28px;
    background: #CBD5E1;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

/* A key's browsers at its device limit: at most about three rows, then they scroll inside the strip. */
.eg-license-devices {
    max-height: 9.5em;
    overflow-y: auto;
}

/* The status line's "Terms updated" notice: a quiet link that opens the Terms of Use (EN-19). */
.eg-terms-notice {
    border: none;
    background: none;
    padding: 0 4px;
    color: #1D4ED8;
    font-size: 0.8rem;
    text-decoration: underline;
    cursor: pointer;
}

/* The link to the public Editions page, just under the comparison table. */
.eg-license-editions-link {
    margin-top: 6px;
    font-size: 0.85rem;
}

.eg-license-message {
    min-height: 1.5em;
}

.eg-license-coming-soon {
    margin-top: 2px;
    font-size: 0.72rem;
    color: #64748B;
    text-align: left;
}

.eg-license-compare {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: #F1F5F9;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 12px;
    overflow: hidden;
    color: #334155;
    font-size: 0.9rem;
}

.eg-license-compare th,
.eg-license-compare td {
    padding: 3px 14px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.eg-license-compare tbody th {
    text-align: left;
    font-weight: 500;
    color: #334155;
    width: 34%;
}

.eg-license-compare .eg-license-limit td {
    font-weight: 700;
    color: #0F172A;
}

.eg-license-compare thead th {
    padding: 6px 14px;
    background: #E2E8F0;
}

.eg-license-tier-name {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0F172A;
}

.eg-license-tier-in-use {
    box-shadow: inset 0 3px 0 var(--mud-palette-primary);
}

.eg-license-in-use {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mud-palette-primary);
}

.eg-license-compare .eg-license-group th {
    padding-top: 5px;
    font-weight: 700;
    color: #0F172A;
    background: #E2E8F0;
}

.eg-license-compare .eg-license-method th {
    padding-left: 28px;
}

.eg-license-tick {
    color: #059669;
    font-size: 1.25rem;
    vertical-align: middle;
}

.eg-license-dash {
    color: #94A3B8;
}

.eg-license-compare .eg-license-actions td {
    padding: 8px 14px 10px;
    vertical-align: middle;
    border-bottom: none;
}

.eg-license-compare .eg-license-actions th {
    border-bottom: none;
}

.eg-license-card-action .mud-button-root {
    text-transform: none;
    font-weight: 700;
}

.eg-license-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 24px;
    background: #B8C4D2;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.eg-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .eg-license-current {
        font-size: 1.25rem;
    }

    .eg-license-key {
        flex-wrap: wrap;
    }

    .eg-license-body {
        padding: 12px 14px 10px;
    }

    .eg-license-feedback {
        padding: 6px 14px;
    }

    .eg-license-compare th,
    .eg-license-compare td {
        padding: 4px 6px;
    }

    .eg-license-compare .eg-license-method th {
        padding-left: 12px;
    }
}

/* Year-by-year breakdown, full screen: the heading (strategy name and Collapse) and the table cover the whole window.
   The z-index is above the app bar and drawer but below MudBlazor's popovers, so the markers' tooltips still show. */
.eg-analysis-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 1150;
    box-sizing: border-box;
    padding: 4px 16px 12px;
    background: var(--mud-palette-background, #fff);
    overflow: auto;
}

/* The year-by-year table scrolls inside itself, so its full-screen view never scrolls. */
.eg-yby-fullscreen {
    overflow: hidden;
}

.analysis-tab-container .eg-proj-section-header .mud-button-root {
    flex-shrink: 0;
    margin-left: 4px;
}

/* The public About page (docs/RULES.md UX-30): plain HTML, readable by search engines, in the app's colours and type. */
/* The app fits the window and scrolls inside itself; the About page is an ordinary page that scrolls as a whole. */
html:has(.eg-landing),
html:has(.eg-landing) body {
    height: auto;
    overflow: auto;
}

.eg-landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #1f2937;
    background: #ffffff;
}

.eg-landing main {
    flex: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

.eg-landing-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 3px solid #B7791F;
    background: #ffffff;
}

.eg-landing-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.eg-landing-brand .endgame-wordmark {
    font-size: 1.9rem;
}

.eg-landing-icon {
    height: 40px;
    width: auto;
}

.eg-landing-hero {
    padding: 56px 0 32px;
    max-width: 820px;
}

.eg-landing-hero h1 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 2.6rem;
    line-height: 1.15;
    color: #111827;
    margin-bottom: 18px;
}

.eg-landing-lead {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #334155;
}

.eg-landing-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    margin-top: 24px;
}

.eg-landing-button {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 6px;
    background: #334155;
    color: #ffffff;
    font-weight: 500;
    font-size: 1.05rem;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.eg-landing-button:hover,
.eg-landing-button:focus-visible {
    background: #1e293b;
    color: #ffffff;
}

.eg-landing-button-small {
    padding: 7px 16px;
    font-size: 0.9rem;
}

.eg-landing-note {
    color: #475569;
}

.eg-landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 16px 0 40px;
}

.eg-landing-grid article {
    border: 1px solid #e2e8f0;
    border-top: 3px solid #334155;
    border-radius: 6px;
    padding: 18px 20px;
}

.eg-landing-grid h2,
.eg-landing-faq h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.eg-landing-faq {
    max-width: 820px;
}

/* The public Terms page: the app's Terms text, the width of the questions. */
.eg-terms-page {
    max-width: 860px;
    padding-bottom: 32px;
}

.eg-landing-faq h2 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1.7rem;
    margin-bottom: 16px;
}

.eg-landing-faq h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
    margin: 18px 0 6px;
}

.eg-landing-grid p,
.eg-landing-faq p {
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

/* The Editions page (docs/EDITIONS.md): a card per edition, and the editions side by side in one table. */
.eg-edition-card ul {
    margin: 8px 0 0;
    padding-left: 20px;
    line-height: 1.7;
    color: #374151;
}

.eg-edition-price {
    font-weight: 600;
    color: #B7791F !important;
}

.eg-edition-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.eg-edition-table th,
.eg-edition-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.eg-edition-table thead th {
    border-bottom: 2px solid #334155;
    color: #111827;
}

/* The changes log (/changes): the date stays on one line, and the two text columns share the rest. */
.eg-changes-table .eg-changes-date {
    white-space: nowrap;
    color: #475569;
}

.eg-changes-table td:nth-child(2) {
    width: 55%;
}

.eg-date-note a {
    margin-left: 1px;
    color: #B7791F;
    text-decoration: none;
    font-weight: 700;
}

.eg-landing-footnotes {
    max-width: 820px;
    margin-top: 32px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #64748b;
}

.eg-landing-footnotes sup {
    color: #B7791F;
    font-weight: 700;
}

.eg-edition-table tbody th {
    font-weight: 500;
    color: #475569;
    width: 30%;
}

.eg-landing-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.85rem;
}

.eg-landing-footer a {
    color: inherit;
}

@media (max-width: 600px) {
    .eg-landing-hero {
        padding-top: 32px;
    }

    .eg-landing-hero h1 {
        font-size: 2rem;
    }
}
