   width: 564mm;
      height: 400mm;
    }

    #diagram {
      position: relative;
      top: 0;
      left: 0;
      max-width: 100%;
      height: calc(100% - 13 * 4.25mm);
      /* TODO: auto-adapt to height of title block + BOM table;
               BOM table might be above (A4) or to the left (A3 and larger) of the title block */
      text-align: center;
      vertical-align: middle;
    }

    #diagram svg, #diagram img {
      max-width: 95%;
      max-height: 100%;
      position: relative;
    