.calculator-print { display: none; }

@media print {
  @page { size: A4 portrait; margin: 12mm; }

  html:has(> .calculator-printing),
  .calculator-printing {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .calculator-printing > :not(.calculator-print) { display: none !important; }
  .calculator-printing > .calculator-print {
    display: block;
    margin: 0;
    padding: 0;
    color: #142b3d;
    font: 10pt/1.35 Arial, sans-serif;
    overflow-wrap: break-word;
  }
  .calculator-print h1 {
    margin: 0 0 2mm;
    max-width: none;
    color: inherit;
    font: bold 19pt/1.2 Arial, sans-serif;
  }
  .calculator-print h2 {
    margin: 5mm 0 1mm;
    color: inherit;
    font: bold 13pt/1.25 Arial, sans-serif;
    break-after: avoid;
  }
  .calculator-print p { margin: 0 0 2mm; }
  .calculator-print .print-dimensions { font-weight: bold; }
  .calculator-print figure {
    display: block;
    margin: 2mm 0 4mm;
    break-inside: avoid;
  }
  .calculator-print figure img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1488 / 800;
  }
  .calculator-print figcaption { margin-top: 2mm; font-weight: bold; }
  .calculator-print table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    font: 9pt/1.25 Arial, sans-serif;
  }
  .calculator-print thead { display: table-header-group; }
  .calculator-print tr { break-inside: avoid; }
  .calculator-print :is(th, td) {
    padding: 1.6mm 1.2mm;
    border: 0.2mm solid #b4bec6;
    color: inherit;
    background: none;
    white-space: normal;
    text-align: right;
  }
  .calculator-print thead th {
    text-transform: none;
    letter-spacing: normal;
    font-size: inherit;
    font-weight: bold;
  }
  .calculator-print tbody th { font-weight: normal; }
  .calculator-print :is(th, td):first-child { width: 42%; text-align: left; }
  .calculator-print .print-total { margin-top: 3mm; font-weight: bold; }
  .calculator-print .print-disclaimer { margin-top: 3mm; font-size: 9pt; }
}
