@media print {

    /* Base Print Styles */

    body {
        background-color: #fff;
        color: #000;
        font-size: 1.1em; 
        margin: 0;
        padding-top: 0;
        padding-left: 0.7cm;
        padding-right: 0.7cm;
        padding-bottom: 0.7cm;
        max-width: none; 
    }

    body, textarea, select, input:not(.button):not([type="radio"]):not([type="checkbox"]), .button, button {
        font-family: var(--font-family);
    }

    h1 { font-size: 2em; }
    h2 { font-size: 1.7em; }
    h3 { font-size: 1.4em; }
    h4 { font-size: 1.2em;}

    a {
        color: #000; 
        text-decoration: underline; 
    }

    /* Borders And Separators */

    header, main, footer, form, fieldset, pre, blockquote, hr {
        border-color: #000 !important; 
        border-style: var(--border-style); 
    }

    /* Code And Blockquotes */

    code, pre {
        font-size: 0.8em; 
        white-space: pre-wrap;
        word-wrap: break-word;
        border: 1px solid #ccc; 
        padding: 5px;
    }

    blockquote {
        margin-left: 1.5em;
        padding-left: 1.2em;
        border-left: 1px solid #ccc; 
    }

    /* Hide Non-Essential Elements For Print */

    nav, aside, form, input, button, .button, .radio-group, .checkbox-group, .radio-label, .checkbox-label,
    #top, p:target:not(#top), .caption, footer, .h-card, .essentials
     {
        display: none !important;
        margin: 0;
        padding: 0;
    }

    /* Images */

    img, picture, video, canvas, svg {
        max-width: 100%;
        height: auto;
        display: block; 
        margin: 1em auto; 
        page-break-inside: avoid; 
    }

    .image-group {
        display: block;
        margin: 1em 0;
    }

    /* Page Breaks */

    h1, h2, h3, h4 {
        page-break-after: avoid; 
    }

    pre, blockquote {
        page-break-inside: avoid; 
    }

    /* URLS */

    a[href]:after {
        content: " (" attr(href) ")"; 
        font-size: 0.8em;
    }
    
    /* Don't Show For Internal Links */
    a[href^="#"]:after { 
        content: "";
    }
}