@media print {
    @page {
        size: B5 portrait;
        margin: 1.5cm 2cm;
    }

    /* hide chrome, downloads, footer */
    .field-bar,
    .field-hero,
    .downloads,
    .tip,
    .field-footer {
        display: none !important;
    }

    /* hide interactive chrome */
    .principle__chev {
        display: none !important;
    }

    summary {
        list-style: none;
    }

    summary::-webkit-details-marker {
        display: none;
    }

    /* force light mode so CSS variables resolve to light values */
    :root { color-scheme: light; }

    /* full-width, no page margin duplication */
    html { background: #fff !important; }
    body {
        margin: 0;
        padding: 0;
        background: #fff !important;
    }

    .principles-list,
    .quickref {
        padding: 0;
        margin: 0;
        max-width: none;
        width: 100%;
    }

    /* each principle fills one B5 portrait page */
    .principle {
        height: calc(250mm - 3cm); /* B5 height minus top+bottom margins */
        box-sizing: border-box;
        padding: 1cm;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        break-after: page;
        border: none;
        background: none;
        background-color: #fff;
    }

    .principle summary {
        flex-shrink: 0;
        padding: 0.75rem 0;
    }

    /* force body visible; figure above text */
    details > .principle__body,
    details[open] > .principle__body {
        display: flex !important;
        flex-direction: column;
        gap: 1.25rem;
        flex: 1;
        overflow: hidden;
        border: none;
        padding: 0.75rem 0 0;
    }

    .quickref {
        break-before: auto;
        background-color: #fff;
        padding: 1cm;
    }
}
