/* Estimate generator. Builds on style.css and calc.css; adds the line-item table and the printable document. */
.est fieldset { border: 0; padding: 0; margin: 0 0 var(--space-6); }
.est legend { font-family: var(--sans); font-weight: 700; font-size: 1.0625rem; padding: 0; margin-bottom: var(--space-3); }
.est .calc__field textarea { font: inherit; padding: var(--space-2) var(--space-3); border: 1px solid var(--calc-border, #838b95); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); min-height: 5rem; resize: vertical; }
.est .calc__field--wide { grid-column: 1 / -1; }
.est-items { container: est / inline-size; min-width: 0; }
.est-items__head, .est-row { display: grid; grid-template-columns: minmax(0, 3fr) 4.5rem 5.5rem 7rem 4.5rem 6.5rem 5.5rem; gap: var(--space-2); align-items: start; }
.est-items__head { font-family: var(--sans); font-size: 0.875rem; font-weight: 600; padding-bottom: var(--space-2); }
.est-row { margin-bottom: var(--space-2); }
.est-cell { min-width: 0; }
.est-cell::before { content: none; }
.est-row input[type="text"], .est-row input[type="number"] { width: 100%; min-height: 44px; padding: 0 var(--space-2); border: 1px solid var(--calc-border, #838b95); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; box-sizing: border-box; }
.est-row input[aria-invalid="true"] { border-color: #a4262c; box-shadow: inset 0 0 0 1px #a4262c; }
.est-row input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin-top: 0.7rem; }
.est-linetotal { display: inline-block; padding-top: 0.65rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.est-remove { min-height: 44px; background: none; border: 1px solid transparent; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; }
.est-remove:hover { color: var(--ink); }
@media (max-width: 860px) {
  .est-items__head { display: none; }
  .est-row { grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: var(--space-3); margin-bottom: var(--space-3); }
  .est-row .est-cell:first-child { grid-column: 1 / -1; }
  .est-cell::before { content: attr(data-label); display: block; font-family: var(--sans); font-size: 0.8125rem; font-weight: 600; margin-bottom: 2px; }
  .est-cell[data-label=""]::before { content: none; }
}
@container est (max-width: 700px) {
  .est-items__head { display: none; }
  .est-row { grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: var(--space-3); margin-bottom: var(--space-3); }
  .est-row .est-cell:first-child { grid-column: 1 / -1; }
  .est-cell::before { content: attr(data-label); display: block; font-family: var(--sans); font-size: 0.8125rem; font-weight: 600; margin-bottom: 2px; }
  .est-cell[data-label=""]::before { content: none; }
}
.est-status { font-weight: 600; color: #a4262c; min-height: 1.4em; margin: var(--space-2) 0 0; }
.est-docwrap h2 { margin-top: var(--space-8); }
.est-doc { border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fff; color: #111; padding: var(--space-6); font-family: var(--sans); }
.est-doc p { margin: 0 0 0.25rem; }
.est-doc__head { display: flex; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; border-bottom: 2px solid #111; padding-bottom: var(--space-3); margin-bottom: var(--space-3); }
.est-doc__logo { max-height: 64px; max-width: 220px; display: block; margin-bottom: var(--space-2); }
.est-doc__biz { font-weight: 700; font-size: 1.25rem; }
.est-doc__id { text-align: right; }
.est-doc__title { font-weight: 700; font-size: 1.5rem; text-transform: uppercase; letter-spacing: 0.04em; }
.est-doc__meta { margin-bottom: var(--space-4); }
.est-doc__row { display: grid; grid-template-columns: minmax(0, 1fr) 7rem 6.5rem 6.5rem; gap: 0 var(--space-2); padding: 0.4rem 0.5rem; border-bottom: 1px solid #ccc; font-variant-numeric: tabular-nums; }
.est-doc__row--head { font-weight: 700; border-bottom: 2px solid #111; }
.est-doc .num { text-align: right; white-space: nowrap; }
.est-doc__row > div:first-child { overflow-wrap: anywhere; }
.est-doc__totals { margin: var(--space-3) 0 0 auto; width: min(100%, 22rem); font-variant-numeric: tabular-nums; }
.est-doc__trow { display: flex; justify-content: space-between; gap: var(--space-4); padding: 0.25rem 0; }
.est-doc__trow.est-total { font-weight: 700; font-size: 1.125rem; border-top: 2px solid #111; margin-top: 0.25rem; padding-top: 0.4rem; }
@media screen and (max-width: 560px) { .est-doc__row { grid-template-columns: minmax(0, 1fr) 5rem 5.5rem; } .est-doc__row > div:nth-child(3) { display: none; } }
.est-doc__block { margin-top: var(--space-4); }
.est-doc__block h3 { font-size: 1rem; margin: 0 0 0.25rem; }
.est-doc__block p { white-space: pre-wrap; }
.est-doc__sign { margin-top: var(--space-8); }
.est-doc__empty { color: #555; }
@media print {
  .masthead, footer.site, .skip-link, .disclosure-line, #fsc-consent, .related { display: none !important; }
  main#main > *:not(.est-docwrap) { display: none !important; }
  .est-docwrap h2 { display: none; }
  .est-doc { border: 0; padding: 0; }
  .est-doc__head, .est-doc__row, .est-doc__sign, .est-doc__block { break-inside: avoid; }
  body { background: #fff; }
}


