/* =====================================================================
   doc.css — v166 — THE Fire Shop document template.
   Troy 2026-10-10: the Fergus quote layout "looks more professional — make this
   template the standard". Every customer document uses these classes: quotes,
   invoices, safety / sweep / inspection reports, certificates, producer
   statements, condemnation notices.

   Layout (top to bottom):
     logo (left) ............................ company block (right, bold name)
                                                          STATUS (e.g. DRAFT)
     bill-to name + address      | grey box: Site Address | Job Number / dates
     Title (large)
     intro text (small)
     ───────────────────────────────────────── Quantity   Price   Total
     Section heading (large)
     item rows (no row lines)
                                                             section subtotal
     ─────────────────────────────────────────────────────────────────────
                                                         Subtotal   $
                                                       GST Amount   $
                                                            Total   $ (bold)
     ··········· italic terms ···········
   Footer (drawn by pdf-engine.js): "Quote #10025 (Version 2)" ....... "Page 1/1"
   Sizes are CSS px at the engine's scale (1px = 0.75pt): 12px ≈ 9pt.
   ===================================================================== */
.fsd{font-family:"Helvetica Neue",Helvetica,Arial,"Nimbus Sans","Liberation Sans",sans-serif;color:#111;
  font-size:12px;line-height:1.45;background:#fff;-webkit-font-smoothing:antialiased}
.fsd *{box-sizing:border-box}
.fsd p{margin:0 0 9px}
/* letterhead — v177: tables (the server PDF renderer has no flex/grid; browsers + print agree) */
.fsd table{border-collapse:collapse;border-spacing:0}
.fsd-top{width:100%}
.fsd-top td{vertical-align:top;padding:0}
.fsd-logo{padding-top:14px!important}
.fsd-logo img{max-height:62px;max-width:300px;display:block;object-fit:contain}
.fsd-logo .wm{font-weight:800;font-size:30px;letter-spacing:.5px;color:#e2471c;line-height:1}
.fsd-logo .wm small{display:block;font-size:11px;letter-spacing:2px;color:#111}
.fsd-co{text-align:right;font-size:12px;line-height:1.42;white-space:nowrap}
.fsd-co b{font-size:12.5px}
.fsd-status{text-align:right;font-weight:700;font-size:22px;letter-spacing:.3px;margin:12px 0 0;line-height:1.1}
/* parties: bill-to | grey site/meta box */
.fsd-parties{width:100%;margin-top:16px}
.fsd-parties td.fsd-bill,.fsd-parties td.fsd-boxcell{vertical-align:top;padding:0}
.fsd-bill{padding-left:36px!important;padding-right:18px!important;font-size:14px;line-height:1.38}
.fsd-bill b{font-weight:700}
.fsd-boxcell{width:51%}
.fsd-box{width:100%;background:#e8e9eb;font-size:12px;line-height:1.42}
.fsd-box td{vertical-align:top;padding:9px 11px}
.fsd-box td.site{padding-right:6px}
.fsd-box td.meta{text-align:right;padding-left:6px}
.fsd-box .site b{display:block}
.fsd-box .meta div{white-space:nowrap}
/* title + intro */
.fsd-title{font-size:28px;font-weight:700;margin:34px 0 14px;line-height:1.1;letter-spacing:-.2px}
.fsd-intro{font-size:11.5px;line-height:1.5;margin:0 0 16px}
/* items */
.fsd-items{width:100%;border-collapse:collapse;font-size:11.5px;border-top:1px solid #111;table-layout:fixed}
.fsd-items th{font-size:11px;font-weight:700;text-align:right;padding:12px 0 4px;white-space:nowrap}
.fsd-items th:first-child{text-align:left}
.fsd-items .c-n{width:92px;text-align:right;white-space:nowrap;padding-left:8px}
.fsd-items .c-u{width:64px;text-align:right;white-space:nowrap;padding-left:8px}
.fsd-items td{padding:4.5px 0;vertical-align:top;overflow-wrap:break-word}
.fsd-items tr.sec td{font-size:21px;font-weight:700;padding:16px 0 9px;line-height:1.2}
.fsd-items tr.sec td small{font-size:12px;font-weight:400;color:#444;margin-left:8px}
.fsd-items tr.sec-d td{font-size:11px;color:#444;padding:0 0 7px}
.fsd-items tr.sub td{padding:4.5px 0 12px}
.fsd-items .note{color:#555;font-size:10.5px}
.fsd-rule{border-top:1px solid #111;margin-top:4px}
/* totals */
.fsd-tot{margin:12px 0 0 auto;width:340px;font-size:14px}
.fsd-tot td{text-align:right;padding:5px 0;vertical-align:top}
.fsd-tot td.v{width:110px;padding-left:16px;white-space:nowrap}
.fsd-tot .grand td{font-weight:700}
.fsd-tot .due td{font-weight:700;border-top:1px solid #111;padding-top:8px}
.fsd-tot .sm td{font-size:12px;color:#333}
/* text blocks */
.fsd-terms{border-top:1px solid #d6d6d6;margin-top:20px;padding-top:12px;font-style:italic;font-size:11.5px;line-height:1.5}
.fsd-terms p{margin:0 0 10px;white-space:pre-wrap}
.fsd-note{font-size:11px;color:#333;margin-top:8px}
.fsd-h{font-size:17px;font-weight:700;margin:20px 0 7px;line-height:1.2}
.fsd-h2{font-size:13px;font-weight:700;margin:14px 0 5px}
/* label / value lists (reports, certificates) */
.fsd-kv{width:100%;border-collapse:collapse;font-size:12px;margin:4px 0 10px}
.fsd-kv td{padding:4.5px 0;border-bottom:1px solid #e3e3e3;vertical-align:top}
.fsd-kv td:first-child{width:190px;color:#444;padding-right:12px}
.fsd-pay{margin-top:18px;font-size:12px}
.fsd-pay .fsd-kv td:first-child{width:150px}
.fsd-sign{width:100%;margin-top:38px;font-size:12px}
.fsd-sign td{vertical-align:bottom;padding:0}
.fsd-sign .line{border-top:1px solid #111;width:240px;padding-top:5px;font-weight:700}
.fsd-cl td{vertical-align:middle}   /* v177 — inspection checklist (row spacing is set inline in the template) */
.fsd-sym{font-family:"DejaVu Sans",sans-serif}
/* two-column photo grid — tables, so the server PDF lays them out like the screen */
.fsd-photos{width:100%;margin:6px 0 4px}
.fsd-photos td{width:50%;vertical-align:top;padding:0 8px 16px 0}
.fsd-photos td+td{padding:0 0 16px 8px}
.fsd-photos img{width:100%;border:1px solid #e0e8f2;border-radius:6px;display:block}
.fsd-photos .cap{font-size:12px;color:#3c4757;margin-top:4px;line-height:1.45}
.fsd-photos .lnk{font-size:11.5px;margin-top:4px;font-weight:600}
.fsd-callout{border-left:3px solid #111;padding:6px 0 6px 12px;margin:10px 0 14px;font-size:12px}
/* ---------------------------------------------------------------------
   v168 — PRINTING (browser Print / Save as PDF). Troy 2026-10-11: a printed
   quote came out edge to edge with the first and last letters cut off. The
   print dialog's own margin setting ("None", Safari, phone AirPrint) can
   override @page margins, leaving the text where the printer can't reach.
   So the document carries its own white border; it doesn't rely on the page's.
     · Sides: always padding on the document (12mm). It holds whatever the dialog says.
     · Top/bottom of EVERY page: where the browser can repeat padding on each
       printed page (box-decoration-break:clone, in Chrome, Edge and Firefox),
       the page margin is 0 and the document pads itself (12mm top, 14mm bottom). That
       also stops browsers printing the date/URL in the corners.
       Otherwise (Safari) the page margin supplies top/bottom.
     · Shading prints (the grey Site Address box, the status colour) even with
       "Background graphics" off.
   Matches the downloaded PDF (pdf-engine.js margins ≈ 14mm / 11mm).
   --------------------------------------------------------------------- */
@media print{
  @page{size:A4 portrait;margin:12mm 0 14mm}
  html,body{margin:0!important;padding:0!important;background:#fff!important;min-width:0!important;width:auto!important}
  #fsDoc,#psPrint{box-sizing:border-box!important;width:auto!important;max-width:none!important;margin:0!important;padding:0 12mm!important}
  .fsd-box,.fsd-status,.fsd-logo,.fsd-items,.fsd-rule,.fsd-tot{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .fsd-items thead{display:table-header-group}
  .fsd-items tr,.fsd-kv tr,.fsd-tot,.fsd-sign,.fsd-parties,.fsd-top{break-inside:avoid;page-break-inside:avoid}
  .fsd-items tr.sec,.fsd-h,.fsd-h2,.fsd-title{break-after:avoid;page-break-after:avoid}
}
@supports (box-decoration-break:clone){
  @media print{
    @page{margin:0}
    #fsDoc,#psPrint{padding:12mm 12mm 14mm!important;box-decoration-break:clone}
  }
}
