/* Budget page layout and cost rows. */
/* Budget layout */
.budget{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) clamp(20rem,28vw,27.5rem);gap:1.5rem}
.editor{min-width:0;min-height:0;display:flex;flex-direction:column}
.editor-pane{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:.875rem;container-type:inline-size;border-radius:1.5rem}
.editor-pane .card{flex:none}
.editor-pane .card-body{overflow:visible}
.choices{border:0;padding:0;margin:1rem 0 0;min-width:0}
.choices legend{padding:0;font-size:.8125rem;font-weight:600;color:var(--ink-2);margin-bottom:.375rem}
.choice-options{display:flex;flex-wrap:wrap;gap:.5rem}
/* Choices (Rent / Buy, Light / Dark …): 8px buttons, outlined. The chosen one is a quiet accent
   tint, never filled, so it can't be mistaken for an action. */
.opt{position:relative;display:inline-flex;align-items:center;gap:.5rem;padding:.375rem 1rem;border:1px solid var(--field-edge);border-radius:.5rem;background:var(--field);font-weight:600;font-size:.8438rem;cursor:pointer}
.opt input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.opt:has(input:checked){background:color-mix(in srgb,var(--glide) 10%,var(--field));border-color:var(--glide);color:var(--glide-text);box-shadow:none}
.opt:has(input:focus-visible){outline:2px solid var(--focus);outline-offset:2px}
.estnote{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .875rem;background:color-mix(in srgb,var(--ink) 4%,transparent);border:1px solid var(--line);border-radius:1rem;padding:.5rem .875rem;margin:0 0 .625rem;font-size:.8438rem;color:var(--ink-2)}
.estnote p{margin:0;flex:1 1 16rem;min-width:0}
.estnote .btn{flex:none}
/* Closing the offer is not deleting anything, so it hovers neutral rather than red. */
.estnote .estnote-close{margin-right:-.375rem}
.estnote .estnote-close:hover{background:color-mix(in srgb,var(--ink) 8%,transparent);color:var(--ink)}

/* Cost rows */
.rows{display:grid;grid-template-columns:minmax(0,1fr);column-gap:1.5rem}
.mrow{display:grid;grid-template-columns:minmax(0,1fr) minmax(3.75rem,.4fr) 5.25rem 1.375rem;gap:0 .5rem;align-items:center;padding:.375rem 0;border-top:1px solid var(--line);min-width:0}
.rows > .mrow:first-child{border-top:0}
.mrow .lblwrap{min-width:0}
.mrow .lbl{display:block;border:1px solid transparent;background:transparent;padding:.1875rem .4375rem;margin-left:-.5rem;border-radius:.4375rem;font-weight:500;min-width:0;width:calc(100% + .5rem);text-overflow:ellipsis}
.mrow .lbl:hover,.mrow .lbl:focus{border-color:var(--line);background:color-mix(in srgb,var(--paper) 60%,transparent)}
.mrow .note{display:block;margin:0;color:var(--muted);font-size:.75rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.orow{grid-template-columns:minmax(0,1.6fr) 7rem 10rem auto 1.75rem}
@container (min-width:40rem){
  .rows.two{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rows.two > .mrow:nth-child(2){border-top:0}
}
/* Wide editors (big monitors): three columns of costs */
@container (min-width:68.75rem){
  .rows.two{grid-template-columns:repeat(3,minmax(0,1fr))}
  .rows.two > .mrow:nth-child(3){border-top:0}
}
@container (max-width:32.5rem){
  .mrow{grid-template-columns:minmax(0,1fr) 6rem 1.75rem}
  .mrow input[type="range"]{grid-column:1 / 3;grid-row:2;margin:.25rem 0 2px}
  .orow{grid-template-columns:minmax(0,1fr) 6.5rem 1.75rem}
  .orow select{grid-column:1;grid-row:2;margin-top:.25rem}
  .orow .chk{grid-column:2 / 4;grid-row:2;margin-top:.25rem}
}
.costs-foot{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1rem;margin-top:.625rem;padding-top:.75rem;border-top:1px solid var(--line)}
.costs-foot .contingency{display:flex;align-items:center;gap:.5rem;font-weight:500}
.costs-foot .contingency .money{width:5.5rem}
.subtotal{margin-left:auto;display:flex;align-items:baseline;gap:.625rem;padding:.4375rem .875rem;background:color-mix(in srgb,var(--ink) 5%,transparent);border-radius:.75rem;font-weight:600}
.subtotal .hint{margin:0}
