/* Finance controls: phone layout is the primary layout. */
[hidden]{display:none!important}
body{padding-bottom:calc(94px + env(safe-area-inset-bottom))}
.draft-notice{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;border-bottom:1px solid #cbdce9;padding:12px 0;font-size:12px;color:#486476}
.draft-notice strong{color:#004b76}.draft-notice button{margin-left:auto;padding:6px 12px;min-height:44px;font-size:12px}
.draft-home-settings{padding:14px 0;border-block:1px solid #d6e3eb;margin:16px 0}
.draft-home-settings h3{font-size:17px;margin:0 0 12px;color:#004b76}
.draft-home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end}
.draft-home-grid .field:last-child{grid-column:1/-1}.draft-home-grid .field{min-width:0}
.draft-home-grid label{font-size:12px}.draft-home-grid input,.draft-home-grid select{width:100%;min-height:48px;font-size:16px}
.draft-dates{font-size:12px;line-height:1.6;margin:8px 0 0;color:#004b76}
.draft-home-settings .small{font-size:11px;margin:10px 0 0}
.draft-bottom-bar{position:fixed;bottom:0;left:0;right:0;z-index:90;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:8px 10px calc(8px + env(safe-area-inset-bottom));border-top:1px solid #cbdce9;background:#fff;box-shadow:0 -3px 12px #004b7609}
.draft-bottom-bar button{min-width:0;min-height:62px;border:1px solid #cbdce9;background:#e7f2f8;color:#004b76;border-radius:20px;padding:7px 5px;font:500 12px/1.3 Montserrat,Arial;overflow-wrap:normal}
.draft-bottom-bar button small{display:block;font-size:11px;line-height:1.3;margin-top:3px;color:inherit}
.draft-bottom-bar button[aria-pressed=true]{background:#004b76;color:white;border-color:#004b76}
.draft-bottom-bar button:disabled{opacity:.65}
.draft-bottom-bar button:hover{background:#d4e8f5}.draft-bottom-bar button[aria-pressed=true]:hover{background:#006ab6}
.draft-dialog{box-sizing:border-box;width:min(620px,calc(100% - 20px));max-height:calc(100dvh - 24px);padding:0;border:1px solid #b6cfdd;border-radius:14px;background:white;color:#334d5d;overscroll-behavior:contain}
.draft-dialog::backdrop{background:#003b5580}
.draft-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:0;z-index:2;background:white;border-bottom:1px solid #d5e3ec;padding:12px 14px}
.draft-dialog-heading h2{font:400 25px/1.2 Georgia,serif;color:#004b76;margin:0}.draft-dialog-heading button{min-height:44px;flex-shrink:0;padding:8px 10px}
#draftDialogContent{padding:14px}#draftDialogContent p{font-size:13px;line-height:1.6}
#draftDialogContent .quick-details{padding:0;margin:0;background:white}
#draftDialogContent input,#draftDialogContent select{font-size:16px;min-height:48px;width:100%}
#draftDialogContent .quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#draftDialogContent .quick-grid>.wide{grid-column:1/-1}.draft-dialog-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
.draft-dialog-actions button{flex:1;min-height:48px}
.draft-more-list{display:grid;gap:8px}.draft-more-list button{text-align:left;min-height:52px;padding:12px}
.draft-reserve-summary{font-size:13px;line-height:1.6;padding:10px 12px;background:white;border-radius:8px;margin:12px 0}
.draft-reserve-summary strong{color:#004b76}
.education-panel #educationChart{position:relative}
.draft-paired-bars{display:flex;align-items:stretch;gap:6px;width:max-content;min-width:100%;padding-top:26px;padding-bottom:6px}
.draft-month-pair{display:flex;flex-direction:column;flex:1 0 64px;width:64px;max-width:90px;min-width:64px;gap:0;padding:6px 4px;border:0;border-radius:8px;color:#334d5d;background:transparent;text-align:center;min-height:0;box-shadow:none}
.draft-month-pair:hover{background:#e2edf4}.draft-month-pair[aria-pressed=true]{background:#dceaf4;box-shadow:inset 0 0 0 2px #7aaac9}
.draft-pair-columns{display:flex;align-items:flex-end;justify-content:center;gap:5px;height:184px;border-bottom:1px solid #8faaba;width:100%}
.draft-pair-columns>i{display:block;width:22px;min-height:0;border:0;border-radius:3px 3px 0 0}
.draft-pair-columns .draft-saving{background:#278674}.draft-pair-columns .draft-expenditure{background:#006ab6}
.draft-month-pair .draft-month-label{font-size:12px;line-height:1.35;margin-top:9px;font-weight:600}
.draft-month-pair .draft-pair-key{font-size:11px;color:#526d7e;margin-top:4px;line-height:1.3}
.draft-chart-unit{font-size:11px;color:#526d7e;margin:8px 0 0}.draft-chart-unit strong{font-weight:600;color:#004b76}
#educationLegend{font-size:12px;gap:8px 16px;flex-wrap:wrap}#educationLegend i{width:10px;height:12px}
#educationLegend .draft-saving{background:#278674}#educationLegend .draft-expenditure{background:#006ab6}
.draft-month-values{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.draft-month-values strong{display:block;color:#004b76;font-size:19px}.draft-month-values span{font-size:12px}
.draft-housing-inline,.draft-footer-note{font-size:12px;color:#526d7e}
body:has(#draftDialog[open]){overflow:hidden}body:has(dialog[open]) .draft-bottom-bar{visibility:hidden}
.draft-more-list button small{display:block;font-size:12px;margin-top:4px}
@media(min-width:651px){.draft-home-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.draft-home-grid .field:last-child{grid-column:auto}.draft-bottom-bar{display:flex;justify-content:center;gap:10px}.draft-bottom-bar button{flex:0 1 210px;font-size:14px;min-height:52px;padding:8px 14px;border-radius:26px}.draft-bottom-bar button small{display:inline;margin:0 0 0 5px}}
@media(max-width:350px){.draft-bottom-bar{gap:4px;padding-inline:6px}.draft-bottom-bar button{font-size:11px;border-radius:15px;padding-inline:4px;min-height:64px}#draftDialogContent .quick-grid{grid-template-columns:1fr}.draft-dialog-heading h2{font-size:22px}.draft-notice span{width:100%;order:3}.draft-month-values strong{font-size:17px}}
@media(prefers-reduced-motion:no-preference){.draft-pair-columns>i{transition:height .2s ease}}
@media print{.draft-bottom-bar,.draft-notice{display:none}}
.draft-rotate-hint{display:none;font-size:12px;line-height:1.5;color:#526d7e;margin:8px 0 12px}
@media(max-width:760px) and (orientation:portrait){.draft-rotate-hint{display:block}}
@media(max-height:500px) and (orientation:landscape){.draft-dialog{max-height:calc(100dvh - 12px);margin:6px auto}.draft-dialog-heading{padding:6px 12px}.draft-bottom-bar{padding-top:5px;padding-bottom:calc(5px + env(safe-area-inset-bottom))}.draft-bottom-bar button{min-height:44px}.draft-bottom-bar button small{display:inline;margin-left:5px}body{padding-bottom:calc(68px + env(safe-area-inset-bottom))}}
@media(max-width:760px){body:has(input:not([type=checkbox]):focus,textarea:focus) .draft-bottom-bar{visibility:hidden}}
/* Native checkboxes retain their own geometry inside full-width modal forms. */
#draftDialogContent input:not([type=checkbox]),#draftDialogContent select{width:100%;min-height:48px}
#draftDialogContent .check{display:flex;align-items:center;gap:12px;min-height:48px;padding:10px 0;font-size:13px;line-height:1.5}
#draftDialogContent .check input[type=checkbox]{appearance:auto;width:20px;min-width:20px;max-width:20px;height:20px;min-height:20px;flex:0 0 20px;margin:0;padding:0}
#draftDialogContent .check>span{display:block;flex:1;min-width:0;white-space:normal}
/* Exclude paired chart bars from legacy pill-button styling. */
.education-panel .month-bar.draft-month-pair{height:auto;min-height:0;border:0;border-radius:6px;background:transparent;padding:6px 4px;font-size:12px;font-weight:400;box-shadow:none;justify-content:flex-start}
.education-panel .month-bar.draft-month-pair:hover{background:#e2edf4}
.education-panel .month-bar.draft-month-pair[aria-pressed=true]{background:#dceaf4;box-shadow:inset 0 0 0 2px #7aaac9}
.draft-month-pair .draft-month-label{font-size:11px;line-height:1.4;font-weight:500;white-space:normal}
.draft-month-pair .draft-pair-key strong{font-size:11px;color:#004b76;white-space:nowrap}
.draft-home-settings{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 12px}
.draft-home-settings h3{margin:0 0 4px}.draft-home-settings #draftHomeSummary{font-size:12px;margin:0}
.draft-home-settings .draft-dates{flex-basis:100%;margin-top:0}
.panel .draft-home-settings button:not(.month-bar){min-height:44px;font-size:12px}
.draft-timing-estimate{padding:12px;background:#edf5fb;border-radius:8px;color:#004b76;margin:14px 0 8px}
#draftOutgoingsView{scroll-margin-top:16px}
#draftOutgoingsGate>h2{font-size:25px;margin-bottom:10px}
#draftOutgoingsGate>button{min-height:48px;padding:10px 18px;font-size:14px;background:#006ab6;color:white;border-color:#006ab6}
#draftTimingForm .quick-grid{align-items:end}
@media(max-width:500px){#draftTimingForm .quick-grid{grid-template-columns:1fr}#draftTimingForm select{font-size:16px}.draft-home-settings{gap:10px}}
@media(max-height:500px) and (orientation:landscape){.draft-bottom-bar button{font-size:12px}#draftOutgoingsView{scroll-margin-top:6px}.draft-dialog-heading h2{font-size:22px}}

/* Proportional project timeline joined to stage details. */
#timeline>.section-top{display:block}
#timeline>.section-top>div{width:100%;min-width:0}
#timeline>.section-top .small{max-width:70ch}
.construction-journey{margin:16px 0 12px;border:1px solid #d3e2eb;border-radius:12px;background:#fff;overflow:hidden}
#proportionalTimeline{padding:14px 12px 12px}
.project-duration{display:flex;justify-content:space-between;align-items:center;gap:6px 12px;flex-wrap:wrap;font-size:12px;color:#526d7e;margin-bottom:12px}
.project-duration strong{font-weight:600;color:#004b76;white-space:nowrap}
.project-duration-track{display:flex;align-items:stretch;width:100%;min-height:92px;border-radius:8px;overflow:hidden;background:#e7f2f8}
.project-phase{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:6px;min-width:0;padding:12px 10px;overflow:hidden}
.project-phase>span{display:block;max-width:100%;font-size:12px;line-height:1.35;overflow-wrap:normal;hyphens:manual;font-weight:500}
.project-phase>strong{display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 5px;max-width:100%;font-size:23px;line-height:1.15;font-weight:600;font-variant-numeric:tabular-nums}
.project-phase small{font-size:12px;font-weight:500;line-height:1.2}
.project-before{color:#004b76;background:#dcecf6}
.project-build{color:white;background:#006ab6;border-left:3px solid white}
.project-dates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.project-dates>div{min-width:0;display:flex;flex-direction:column;gap:4px}
.project-dates span{font-size:11px;line-height:1.4;color:#526d7e}
.project-dates strong{font-size:12px;line-height:1.5;font-weight:500;color:#004b76}
.project-dates>div:nth-child(2){text-align:center}.project-dates>div:last-child{text-align:right}
.construction-journey>.build-explainer{margin:0;padding:0;border-top:1px solid #d3e2eb}
.construction-journey>.build-explainer>summary{display:flex;align-items:center;gap:8px;min-height:48px;padding:12px;font-size:14px;background:#f3f8fb;list-style:none}
.construction-journey>.build-explainer>summary::-webkit-details-marker{display:none}
.construction-journey>.build-explainer>summary:before{content:'▸';font-size:15px;flex:none}
.construction-journey>.build-explainer[open]>summary:before{content:'▾'}
.construction-journey>.build-explainer[open]>summary{margin:0 0 12px}
.construction-journey>.build-explainer>p,.construction-journey>.build-explainer>div,.construction-journey>.build-explainer>details{margin-left:12px;margin-right:12px}
.construction-journey>.build-explainer>p{font-size:12px;line-height:1.6}
.construction-journey>.build-explainer>.build-stages{padding-bottom:12px}
@media(min-width:651px){#proportionalTimeline{padding:16px}.project-duration-track{min-height:82px}.project-phase{padding:14px 16px;gap:6px}.project-phase>strong{font-size:26px}.project-dates strong{white-space:nowrap}}
@media(max-width:350px){#proportionalTimeline{padding:12px 10px}.project-duration{font-size:11px}.project-phase{padding:10px 7px}.project-phase>strong{font-size:20px}.project-phase>span,.project-phase small{font-size:11px}.project-dates{gap:6px}.project-dates strong{font-size:11px}}
.project-phase[data-compact=true]{padding-inline:0;border-left:0}
.project-phase[data-compact=true]>*{visibility:hidden}
.project-thin-caption{font-size:12px;line-height:1.5;color:#004b76;margin:8px 0 0}
