/* A single screenshot sheet: every costing item stays on the same canvas. */
.saved-review-modal.single-cost-modal .modal{width:min(1120px,96vw);height:96dvh;max-height:96dvh}
.single-cost-modal .modal-head{padding:7px 14px}.single-cost-modal .modal-head h2{font-size:14px}
.single-cost-modal .modal-head button{min-height:30px;min-width:30px;padding:2px}
.single-cost-modal .modal-body{padding:8px 16px;display:flex;flex-direction:column;overflow:hidden;min-height:0}
.single-cost-modal .modal-foot{display:flex;justify-content:flex-end;padding:6px 14px;gap:8px;min-height:40px}
.single-cost-modal .modal-foot>button{min-height:32px;padding:5px 12px;font-size:11px}
.cost-sheet-viewport{flex:1;min-height:0;min-width:0;position:relative;overflow:hidden}
.cost-sheet-canvas{position:absolute;left:50%;top:0;transform-origin:top center;width:100%}
.cost-sheet-fit-note{font-size:10px;line-height:1.25;color:var(--muted);margin:4px 0 0;text-align:center;flex:none}
.cost-sheet-fit-note:empty{display:none}
.saved-cost-sheet{color:#24382c;background:white;min-width:0;font-size:12px;line-height:1.3}
.saved-cost-sheet p{margin:0;overflow-wrap:anywhere;line-height:1.3}
.cost-sheet-head{display:flex;align-items:baseline;gap:5px 12px;flex-wrap:wrap;border-bottom:1px solid #dce5dd;padding-bottom:5px}
.cost-sheet-head>strong{font-size:17px;flex:1;min-width:160px;overflow-wrap:anywhere}
.cost-sheet-head>span{font-size:10px;color:#66796b}.cost-sheet-head>small{font-size:10px;color:#66796b}
.cost-sheet-facts{font-size:11px!important;padding:5px 0;font-weight:650}
.cost-sheet-section{margin:5px 0 0;min-width:0}.cost-sheet-section h3{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#41624b;border-bottom:1px solid #dbe4dd;padding:3px 0;margin:0 0 3px}
.cost-sheet-item{padding:4px 0;border-bottom:1px solid #edf1ed;min-width:0;break-inside:avoid}
.cost-sheet-item-head{display:flex;justify-content:space-between;gap:8px;font-size:12px;line-height:1.3}
.cost-sheet-item-head>strong{min-width:0;overflow-wrap:anywhere}.cost-sheet-item-head>b{white-space:nowrap;font-variant-numeric:tabular-nums;flex:none}
.cost-sheet-meta{color:#556d5e;font-size:10px}.cost-sheet-period{padding:3px 0 0}
.cost-sheet-calculation{font-size:11px;color:#2f4436;display:flex;justify-content:space-between;gap:5px;flex-wrap:wrap}
.cost-sheet-calculation>strong{margin-left:auto;white-space:nowrap}
.cost-sheet-subtotal{display:flex;justify-content:space-between;gap:8px;font-size:11px}
.cost-sheet-subtotal>strong{white-space:nowrap;font-variant-numeric:tabular-nums}
.cost-sheet-tax,.cost-sheet-source{display:inline;font-size:9px;color:#697c6d}
.cost-sheet-tax:after{content:' · '}.cost-sheet-source:after{content:''}
.cost-sheet-note{font-size:9px;color:#8c592b}.cost-sheet-empty{font-size:10px;color:#768476;padding:2px 0}
.cost-sheet-totals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(150px,1.35fr);gap:4px 8px;margin:7px 0 0;padding:7px 9px;background:#f2f6ef;border:1px solid #d6e2d6;border-radius:6px}
.cost-sheet-totals>div{min-width:0}.cost-sheet-totals dt{font-size:10px;color:#607262;line-height:1.3}.cost-sheet-totals dd{margin:2px 0 0;font-weight:700;font-size:13px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.cost-sheet-totals .is-buying dt{color:#27583a;font-weight:700}.cost-sheet-totals .is-buying dd{font-size:17px;color:#194f2d}
.cost-sheet-bands{display:grid;grid-template-columns:1.65fr 1.25fr 1fr;align-items:end;gap:8px;margin:7px 0 0}
.cost-sheet-band{display:flex;flex-direction:column;justify-content:center;gap:4px;min-width:0;border:1px solid #c3d8c7;border-radius:7px;padding:8px 10px;background:#eff8f0}
.cost-sheet-band>span{font-size:12px;font-weight:700}.cost-sheet-band>strong{font-size:23px;font-variant-numeric:tabular-nums;line-height:1.2;overflow-wrap:anywhere}
.cost-sheet-band>small{font-size:10px;line-height:1.2}.cost-sheet-band.band-green{min-height:116px;border:2px solid #348550;background:#eaf6ec;color:#216c3a}
.cost-sheet-band.band-blue{min-height:94px;background:#eef5ff;color:#285f9d;border-color:#c2d5f0}.cost-sheet-band.band-blue>strong{font-size:20px}
.cost-sheet-band.band-red{min-height:76px;background:#fff2f1;color:#a83e37;border-color:#e5c5c0}.cost-sheet-band.band-red>strong{font-size:16px}.cost-sheet-band.band-red{padding:6px;gap:2px}.cost-sheet-band.band-red>span{font-size:10px}.cost-sheet-band.band-red>small{font-size:9px}
.cost-sheet-selected{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:6px;padding:6px 9px;background:#f3f6ef;border:1px solid #dbe5d6;border-radius:5px}
.cost-sheet-selected>span{font-size:11px;font-weight:650}.cost-sheet-selected small{font-weight:400;font-size:10px;display:block}
.cost-sheet-selected>strong{font-size:19px;font-variant-numeric:tabular-nums;white-space:nowrap}
.cost-sheet-admin{font-size:10px;color:#62492b;background:#fff7e8;padding:5px;margin-top:4px!important}
.cost-sheet-notices,.cost-sheet-caption{font-size:9px;color:#6c7b6d;margin-top:3px!important}
.pricing-access-status{font-size:11px;display:block;margin-bottom:6px}.pricing-access-controls{min-width:140px}
@media(min-width:741px){.saved-cost-sheet{display:grid;grid-template-columns:1.1fr 1fr;gap:0 18px}.cost-sheet-head,.cost-sheet-facts,.cost-sheet-totals,.cost-sheet-bands,.cost-sheet-selected,.cost-sheet-admin,.cost-sheet-notices,.cost-sheet-caption,.saved-cost-sheet>.cost-sheet-note{grid-column:1/-1}.cost-sheet-hotels{grid-column:1;grid-row:3/span 3}.cost-sheet-transport{grid-column:2;grid-row:3}.cost-sheet-additional{grid-column:2;grid-row:4}.cost-sheet-festive{grid-column:2;grid-row:5}}
@media(max-width:740px){
  .saved-review-modal.single-cost-modal .modal{width:100%;height:100dvh;max-height:100dvh}
  .single-cost-modal .modal-body{padding:5px 9px}.single-cost-modal .modal-head{padding:5px 9px}.single-cost-modal .modal-foot{padding:4px 9px;padding-bottom:max(4px,env(safe-area-inset-bottom));min-height:35px}
  .single-cost-modal .modal-foot>button{min-height:30px;font-size:10px;padding:4px 8px}
  .saved-cost-sheet{font-size:11px;line-height:1.25}.saved-cost-sheet p{line-height:1.25}
  .cost-sheet-head{display:grid;grid-template-columns:1fr auto;gap:1px 6px;padding-bottom:3px}
  .cost-sheet-head>strong{font-size:14px;grid-column:1/-1;min-width:0}.cost-sheet-head>span{font-size:9px}.cost-sheet-head>small{font-size:8px;text-align:right;max-width:130px}
  .cost-sheet-facts{font-size:10px!important;padding:4px 0}
  .cost-sheet-section{margin-top:3px}.cost-sheet-section h3{font-size:10px;padding:1px 0;margin-bottom:1px}
  .cost-sheet-item{padding:2px 0}.cost-sheet-item-head{font-size:11px}.cost-sheet-meta{font-size:9px}
  .cost-sheet-period{padding-top:2px}.cost-sheet-calculation,.cost-sheet-subtotal{font-size:10px}
  .cost-sheet-tax,.cost-sheet-source,.cost-sheet-note{font-size:8px}
  .cost-sheet-totals{grid-template-columns:repeat(4,minmax(0,1fr));gap:2px 5px;margin-top:5px;padding:4px 6px}
  .cost-sheet-totals dt{font-size:9px}.cost-sheet-totals dd{font-size:10px;margin-top:1px}
  .cost-sheet-totals .is-buying{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;border-top:1px solid #dce5d8;padding-top:3px}
  .cost-sheet-totals .is-buying dt{font-size:11px}.cost-sheet-totals .is-buying dd{font-size:15px;margin:0}
  .cost-sheet-bands{gap:5px;margin-top:5px}.cost-sheet-band{padding:5px;gap:2px}
  .cost-sheet-band.band-green{min-height:92px}.cost-sheet-band.band-blue{min-height:73px}.cost-sheet-band.band-red{min-height:56px}
  .cost-sheet-band>span{font-size:10px}.cost-sheet-band>strong{font-size:17px}.cost-sheet-band.band-blue>strong{font-size:14px}.cost-sheet-band.band-red>strong{font-size:11px}
  .cost-sheet-band>small{font-size:8px}.cost-sheet-band.band-red{padding:4px;gap:1px}.cost-sheet-band.band-red>small{font-size:7px}.cost-sheet-selected{padding:4px 6px;margin-top:4px}.cost-sheet-selected>span{font-size:10px}.cost-sheet-selected small{font-size:9px}.cost-sheet-selected>strong{font-size:16px}
  .cost-sheet-notices,.cost-sheet-caption{font-size:8px}.cost-sheet-fit-note{font-size:9px;margin-top:2px}
}

/* Search is on the history list; it never changes the saved screenshot sheet. */
.history-filter-panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:8px}
.history-search-row{display:flex;align-items:flex-end;gap:8px}.history-search-row>.field{flex:1;min-width:0}.history-search-row>button{flex:none;min-height:42px}
.history-extra-filters{margin-top:10px}.history-extra-filters>summary{cursor:pointer;font-size:12px;font-weight:650;color:var(--green);padding:5px 0}.history-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:10px;margin-top:8px}.history-filter-grid>button{min-height:42px}.history-filter-hint{font-size:10px;color:var(--muted);margin-top:8px}.history-result-count{font-size:11px;color:var(--muted);margin:10px 0}
@media(max-width:740px){.history-filter-panel{padding:9px}.history-search-row{flex-wrap:wrap;gap:6px}.history-search-row>.field{flex-basis:100%}.history-search-row>button{min-height:44px;font-size:12px}.history-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.history-filter-grid>.field{min-width:0}.history-filter-grid input,.history-filter-grid select{min-width:0;width:100%}.history-filter-grid>button{min-height:44px}.history-result-count{font-size:10px}}

/* Compact ledger. The canvas reflows first, then fits the available screen. */
.saved-review-modal.single-cost-modal{padding:8px;align-items:center}
.saved-review-modal.single-cost-modal .modal{width:min(1280px,100%);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px)}
.single-cost-modal .modal-head{padding:6px 12px;gap:8px;flex:none}
.single-cost-modal .modal-head h2{font-size:13px}
.single-cost-modal .modal-body{padding:6px 12px}
.single-cost-modal .modal-foot{padding:5px 12px;min-height:36px;flex:none}
.saved-cost-sheet.cost-sheet-ledger{display:block;container:costing-ledger / inline-size;font-size:12px;line-height:1.25;color:#263e46;background:#fff}
.cost-sheet-ledger p{line-height:1.25;overflow-wrap:anywhere}
.cost-sheet-ledger .cost-sheet-head{padding-bottom:4px;border-color:#d6e2e7;gap:2px 10px}
.cost-sheet-ledger .cost-sheet-head>strong{font-size:17px;color:#193b46}
.cost-sheet-ledger .cost-sheet-head>span,.cost-sheet-ledger .cost-sheet-head>small{font-size:10px;color:#627882}
.cost-sheet-ledger .cost-sheet-facts{padding:5px 8px!important;margin:5px 0!important;border-radius:5px;background:#f1f6f8;font-size:11px!important;color:#334e5a;line-height:1.3}
.cost-sheet-ledger .cost-sheet-details{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:0 14px;align-items:start;min-width:0}
.cost-sheet-ledger .cost-sheet-services{min-width:0}
.cost-sheet-ledger .cost-sheet-section{grid-column:auto;grid-row:auto;margin:0 0 5px;min-width:0}
.cost-sheet-ledger .cost-sheet-section h3{background:#f2f6f8;color:#326073;border:0;border-bottom:1px solid #dbe6eb;border-radius:3px 3px 0 0;padding:4px 6px;margin:0;font-size:11px;text-transform:none;letter-spacing:0}
.cost-sheet-ledger .cost-sheet-item{padding:4px 5px;border-bottom:1px solid #e3ebef;min-width:0}
.cost-sheet-ledger .cost-sheet-item-head{display:grid;grid-template-columns:minmax(0,1fr) auto 22px;align-items:center;gap:4px 7px;font-size:12px;line-height:1.2}
.cost-sheet-ledger .cost-sheet-item-head>strong{min-width:0;grid-column:1;grid-row:1}
.cost-sheet-ledger .cost-sheet-item-head>b{grid-column:2;grid-row:1;font-size:12px;white-space:normal;overflow-wrap:anywhere;text-align:right}
.cost-sheet-ledger .cost-sheet-disclosure{grid-column:3;grid-row:1;min-width:22px;min-height:22px;width:22px;height:22px;align-self:start;display:grid;place-items:center;padding:0;background:transparent;color:#587482;border:0;border-radius:4px;font-size:15px;line-height:1}
.cost-sheet-ledger .cost-sheet-disclosure:hover{background:#e9f0f4}
.cost-sheet-ledger .cost-sheet-disclosure[aria-expanded="false"]>span{transform:rotate(-90deg)}
.cost-sheet-ledger .cost-sheet-description{display:grid;gap:1px;margin-top:2px;min-width:0}
.cost-sheet-ledger .cost-sheet-description[hidden]{display:none}
.cost-sheet-ledger .cost-sheet-meta{font-size:10px;color:#526d78}
.cost-sheet-ledger .cost-sheet-period{padding-top:2px;min-width:0}
.cost-sheet-ledger .cost-sheet-period+.cost-sheet-period{border-top:1px dashed #dfe7eb;margin-top:2px}
.cost-sheet-ledger .cost-sheet-calculation,.cost-sheet-ledger .cost-sheet-subtotal{font-size:11px;color:#2e4a56;line-height:1.25}
.cost-sheet-ledger .cost-sheet-subtotal{gap:5px;flex-wrap:wrap}
.cost-sheet-ledger .cost-sheet-subtotal>strong{white-space:normal}
.cost-sheet-ledger .cost-sheet-source{display:block;font-size:9px;color:#607680;overflow-wrap:anywhere;white-space:normal}
.cost-sheet-ledger .cost-sheet-source+.cost-sheet-source{margin-top:1px}
.cost-sheet-ledger .cost-sheet-note,.cost-sheet-ledger .cost-sheet-notices,.cost-sheet-ledger .cost-sheet-warnings{font-size:9px;line-height:1.25;color:#80561e;white-space:pre-wrap;overflow-wrap:anywhere}
.cost-sheet-ledger .cost-sheet-empty{font-size:10px;padding:5px;color:#627982}
.cost-sheet-ledger .cost-sheet-summary{display:grid;grid-template-columns:minmax(125px,.7fr) minmax(0,2.8fr);gap:12px;border-top:2px solid #d4e2e8;margin-top:5px;padding-top:6px;align-items:end}
.cost-sheet-ledger .cost-sheet-summary>.cost-sheet-totals,.cost-sheet-ledger .cost-sheet-summary>.cost-sheet-bands{grid-column:auto;grid-row:auto}
.cost-sheet-ledger .cost-sheet-totals{display:flex;flex-direction:column;gap:3px;margin:0;padding:0 0 2px;background:transparent;border:0;border-radius:0;min-width:0}
.cost-sheet-ledger .cost-sheet-totals>div{display:flex;align-items:baseline;justify-content:space-between;gap:5px;min-width:0}
.cost-sheet-ledger .cost-sheet-totals dt{font-size:11px;color:#4f6873}
.cost-sheet-ledger .cost-sheet-totals dd{font-size:12px;margin:0;white-space:nowrap;text-align:right}
.cost-sheet-ledger .cost-sheet-totals .is-buying{border-top:1px solid #d4e2e8;padding-top:5px;margin-top:2px;flex-wrap:wrap}
.cost-sheet-ledger .cost-sheet-totals .is-buying dt{font-size:12px;color:#263e46}
.cost-sheet-ledger .cost-sheet-totals .is-buying dd{font-size:16px;color:#193b46}
.cost-sheet-ledger .cost-sheet-bands{grid-template-columns:1.5fr 1.15fr 1fr;gap:6px;margin:0;min-width:0}
.cost-sheet-ledger .cost-sheet-band{gap:3px;padding:8px;min-width:0;border-width:1px;border-radius:7px}
.cost-sheet-ledger .cost-sheet-band>span{font-size:11px}
.cost-sheet-ledger .cost-sheet-band>strong{font-size:19px;line-height:1.1;overflow-wrap:anywhere}
.cost-sheet-ledger .cost-sheet-band>small{font-size:10px;line-height:1.2}
.cost-sheet-ledger .cost-sheet-band.band-green{min-height:94px;background:#eaf7ee;border-color:#bcdcc8;color:#20643b}
.cost-sheet-ledger .cost-sheet-band.band-blue{min-height:79px;background:#edf4ff;border-color:#cadcf2;color:#275483}
.cost-sheet-ledger .cost-sheet-band.band-blue>strong{font-size:17px}
.cost-sheet-ledger .cost-sheet-band.band-red{min-height:67px;background:#fff1ee;border-color:#edd2ca;color:#9c4838;padding:6px;gap:2px}
.cost-sheet-ledger .cost-sheet-band.band-red>strong{font-size:15px}
.cost-sheet-ledger .cost-sheet-band.band-red>span,.cost-sheet-ledger .cost-sheet-band.band-red>small{font-size:9px}
.cost-sheet-ledger .cost-sheet-selected{background:transparent;border:0;border-top:1px solid #d7e3e8;border-radius:0;padding:5px 0 1px;margin-top:5px}
.cost-sheet-ledger .cost-sheet-selected>span{font-size:11px;color:#45616f}
.cost-sheet-ledger .cost-sheet-selected small{font-size:10px;display:inline;margin-left:6px}
.cost-sheet-ledger .cost-sheet-selected>strong{font-size:18px;color:#193b46;white-space:normal;overflow-wrap:anywhere;text-align:right}
.cost-sheet-ledger .cost-sheet-caption{font-size:9px;color:#607782;margin-top:3px!important}
.cost-sheet-ledger .cost-sheet-notices,.cost-sheet-ledger .cost-sheet-warnings{margin-top:4px!important;padding:4px 6px;background:#fff6e5;border-radius:4px}
.cost-sheet-ledger .cost-sheet-notices ul,.cost-sheet-ledger .cost-sheet-warnings ul{margin:0;padding-left:14px}
.cost-sheet-ledger .cost-sheet-notices li,.cost-sheet-ledger .cost-sheet-warnings li{margin:0}
@container costing-ledger (max-width:520px){
  .cost-sheet-ledger .cost-sheet-details{grid-template-columns:minmax(0,1fr);gap:0}
  .cost-sheet-ledger .cost-sheet-summary{grid-template-columns:minmax(0,1fr);gap:5px}
  .cost-sheet-ledger .cost-sheet-totals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px 7px}
  .cost-sheet-ledger .cost-sheet-totals>div{display:block}
  .cost-sheet-ledger .cost-sheet-totals .is-buying{grid-column:1/-1;display:flex}
  .cost-sheet-ledger .cost-sheet-totals dt{font-size:10px}
  .cost-sheet-ledger .cost-sheet-totals dd{font-size:11px;text-align:left}
  .cost-sheet-ledger .cost-sheet-band>strong{font-size:17px}
  .cost-sheet-ledger .cost-sheet-band.band-blue>strong{font-size:15px}
  .cost-sheet-ledger .cost-sheet-band.band-red>strong{font-size:12px}
  .cost-sheet-ledger .cost-sheet-band.band-green{min-height:86px}
  .cost-sheet-ledger .cost-sheet-band.band-blue{min-height:74px}
  .cost-sheet-ledger .cost-sheet-band.band-red{min-height:64px}
}
@media(max-width:740px){
  .saved-review-modal.single-cost-modal{padding:0}
  .saved-review-modal.single-cost-modal .modal{width:100%;height:100dvh;max-height:100dvh;border-radius:0}
  .single-cost-modal .modal-head{padding:4px 8px;min-height:31px}
  .single-cost-modal .modal-body{padding:4px 8px}
  .single-cost-modal .modal-foot{padding:4px 8px;padding-bottom:max(4px,env(safe-area-inset-bottom));min-height:36px}
  .single-cost-modal .modal-foot>button{min-height:28px;font-size:10px}
  .cost-sheet-ledger .cost-sheet-head{display:flex;gap:2px 8px}
  .cost-sheet-ledger .cost-sheet-head>strong{min-width:0;font-size:16px}
  .cost-sheet-ledger .cost-sheet-head>small{max-width:none;font-size:9px}
}
@media(pointer:coarse){.cost-sheet-ledger .cost-sheet-item-head{grid-template-columns:minmax(0,1fr) auto 32px}.cost-sheet-ledger .cost-sheet-disclosure{width:32px;min-width:32px;height:32px;min-height:32px}}
