/* ==========================================================================
   LEGAL PAGES — Print Stylesheet
   Contract-aesthetic rendering for Privacy Policy & Terms of Service
   ========================================================================== */


/* --- Print header — hidden on screen --- */

.legal-print-header {
    display: none !important;
}


@media print {

    /* --- Print header — logo lockup --- */

    .legal-print-header {
        display: flex !important;
        align-items: center;
        gap: 8pt;
        margin-bottom: 32pt;
    }

    .legal-print-logo-icon {
        width: 22pt;
        height: 22pt;
    }

    .legal-print-logo-text {
        font-family: "Geologica", sans-serif;
        font-size: 16pt;
        font-weight: 700;
        color: #0a2540;
        letter-spacing: -0.02em;
    }

    /* --- Hide chrome --- */

    .nav,
    .nav-mobile-menu,
    .footer,
    .legal-sidebar,
    body::before {
        display: none !important;
    }


    /* --- Page setup --- */

    @page {
        size: letter;
        margin: 1in 1.25in;
    }

    html, body {
        font-family: "Times New Roman", "Georgia", "Garamond", serif;
        font-size: 12pt;
        line-height: 1.6;
        color: #000;
        background: #fff;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }


    /* --- Layout — single column, full width --- */

    .legal {
        padding: 0 !important;
    }

    .legal-layout {
        display: block !important;
        max-width: none !important;
        padding: 0 !important;
    }

    .legal-content {
        max-width: none !important;
    }


    /* --- Title block --- */

    .legal-content h1 {
        font-family: "Times New Roman", "Georgia", "Garamond", serif;
        font-size: 22pt;
        font-weight: 700;
        color: #000;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 8pt;
        padding-bottom: 16pt;
        border-bottom: 2px solid #000;
    }

    .legal-meta {
        font-size: 10pt;
        color: #333;
        text-align: center;
        margin-bottom: 32pt;
        font-weight: 400;
        font-style: italic;
    }


    /* --- Section headings --- */

    .legal-content h2 {
        font-family: "Times New Roman", "Georgia", "Garamond", serif;
        font-size: 14pt;
        font-weight: 700;
        color: #000;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        margin-top: 28pt;
        margin-bottom: 10pt;
        padding-bottom: 4pt;
        border-bottom: 1px solid #999;
        page-break-after: avoid;
    }

    .legal-content h3 {
        font-family: "Times New Roman", "Georgia", "Garamond", serif;
        font-size: 12pt;
        font-weight: 700;
        color: #000;
        margin-top: 18pt;
        margin-bottom: 6pt;
        page-break-after: avoid;
    }


    /* --- Body text --- */

    .legal-content p {
        font-size: 11pt;
        color: #000;
        line-height: 1.7;
        margin-bottom: 10pt;
        text-align: justify;
        orphans: 3;
        widows: 3;
    }


    /* --- Lists --- */

    .legal-content ul,
    .legal-content ol {
        font-size: 11pt;
        color: #000;
        line-height: 1.7;
        margin-bottom: 10pt;
        padding-left: 28pt;
    }

    .legal-content li {
        margin-bottom: 4pt;
    }

    /* Top-level section list — numbers rendered via CSS counter on h2 */
    .legal-content > ol {
        list-style: none;
        padding-left: 0;
        counter-reset: legal-section;
    }

    .legal-content > ol > li {
        counter-increment: legal-section;
    }

    .legal-content > ol > li > h2::before {
        content: counter(legal-section) ". ";
    }

    /* Nested lists inside sections */
    .legal-content > ol > li > ol {
        padding-left: 28pt;
    }

    .legal-content > ol > li > ol,
    .legal-content > ol > li > ol > li > ol {
        list-style-type: lower-alpha;
    }

    .legal-content > ol > li > ol > li > ol {
        list-style-type: lower-roman;
    }


    /* --- Links — show URL in parentheses --- */

    .legal-content a {
        color: #000;
        text-decoration: underline;
    }

    .legal-content a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #555;
        word-break: break-all;
    }

    /* Don't expand internal anchor links */
    .legal-content a[href^="#"]::after {
        content: none;
    }


    /* --- Tables --- */

    .legal-content table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 16pt;
        font-size: 10pt;
        page-break-inside: avoid;
    }

    .legal-content th {
        font-weight: 700;
        color: #000;
        padding: 6pt 10pt;
        border: 1px solid #000;
        background: #f0f0f0 !important;
        text-align: left;
    }

    .legal-content td {
        padding: 6pt 10pt;
        border: 1px solid #000;
        color: #000;
    }


    /* --- Blockquotes --- */

    .legal-content blockquote {
        border-left: 3pt solid #000;
        padding-left: 14pt;
        margin: 14pt 0;
        font-style: italic;
        color: #333;
    }


    /* --- Horizontal rules --- */

    .legal-content hr {
        border: none;
        border-top: 1px solid #999;
        margin: 28pt 0;
    }


    /* --- Strong / emphasis --- */

    .legal-content strong {
        color: #000;
    }


    /* --- Page break control --- */

    .legal-content h1,
    .legal-content h2,
    .legal-content h3 {
        page-break-after: avoid;
    }

    .legal-content table,
    .legal-content blockquote {
        page-break-inside: avoid;
    }

    .legal-content p {
        page-break-inside: avoid;
    }
}
