/* template.css: the free printable templates (concrete estimate, concrete
   proposal). Pages are built by scripts/build-template-pages.py. The sheet is
   a plain sheet of paper on screen and prints as one, without the site
   around it. */
.tbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 18px; }
.tbtn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.tbtn:hover { border-color: var(--accent); }
.tbtn-ghost { background: transparent; color: var(--text2); }
.tsaved { margin: 10px 2px 28px; font-size: 13.5px; color: var(--text3); }

.tsheet { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; box-shadow: 0 1px 0 var(--border); }
.tsheet-top { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.tsheet-top + .tsheet-top { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; }
.tcol { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.tdoc { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--accent-ink, var(--accent)); }
.tf { display: flex; flex-direction: column; gap: 3px; }
.tf span { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); }
.tsheet input { width: 100%; box-sizing: border-box; font: inherit; font-size: 15.5px; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--border2); border-radius: 0; padding: 6px 2px; min-height: 36px; }
.tsheet input:focus { outline: none; border-bottom-color: var(--accent); background: var(--accent-wash); }
.tsheet input::placeholder { color: var(--text3); opacity: .6; }

.ttable-wrap { overflow-x: auto; margin: 6px -4px 0; padding: 0 4px; }
.ttable { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.ttable thead th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); padding: 10px 6px 6px; border-bottom: 1px solid var(--border2); }
.ttable th:nth-child(2), .ttable td:nth-child(2) { width: 12%; }
.ttable th:nth-child(3), .ttable td:nth-child(3) { width: 11%; }
.ttable th:nth-child(4), .ttable td:nth-child(4) { width: 15%; }
.ttable th:nth-child(5), .ttable td:nth-child(5) { width: 15%; text-align: right; }
.ttable td { padding: 2px 6px; border-bottom: 1px solid var(--border); }
.ttable td input { border-bottom: 0; }
.ttable .sec-row th { text-align: left; padding: 16px 6px 4px; font-size: 13px; font-weight: 700; color: var(--text); border-bottom: 1px solid var(--border2); }
.ttable .amt { font-family: var(--mono); font-size: 14px; color: var(--text2); white-space: nowrap; }
.tadd { margin: 12px 0 0; min-height: 38px; font-size: 14px; }

.ttotals, .tprice { margin: 20px 0 0 auto; max-width: 420px; display: flex; flex-direction: column; }
.tprice { margin: 22px 0 6px; max-width: none; }
.trow { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--text2); }
.trow > :first-child { flex: 1; }
.trow b { font-family: var(--mono); font-weight: 600; color: var(--text); min-width: 110px; text-align: right; }
.trow .pct, .trow .money { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 14px; color: var(--text3); }
.trow .pct input { width: 56px; text-align: right; min-height: 32px; }
.trow .money input { width: 140px; text-align: right; font-family: var(--mono); font-size: 17px; font-weight: 600; }
.ttotal { border-bottom: 0; border-top: 2px solid var(--text); margin-top: 4px; padding-top: 12px; font-weight: 700; color: var(--text); }
.ttotal b { font-size: 18px; }

.tblock { margin: 18px 0 0; }
.tblock-h { font-size: 13px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.tarea { white-space: pre-wrap; font-size: 15px; line-height: 1.6; color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-height: 48px; }
.tarea:focus { outline: none; border-color: var(--accent); background: var(--accent-wash); }
.tsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.tlegal { margin: 10px 0 0; font-size: 12.5px; color: var(--text3); }
.tsign { display: grid; grid-template-columns: 2fr 1fr; gap: 26px 24px; margin: 34px 0 6px; }
.tsig-line { border-bottom: 1px solid var(--text); height: 34px; }
.tsig span { display: block; margin-top: 5px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); }

.ccx-prose ol, .ccx-prose ul { margin: 0 0 16px; padding-left: 22px; color: var(--text2); font-size: 16.5px; line-height: 1.65; }
.ccx-prose li { margin: 0 0 8px; }
.ccx-prose li b { color: var(--text); }

@media (max-width: 640px) {
  .tsheet { padding: 18px 16px; border-radius: 14px; }
  .tsheet-top, .tsplit { grid-template-columns: 1fr; }
  .tsign { grid-template-columns: 1fr; gap: 18px; }
  .tbar .btn, .tbar .tbtn { flex: 1 1 100%; }
  /* On a phone each line stacks: the item on top, then qty, unit, cost and
     total in one row, so nothing scrolls sideways. */
  .ttable-wrap { overflow: visible; margin: 6px 0 0; padding: 0; }
  .ttable { min-width: 0; }
  .ttable thead { display: none; }
  .ttable, .ttable tbody { display: block; }
  .ttable .sec-row { display: block; }
  .ttable .sec-row th { display: block; }
  .ttable tr.li { display: grid; grid-template-columns: 1fr 1fr 1.3fr 1.3fr; border-bottom: 1px solid var(--border); padding: 4px 0; }
  .ttable tr.li td { border: 0; width: auto !important; padding: 0 4px; }
  .ttable tr.li td:first-child { grid-column: 1 / -1; }
  .ttable tr.li td:first-child input { font-weight: 600; }
  .ttable tr.li td.amt { align-self: center; text-align: right; }
}

@media print {
  @page { margin: 0.5in; }
  html, body { background: #fff !important; }
  .tpl-page .topnav, .tpl-page .nav-spacer, .tpl-page .footer, .tpl-page #how, .tpl-page .calc-hero,
  .tpl-page .tbar, .tpl-page .tsaved, .tpl-page .tlegal, .tpl-page .calc-draw, .tpl-page .hero-grid-bg, .tpl-page .tadd, .tpl-page .navsheet { display: none !important; }
  .tpl-page .sec-pad { padding: 0 !important; }
  .tpl-page .wrap { max-width: none; padding: 0; }
  .tsheet { border: 0; box-shadow: none; padding: 0; background: #fff; color: #000; }
  .tsheet * { color: #000 !important; }
  .tsheet input, .tarea { border-color: #999 !important; background: #fff !important; }
  .tsheet input::placeholder { color: transparent; }
  .ttable-wrap { overflow: visible; }
  .ttable { min-width: 0; font-size: 12.5px; }
  .ttable tr, .tblock, .tsign, .ttotals { break-inside: avoid; }
  .tarea { border: 0 !important; padding: 0; }
}
