@media print {
    body {
        font-family: 'Times New Roman', Times, serif;
        color: #000000;
        background-color: #ffffff;
        font-size: 12pt;
        line-height: 1.4;
    }

    header, footer, nav, aside, .skip-link, #toggle-contrast,
    #video-section video, #video-section .progress,
    .btn, form, .breadcrumb,
    .course-menu,
    .nav-tabs,
    .code-block-container .copy-code-btn,
    .codex-hero p:last-child {
        display: none !important;
    }

    main {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    a {
        color: #000000;
        text-decoration: none; 
    }
    a[href^="http"]::after, a[href^="https"]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #333333;
    }
    a[href^="#"]::after, a[href^="/"]::after, a[href^="."]::after, a[href^="mailto"]::after {
        content: "";
    }
    .card-title a::after { content: ""; }


    h1, h2, h3, h4, h5, h6 {
        color: #000000;
        page-break-after: avoid;
        margin-top: 1.5em;
        margin-bottom: 0.5em;
    }
    h1 { font-size: 20pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }

    .container, .album, .py-5 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .card {
        page-break-inside: avoid;
        border: 1px solid #cccccc;
        box-shadow: none;
    }
    .card-img-top, img {
        max-width: 200px !important;
        height: auto !important;
        display: block;
        margin: 0 auto 10px auto;
    }
    figure figcaption {
        text-align: center;
        font-style: italic;
        font-size: 10pt;
    }

    .table, .table th, .table td {
        border: 1px solid #333333 !important;
        color: #000000 !important;
        background-color: #ffffff !important;
    }
    .table th {
        font-weight: bold;
    }
    .table-responsive {
        overflow-x: visible !important;
    }

    .tab-content .tab-pane {
        display: block !important;
        opacity: 1 !important;
        border: 1px solid #ccc !important;
        padding: 10px !important;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    .tab-content > .tab-pane > h3 {
        margin-top: 0;
    }

    .code-block-container {
        background-color: #f0f0f0 !important;
        color: #000000 !important;
        border: 1px solid #cccccc !important;
        padding: 5px !important;
        page-break-inside: avoid;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
    pre {
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
    }
    
    #video-section details summary + div {
        display: block !important;
    }
    #video-section details summary {
        font-weight: bold;
    }

    blockquote {
        border-left: 3px solid #ccc;
        padding-left: 10px;
        margin-left: 0;
        font-style: italic;
    }
}