@media print {

    * {
        box-sizing: border-box;
    }

    html,
    body {
        margin: 0;
        padding: 0;
        width: 210mm;
        height: 100%;
    }

    body {
        font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
        color: #111;
    }

    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    body {
        color: #000;
    }

    a[href]:after {
        content: "";
    }

    .print-section {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
        page-break-inside: avoid;
        border-right: 1px solid black;
    }

    col {
        width: 10%;
    }

    tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    td {
        border: 1px solid black;
        font-size: 14px;
        line-height: 1.3;
        vertical-align: top;
    }

    td:first-of-type {
        border-left: 2px solid black;
        /*background-color: lightblue;*/
    }

    td:last-of-type {
        border-right: 2px solid black;
        /*background-color: chocolate;*/
    }

    thead > tr.service-type-desc {
        background-color: lightblue;
        text-align: center;
        padding-top: 3px;
        padding-bottom: 3px;
        margin-top: 2rem;
        border: 1px solid black;
        border-left: 2px solid black;
        border-right: 2px solid black;
    }

    tr.resource-title {
        background-color: lavender;
        text-align: left;
        padding-top: 3px;
        padding-bottom: 3px;
        margin-left: 3rem;
        margin-top: 2rem;
        border: 2px solid black;
        border-top: 1px solid black;
        th {
            padding-left: 3px;
        }
    }

    tbody td {
        padding: 2px 2px;
    }

    .title {
        font-weight: 600;
    }

    .city {
        text-align: right;
    }

    .desc-cell {
        padding: 0;
    }

    .desc-wrap {
        display: grid;
        grid-template-columns: 1fr 40%;
        gap: 0;
        min-height: 100%;
    }

    .desc-main {
        padding: 8px;
        border-right: 1px solid #555;
    }

    .desc-aside {
        display: grid;
        grid-template-rows: auto auto auto;
        gap: 0;

        .aside-block:has(> div) {
            padding: 8px;
            border-bottom: 1px solid #555;
        }

        .aside-block:last-child {
            border-bottom: 0;
        }
    }

    .desc-no-notes {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
        margin-left: 0.5rem;
        margin-right: 0.5rem;

        /* pull the box into the left and top so that the border remains 1px instead of 2px */
        .aside-block {
            flex-basis: 50%;
            padding: 8px;
            border: 1px solid #555;
            margin-top: -1px;
            margin-left: -1px;
        }

        /* collapse the extra border into the bottom */
        .aside-block:last-child, .aside-block:has(+ :last-child) {
            margin-bottom: -1px;
        }

        .aside-block:nth-child(odd) {
            border-left: none;
        }

        .aside-block:nth-child(even) {
            border-right: none;
        }

        .aside-block:not(:has(:nth-child(n+3))) {
            border-bottom: none;
        }
    }

    .info-label {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        color: #555;
        margin-bottom: 4px;
        display: flex;
        justify-content: space-between;

        span:last-child {
            font-weight: 700;
        }
    }

    .kv-list {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .kv-list li {
        margin: 0;
        padding: 0;
    }

    .kv-list li+li {
        margin-top: 2px;
    }

    .mono {
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
        word-break: break-word;
    }

    .record {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    thead tr.resource-name  {
        background-color: aliceblue;
    }

    td.city {
        border-left: none;
    }

    p {
        orphans: 3;
        widows: 3;
        margin: 0 0 6px 0;
    }

    .no-break {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    tr.no-break.record {
        border-top: 0;
    }

    td.desc-cell {
        border-top: 0;
    }

}