/* Infiltrometer (hvac2) reports: one Letter page each, print-ready. Adapted from HVAC 1.0 static/css/print.css; Bootstrap colours replaced by
   the brand tokens (tokens.css loads first). Logo top-left, red rules and key numbers on a Cloud band (the PDFs' pale-yellow
   band is forbidden by the kit), Oswald numerals with Noto units, charcoal table headers. */

body.report-body { background: var(--rt-color-mist); margin: 0; color: var(--rt-color-graphite); font: var(--rt-text-small); }
.report { position: relative; display: flex; flex-direction: column; width: 8.5in; min-height: 11in; max-width: 100%; margin: 0 auto; background: #fff; padding: .55in .65in .45in; box-sizing: border-box; color: var(--rt-color-graphite); font-size: 10.5pt; line-height: 1.4; }
.report * { box-sizing: border-box; }

/* header: title block left, logo right as in the PDFs ("Prepared for / Test date / Prepared by") */
.report header { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; align-items: start; padding-bottom: .35rem; margin-bottom: .6rem; border-bottom: 3px solid var(--rt-color-red); }
.report header .rh-title { grid-column: 1; }
.report header .rh-logo { grid-column: 2; grid-row: 1; }
.report header .rh-logo img { height: 34px; width: auto; display: block; margin-top: .15rem; }
.report header h1 { font: 600 24pt/1.05 var(--rt-font-display); color: var(--rt-color-ink); margin: 0; letter-spacing: 0; }
.report header .rh-sub { font: 400 11pt/1.3 var(--rt-font-body); color: var(--rt-color-steel); margin: .1rem 0 .55rem; }
.report header .rh-meta { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: .15rem 1.5rem; font-size: 9.5pt; }
.report header .rh-meta b { color: var(--rt-color-ink); }
.report header .rh-meta .by { grid-column: 1 / -1; }
.report header .rh-meta .blank { display: inline-block; min-width: 2.2in; border-bottom: 1px solid var(--rt-color-slate); vertical-align: baseline; margin-left: .25rem; }

/* key-number band: four tiles on Cloud, red Oswald numerals */
.report .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--rt-color-cloud); border-radius: 6px; margin: .5rem 0 .75rem; break-inside: avoid; }
.report .tile { padding: .55rem .5rem .5rem; text-align: center; border-left: 1px solid var(--rt-color-mist); min-width: 0; }
.report .tile:first-child { border-left: 0; }
.report .tile .n { font: 600 22pt/1.1 var(--rt-font-display); font-variant-numeric: tabular-nums; color: var(--rt-color-red); white-space: nowrap; letter-spacing: 0; }
.report .tile .n .u { font: 700 .5em/1 var(--rt-font-body); color: var(--rt-color-slate); margin-left: .2em; }
.report .tile .l { font-size: 8pt; color: var(--rt-color-slate); margin-top: .25rem; line-height: 1.25; }

/* sections */
.report h2 { font: 600 12.5pt/1.2 var(--rt-font-display); color: var(--rt-color-red); margin: .8rem 0 .3rem; letter-spacing: 0; break-after: avoid; }
.report h3 { font: 700 10pt/1.3 var(--rt-font-body); color: var(--rt-color-ink); margin: .5rem 0 .2rem; }
.report p { margin: 0 0 .4rem; }
.report p b, .report td b { color: var(--rt-color-ink); }
.report .muted { color: var(--rt-color-steel); }
.report .fine { font-size: 8pt; color: var(--rt-color-steel); line-height: 1.35; margin: .5rem 0 .6rem; }
.report .fine p { margin-bottom: .25rem; }

/* key/value rows (House and test conditions, Leakage area ...) */
.report table.kv { width: 100%; border-collapse: collapse; font-size: 9.5pt; margin-bottom: .3rem; }
.report table.kv td { padding: .22rem .5rem; border-bottom: 1px solid var(--rt-color-mist); vertical-align: top; }
.report table.kv tr:nth-child(odd) td { background: var(--rt-color-surface); }
.report table.kv td:first-child { color: var(--rt-color-graphite); width: 52%; }
.report table.kv td:last-child { color: var(--rt-color-ink); font-weight: 700; }

