/* The task, its owner and the financial position travel with the case. */
.case-stage {--stage-edge:#ceded8;--stage-ink:#153d34;min-width:0}
.finance-workspace .case-stage>h1 {max-width:33ch;margin:.28rem 0 1rem;line-height:1.1;font-size:clamp(1.9rem,3.2vw,3.15rem);letter-spacing:-.045em}
.case-stage .stage-context {display:flex;gap:.45rem;align-items:center;margin:0 0 .5rem;font-size:.8rem;font-weight:650;color:#416458}
.stage-context svg,.stage-deck svg,.row-icon,.case-stage .quote-glyph {width:1rem;height:1rem;flex:none;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linejoin:round;stroke-linecap:round}
.stage-deck {display:grid;grid-template-columns:minmax(0,1.3fr) minmax(16rem,1fr);gap:1rem;margin:.6rem 0 1.35rem;align-items:stretch}
.stage-deck,.stage-deck * {box-sizing:border-box}
.stage-deck .stage-figures {display:grid;grid-template-columns:1fr 1fr;gap:.8rem 1rem;align-content:center;margin:0;padding:1.1rem 1.4rem;color:#fff;background:linear-gradient(120deg,#153a37,#235045);border:1px solid #16483c;border-radius:12px;box-shadow:0 2px 6px #183a2a0d}
.finance-workspace .stage-deck .stage-figures>div {display:block;min-width:0;margin:0;padding:0;border:0}
.finance-workspace .stage-deck .stage-figures>div:first-child {grid-column:1/-1;border-bottom:1px solid #ffffff45;padding-bottom:.65rem}
.finance-workspace .stage-deck .stage-figures dt {display:flex;gap:.4rem;align-items:center;color:#d7eade;font-size:.79rem;font-weight:600}
.stage-deck .stage-figures svg {color:#f0cf8b}
.finance-workspace .stage-deck .stage-figures dd {margin:.22rem 0 0;text-align:left;color:white;font-weight:650;font-size:clamp(1.03rem,1.75vw,1.45rem);line-height:1.15;font-variant-numeric:tabular-nums;letter-spacing:-.03em}
.finance-workspace .stage-deck .stage-figures div:first-child dd {font-size:clamp(1.95rem,3.8vw,3rem)}
.stage-deck .case-next {position:relative;display:grid;grid-template-columns:1fr auto;align-content:start;align-items:center;gap:.7rem 1rem;margin:0;padding:1.1rem 1.3rem;border:1px solid #d5ded8;border-top:3px solid #b79051;border-radius:12px;background:white;color:#173a32;box-shadow:0 2px 6px #183a2a0d}
.stage-deck .case-next>b {grid-column:1/-1;margin:0;color:#53695e;font-size:.73rem;text-transform:uppercase;letter-spacing:.08em}
.stage-deck .stage-owner-data {grid-column:1/-1;display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}
.stage-deck .stage-owner-data>strong {display:inline-flex;align-items:center;gap:.35rem;max-width:100%;width:fit-content;padding:.2rem .55rem;background:#f6eedb;border-radius:1rem;color:#664919;font-size:.81rem;overflow-wrap:anywhere}
.stage-deck .stage-owner-data>span {display:block;font-size:clamp(.99rem,1.4vw,1.23rem);line-height:1.32;font-weight:630}
.stage-deck .stage-owner-data>small {color:#5c665e}
.stage-deck .stage-jump {display:inline-flex;justify-content:space-between;align-items:center;gap:.5rem;width:fit-content;text-align:left;min-height:42px;padding:.55rem .88rem;background:#205949;border:1px solid #205949;border-radius:6px;color:white;font-weight:650;font-size:.91rem}
.stage-deck .stage-jump:hover {background:#133d34}.stage-deck .stage-jump[hidden]{display:none}
.stage-deck .case-next>a {font-size:.79rem;justify-self:end}
.stage-deck .stage-jump[hidden]+a {grid-column:1/-1}
.case-stage :is(.review-card,#lender-choice,#contact-share,#proposal-choice,#comparison,.chosen-figures,#pack-evidence:not(:empty),#responses>.response,.facility-comparison) {padding:clamp(1rem,2vw,1.65rem);background:white;border:1px solid var(--stage-edge);border-radius:12px;margin:.8rem 0;box-sizing:border-box}
.case-stage :is(#lender-choice,#proposal-choice)>fieldset {padding:0;border:0}
.case-stage :is(#matched-lenders,#pick) {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:.65rem;margin:.7rem 0}
.case-stage :is(#matched-lenders,#pick) .option-card {margin:0;height:100%;box-sizing:border-box;padding:.85rem;border-radius:9px;background:#f8fbf9}
.case-stage :is(#matched-lenders,#pick) .option-card:has(:checked) {border-color:#397b65;background:#eaf4ee;box-shadow:inset 0 0 0 1px #397b65}
.case-stage :is(#matched-lenders,#pick) strong {display:flex;gap:.45rem;align-items:center;color:#20463d}
.case-stage :is(#matched-lenders,#pick) svg,.row-icon {color:#4c7968}
.row-icon,.chosen-figures h2 svg {display:inline-block;vertical-align:-.15em;margin-right:.44rem}
.case-stage .chosen-figures dl {border:0;padding:0;box-shadow:none}
.case-stage .chosen-figures h2 {margin:0 0 .6rem}
.case-stage .case-guide,.case-stage .facility-comparison,.case-stage #pack-review {max-width:none}
.case-stage .case-guide h2 {font-size:1.3rem}
.case-stage #responses:empty,.lender-stage:has(#facility-metrics[hidden]) {display:none}
.case-stage .facility-comparison h2 {margin-top:0}
.case-stage .facility-edition {border-radius:6px}
@media(min-width:821px){
 #decision-body:has(.facility-comparison){display:flow-root}
}
@media(max-width:700px){
 .stage-deck {display:flex;flex-direction:column;gap:.65rem;margin:.45rem 0 1rem}
 .stage-deck .case-next {order:-1;padding:.8rem 1rem;gap:.45rem .8rem}
 .stage-deck .stage-figures {padding:.85rem 1rem;gap:.6rem}
 .finance-workspace .stage-deck .stage-figures div:first-child dd {font-size:1.85rem}
 .stage-deck .stage-owner-data {gap:.4rem}
}
@media(forced-colors:active){.stage-deck .stage-figures,.stage-deck .stage-jump,.stage-deck .case-next {border:1px solid CanvasText}}
.stage-columns {display:grid;grid-template-columns:minmax(0,1.85fr) minmax(16rem,1fr);align-items:start;gap:clamp(1rem,2vw,1.6rem)}
.stage-main,.stage-support {min-width:0}
.case-stage .stage-support {position:static;background:#fbfcfa;border:1px solid var(--stage-edge);border-radius:12px;padding:1rem 1.15rem;color:#193d34}
.case-stage .stage-support>h2 {font-size:1.02rem;letter-spacing:-.015em;margin:.2rem 0 .6rem}
.stage-support #case-approaches {margin:.4rem 0;border:0;border-radius:0;background:none;padding:0}
.case-stage .stage-support>details,.case-stage .stage-support>div:has(>details) {margin:.45rem 0;padding:.35rem 0;border-top:1px solid #d7e2dc}
.case-stage .stage-support:empty {display:none}
.stage-columns:not(:has(>.stage-support>:not([hidden]))) {grid-template-columns:minmax(0,1fr)}
.stage-main .case-guide,.stage-main #pack-evidence {max-width:none}
.case-stage .stage-support .chosen-figures {border:0;border-radius:0;background:none;margin:0;padding:0;box-shadow:none}
.case-stage .stage-support .chosen-figures h2 {font-size:1.05rem}
.stage-conditions {padding:1rem 1.15rem;border:1px solid #ceded8;border-radius:12px;background:#fff}
.stage-conditions h2 {margin:0 0 .6rem;font-size:1.18rem}
.stage-conditions h2 svg {margin-right:.45rem}
.case-stage .stage-conditions .funding-conditions {padding:0;margin:0}
.stage-support #case-approaches textarea {box-sizing:border-box;max-width:100%}
.stage-support #case-approaches button,.case-stage #desk-status button,#step-preview #shared-vault-actions button {border:1px solid #9db5aa;background:#f2f7f3;color:#214f41;border-radius:6px;padding:.45rem .8rem;font-weight:600;min-height:44px}
@media(max-width:1020px){.stage-columns {grid-template-columns:minmax(0,1fr)}}
@media(min-width:1021px){.stage-main .file-workbench {display:flex;flex-direction:column}}
.case-stage .stage-support .case-tools[hidden],.stage-support [hidden],.stage-main [hidden]{display:none}
.stage-deck .case-next {grid-template-columns:minmax(0,1fr) auto}
.stage-deck .case-next>b {grid-row:1;grid-column:1}
.stage-deck .case-next>a,.stage-deck .stage-jump[hidden]+a {grid-row:1;grid-column:2;margin:0}
.stage-deck .stage-owner-data,.stage-deck .stage-jump {grid-column:1/-1;min-width:0;max-width:100%}
.stage-deck .stage-jump {white-space:normal}
#decision-body .stage-support>.chosen-figures,#decision-body .stage-support>.chosen-figures dl {border:0;padding:0;border-radius:0;background:none;box-shadow:none}
#decision-body .chosen-figures dl>div {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:.4rem .75rem}
#decision-body .chosen-figures dd {max-width:none;margin:0;text-align:right}
#decision-body .chosen-figures dd.amount {white-space:nowrap;overflow-wrap:normal;font-variant-numeric:tabular-nums}
#decision-body .chosen-figures dl>div:has(dd:not(.amount)) {display:block}
#decision-body .chosen-figures dd:not(.amount) {text-align:left;margin-top:.28rem;overflow-wrap:anywhere}
