/* The estimate builder and the new-lead form. */
.staff .bld { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.staff .bld-result { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.staff .bld-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.staff .bld-grid .wide { grid-column: span 2; }
.staff .bld > div { min-width: 0; }
.staff .bld-owner { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.staff .bld-owner .field.n { width: 70px; }
.staff .bld-owner .field:not(.n) { width: auto; flex: 1; min-width: 140px; }

/* What the form shows depends on the choices above it, without a round trip. */
.staff .builder .grp, .staff .builder .tier, .staff .builder .bld-gbb { display: none; }
.staff .builder:has(input[name="job[shared]"][value="true"]:checked) .grp,
.staff .builder:has(.grp input:not(:placeholder-shown)) .grp { display: table-cell; }
.staff .builder:has(option[value="options"]:checked) .tier { display: block; }
.staff .builder:has(option[value="gbb"]:checked) .bld-gbb { display: flex; }
.staff .builder:has(option[value="gbb"]:checked) .bld-designs { display: none; }
.staff .builder .bld-repairs { display: none; }
.staff .builder:has(option[value="repair"]:checked) .bld-repairs { display: flex; }
.staff .builder:has(option[value="repair"]:checked) :is(.bld-designs, .bld-gbb, .bld-sections, .bld-install) { display: none; }

.staff .bld-d { border-top: 1px solid var(--line); padding-top: 8px; }
.staff .bld-d .inc { margin: 4px 0; padding-left: 18px; font-size: 13px; }
.staff .bld-d summary { color: var(--oak); font-weight: 600; margin-top: 4px; }
.staff .bld-total { display: flex; justify-content: space-between; align-items: baseline; background: var(--oak); color: #fff; border-radius: var(--r); padding: 8px 12px; font-weight: 600; }
.staff .bld-total b { font-size: 17px; }
.staff .bld-json { margin-top: 10px; }
.staff .bld-json textarea { font-size: 12px; }

@media (max-width: 900px) {
  .staff .bld { grid-template-columns: 1fr; }
  .staff .bld-result { position: static; max-height: none; }
  .staff .bld-grid .wide { grid-column: auto; }
}
