/* This file is loaded via <link media="print">, so everything in it — including
   rules outside this @media block — only ever applies while printing. Screen-only
   concerns (hiding .print-footer, styling the print buttons) belong in the page's
   own <style>, not here. */
@media print {
    * {
        background: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
        color: #000 !important;
    }

    html, body {
        background: #fff !important;
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 12pt;
        line-height: 1.5;
    }

    /* Always hidden on paper, full page or worksheet-only */
    .site-header,
    .breadcrumb,
    footer,
    .digital-extension,
    .interactive-sort,
    .related-lessons {
        display: none !important;
    }

    /* Worksheet-only is the default print view. The "Print Full Lesson" button
       adds .print-full to <body> before printing to include the teacher-facing
       sections; "Print Worksheet Only" removes it. */
    .at-a-glance,
    .objectives,
    .background,
    .procedure,
    .differentiation,
    .answer-key {
        display: none;
    }

    body.print-full .at-a-glance,
    body.print-full .objectives,
    body.print-full .background,
    body.print-full .procedure,
    body.print-full .differentiation,
    body.print-full .answer-key {
        display: block;
    }

    /* Admin header: hidden on worksheet-only prints always; on full-lesson prints it
       only shows if the on-page "include this header" checkbox is still checked. The
       toggle control itself never prints, regardless of state. */
    .admin-header {
        display: none !important;
    }

    body.print-full .admin-header:has(#admin-header-toggle:checked) {
        display: block !important;
        border: 1pt solid #000;
        border-radius: 0;
        margin-bottom: 12pt;
        padding: 8pt 10pt;
    }

    .admin-header-toggle-label {
        display: none !important;
    }

    .admin-input {
        border: none;
        border-bottom: 1pt solid #000;
        border-radius: 0;
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 11pt;
        padding: 0 2pt;
    }

    h1 {
        font-size: 18pt;
    }

    h2 {
        font-size: 14pt;
        page-break-after: avoid;
    }

    a {
        color: #000 !important;
        text-decoration: none;
    }

    /* Don't clutter student pages with expanded URLs */
    a::after,
    .breadcrumb a::after,
    nav a::after {
        content: none !important;
    }

    .worksheet-item {
        page-break-inside: avoid;
    }

    .worksheet-page-break {
        page-break-after: always;
    }

    .print-footer {
        display: block !important;
        margin-top: 1.5rem;
        padding-top: 0.5rem;
        border-top: 1pt solid #000;
        font-size: 9pt;
        text-align: center;
    }
}
