/* The rendered Instruction for Use: A4 pages that print the way the approved
   Word documents do. Shared by ifu.html (reading) and ifu-edit.html (writing)
   so a manual can never look one way while being written and another when it
   is printed.

   Almost nothing here sets type: sizes, colours, spacing, alignment and every
   table rule come from the source document and are applied inline by
   ifu-lib.js. The rules below are the frame — page geometry, the running
   header and footer, and sane defaults. */
/* ---- the document, as Word lays it out: A4, 20 mm margins ---- */
#mount{--scale:1;transform:scale(var(--scale));transform-origin:top center;
  display:flex;flex-direction:column;align-items:center;gap:16px}
/* The preview stacks pages in a flex column, and a flex item shrinks by
   default — without this a page collapses to nothing the moment the container
   is given a height. A sheet of A4 is a sheet of A4. */
.ifu-page{flex:none;width:210mm;height:297mm;background:#fff;position:relative;
  box-shadow:0 2px 12px rgba(15,23,42,.14);font-family:var(--serif);color:#000;
  font-size:11pt;line-height:1.2;overflow:hidden;
  /* Word puts the header 12.5 mm down and starts the text at 20 mm. The page
     is laid out as a column so the header, the text and the footer can never
     land on top of one another: a header taller than the margin allows pushes
     the text down, which is what Word does too. */
  padding:12.5mm 20mm;display:flex;flex-direction:column}
.ifu-page-cover{padding:0;display:block}

/* The header is the OxGEn mark with the kit name and version set against it;
   the footer is the page count. Neither carries a rule in the source. The
   minimum height is the 7.5 mm between where the header starts and where the
   text does, so a document without a header still begins at 20 mm. */
.ifu-hdr{flex:none;min-height:7.5mm;display:flex;
  align-items:flex-start;justify-content:space-between;gap:6mm}
.ifu-hdrtext{flex:1;min-width:0;line-height:1.25}
.ifu-hdrtext>div{margin:0}
.ifu-hdrlogo{flex:none}
.ifu-ftr{flex:none;margin-top:auto;padding-top:3mm;font-size:10pt;
  display:flex;justify-content:space-between}
.ifu-draftmark{color:#b45309;font-weight:700;letter-spacing:.08em}
.ifu-ftr .tot{color:#002060;font-weight:700}
.ifu-body{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column}
/* Word adds the space before a paragraph to the space after the one above it;
   CSS would collapse the two, so the column is a flex container and every
   block keeps the height the document gives it. */
.ifu-body>*{flex:none}

.ifu-h1,.ifu-h2,.ifu-p,.ifu-cap,.ifu-note,.ifu-li,.ifu-todo{margin:0}
.ifu-h1{font-size:16pt;font-weight:700;color:var(--navy)}
.ifu-h2{font-size:12pt;font-weight:700;color:#7f7f7f}
.ifu-p,.ifu-cap{font-size:11pt}
.ifu-cap{font-weight:700}
.ifu-note{font-size:9pt;color:var(--navy)}
.ifu-li{font-size:11pt;display:flex;gap:6pt}
.ifu-bullet{flex:none;width:12pt;font-size:7pt;line-height:1.9}
.ifu-todo{font-size:11pt;padding:8pt 10pt;border:1pt dashed #b45309;color:#92400e;
  background:#fffbeb;border-radius:2pt}
.ifu-sp{font-size:1pt}
.ifu-toc{display:flex;justify-content:space-between;gap:10pt;font-size:11pt;margin:3.5pt 0}
.ifu-toc2{padding-left:14pt;color:#404040}
.ifu-tocp{color:#404040}

table.ifu-tbl{width:100%;border-collapse:collapse;table-layout:fixed;
  font-size:10pt;margin:4pt 0 9pt;line-height:1.15}
table.ifu-tbl td{padding:2.9pt;overflow-wrap:break-word;
  -webkit-print-color-adjust:exact;print-color-adjust:exact}
.ifu-cellimg{max-width:100%;vertical-align:middle}

/* ---- cover: artwork behind, the title block against the left margin ---- */
.ifu-page-cover{padding:0}
.ifu-cbg{position:absolute;inset:0;width:210mm;height:297mm;object-fit:cover}
.ifu-cover{position:relative;height:100%;padding:20mm;display:flex;flex-direction:column}
.ifu-logo{align-self:flex-start;margin-bottom:8mm}
.ifu-ctitle{font-size:24pt;font-weight:700;color:var(--navy);line-height:1.15}
.ifu-csub{font-size:14pt;line-height:1.2}
.ifu-cdoc{font-size:22pt;font-weight:700;color:#c00000;line-height:1.2}
.ifu-draftbox{align-self:flex-start;border:1.5pt solid #b45309;color:#92400e;font-weight:700;
  letter-spacing:.1em;padding:3mm 8mm;margin:6mm 0}
table.ifu-cinfo{width:100%;border-collapse:collapse;table-layout:fixed;
  font-size:11pt;text-align:left;line-height:1.25}
table.ifu-cinfo td{padding:1.4pt 2.9pt}
.ifu-sym{flex:none;vertical-align:middle}

/* ---- print: the document only, one .ifu-page per sheet ---- */
@media print{
  @page{size:A4 portrait;margin:0}
  html,body{background:#fff}
  .toolbar,.side{display:none!important}
  .wrap{display:block;max-width:none;margin:0;padding:0}
  .view{width:auto}
  #mount{transform:none;display:block;gap:0}
  /* a hair under 297 mm: at exactly the page height a rounding error costs a
     blank sheet between every page */
  .ifu-page{box-shadow:none;margin:0;height:296.9mm;break-after:page;page-break-after:always;
    -webkit-print-color-adjust:exact;print-color-adjust:exact}
  .ifu-page:last-child{break-after:auto;page-break-after:auto}
  tr,.ifu-toc{break-inside:avoid}
}
