main h1 {
    margin-bottom: 1.5em !important;
}

table.delivery {
    margin-bottom: 5mm;
}

table.delivery tr:not(.main) {
    break-before: avoid;
}

table.delivery th {
    font-weight: normal;
    font-style: italic;
    font-size: 10pt;
}

table.delivery th.main {
    text-align: left;
}

table.delivery tr.main td {
    font-weight: bold;
    padding-top: 2mm;
}

table.delivery tbody tr:not(.main) td {
    font-size: 8pt;
}

table.delivery tr.tight:not(.first) td {
    padding-top: 0;
    padding-bottom: 0;
}

table.delivery tr.tight.first td {
    padding-bottom: 0;
}

table.delivery tr.tight:has(+ tr:not(.tight)) td {
    padding-bottom: 0.5mm !important;
}

table.delivery tr.sum {
    border-top: 0.5pt solid black;
    break-before: avoid;
}

table.delivery tr.sum td {
    padding-top: 1mm;
}

table.delivery-note-stats {
    font-size: 8pt;
    break-inside: avoid;
    break-after: avoid;
}

table.delivery-note-stats th,
table.delivery-note-stats td {
    padding: 0.125mm 0;
}

table.delivery-note-stats:not(.expanded) tr.optional {
    display: none;
}

table.delivery-note-stats tr.subheading th {
    text-align: left;
}

table.delivery-note-stats.expanded tr.subheading:not(:has(~ tr)),
table.delivery-note-stats tr.subheading:not(:has(~ tr:not(.optional))) {
    display: none;
}

table.delivery-note-stats thead th {
    font-weight: normal;
    font-style: italic;
    text-align: right;
}

table.delivery-note-stats thead th:first-child {
    text-align: left;
}

table.delivery-note-stats td {
    text-align: right;
}

table.delivery-note-stats tbody th {
    font-weight: normal;
    font-style: italic;
    text-align: left;
}