/* data tables with charcoal header row (pressurize, humidification, rated vs actual) */
.report table.data { width: 100%; border-collapse: collapse; font-size: 9.5pt; margin-bottom: .4rem; break-inside: avoid; }
.report table.data th { background: var(--rt-color-slate); color: #fff; font-weight: 700; padding: .3rem .4rem; text-align: center; border-left: 1px solid #fff; line-height: 1.25; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.report table.data th:first-child { border-left: 0; }
.report table.data td { padding: .28rem .4rem; text-align: center; border-bottom: 1px solid var(--rt-color-mist); font-variant-numeric: tabular-nums; }
.report table.data tr:nth-child(even) td { background: var(--rt-color-surface); }
.report table.data td.hl { color: var(--rt-color-red); font-weight: 700; background: var(--rt-color-cloud); box-shadow: inset 0 1.5px 0 var(--rt-color-red), inset 0 -1.5px 0 var(--rt-color-red); }
.report table.data td.hl.first { box-shadow: inset 1.5px 0 0 var(--rt-color-red), inset 0 1.5px 0 var(--rt-color-red), inset 0 -1.5px 0 var(--rt-color-red); }
.report table.data td.hl.last { box-shadow: inset -1.5px 0 0 var(--rt-color-red), inset 0 1.5px 0 var(--rt-color-red), inset 0 -1.5px 0 var(--rt-color-red); }
.report table.data.left td, .report table.data.left th { text-align: left; }

/* numbered reasons (Efficiency: "Why duct leaks are the worst leaks") */
.report ol.reasons { list-style: none; counter-reset: r; margin: 0 0 .4rem; padding: 0; }
.report ol.reasons li { counter-increment: r; display: grid; grid-template-columns: 1.4rem 1fr; gap: .4rem; padding: .18rem 0; font-size: 9.5pt; }
.report ol.reasons li::before { content: counter(r); font: 700 10pt/1.3 var(--rt-font-body); color: var(--rt-color-red); text-align: center; }
.report ul.marks { list-style: none; margin: 0 0 .4rem; padding: 0; }
.report ul.marks li { position: relative; padding-left: 1.1rem; margin-bottom: .15rem; }
.report ul.marks li::before { content: ""; position: absolute; left: .15rem; top: .45em; width: 6px; height: 6px; background: var(--rt-color-red); -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* pull quote / notice: the one place with a 4 px left rule */
.report .callout { border-left: 4px solid var(--rt-color-red); background: var(--rt-color-cloud); padding: .5rem .75rem; margin: .5rem 0; font-size: 9.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* footer at the page foot (flex column, never over the text) */
.report footer { margin-top: auto; padding-top: .25rem; display: flex; justify-content: space-between; font-size: 8pt; color: var(--rt-color-steel); border-top: 1px solid var(--rt-color-mist); padding-top: .25rem; }

/* screen preview: paper on grey, print bar above */
@media screen {
  .report { box-shadow: var(--rt-shadow-lg); margin: 1.25rem auto; }
  .print-bar { max-width: 8.5in; margin: 1rem auto 0; padding: 0 16px; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  @media (max-width: 8.6in) { .report { width: auto; min-height: 0; margin: .75rem; padding: 1rem; } .report .tiles { grid-template-columns: repeat(2, 1fr); } .report .tile:nth-child(3) { border-left: 0; } .report .tile { border-top: 1px solid var(--rt-color-mist); } .report .tile:nth-child(-n+2) { border-top: 0; } .report footer { margin-top: 1rem; } .report header .rh-logo img { height: 26px; } }
}

@media print {
  @page { size: Letter; margin: 0; }
  html, body { background: #fff !important; }
  body.report-body { font-size: 10pt; }
  .report { width: 8.5in; height: 11in; min-height: 0; margin: 0; box-shadow: none; padding: .45in .6in .35in; overflow: hidden; break-after: page; page-break-after: always; font-size: 9.5pt; line-height: 1.3; }
  .report header { margin-bottom: .4rem; padding-bottom: .25rem; } .report header h1 { font-size: 22pt; } .report header .rh-sub { margin-bottom: .35rem; }
  .report .tiles { margin: .35rem 0 .5rem; } .report .tile { padding: .4rem .4rem .35rem; } .report .tile .n { font-size: 20pt; }
  .report h2 { margin: .55rem 0 .2rem; font-size: 12pt; }
  .report table.kv td { padding: .16rem .45rem; font-size: 9pt; } .report table.data th { padding: .22rem .35rem; font-size: 9pt; } .report table.data td { padding: .2rem .35rem; font-size: 9pt; }
  .report ol.reasons li { padding: .1rem 0; font-size: 9pt; } .report .callout { padding: .4rem .6rem; margin: .4rem 0; }
  .report p { margin-bottom: .3rem; } .report .fine { font-size: 7.5pt; margin: .35rem 0 .4rem; } .report footer { font-size: 7.5pt; }
  .report:last-child { break-after: auto; page-break-after: auto; }
  .print-bar, .no-print, .navbar, nav { display: none !important; }
  .report .tiles, .report table.data th, .report .callout, .report table.kv tr:nth-child(odd) td, .report table.data tr:nth-child(even) td, .report table.data tr.hl td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
}
