/* Print stylesheet - B&W optimized version of main website styles */
/* Based on main.css but adapted for black and white printing */

@media print {
    :root {
        --background: oklch(1 0 0);
        --foreground: oklch(0.145 0 0);
        --card: oklch(1 0 0);
        --card-foreground: oklch(0.145 0 0);
        --primary: oklch(0.488 0.243 264.376);
        --primary-foreground: oklch(0.985 0 0);
        --secondary: oklch(0.97 0 0);
        --secondary-foreground: oklch(0.205 0 0);
        --muted: oklch(0.97 0.005 80);
        --muted-foreground: oklch(0.45 0 0);
        --accent: oklch(0.488 0.243 264.376);
        --accent-foreground: oklch(0.985 0 0);
        --border: #e5e7eb;
        --ring: oklch(0.708 0 0);
    }

    html {
        counter-reset: page;
    }

    body {
        background: var(--background) !important;
        color: var(--foreground) !important;
        font-size: 10.5pt;
        line-height: 1.5;
        font-family: "IBM Plex Sans", serif;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    h1 {
        font-size: 22pt;
        font-weight: 700;
        margin-top: 0;
        margin-bottom: 0.3em;
        page-break-after: avoid;
    }

    h2 {
        font-size: 16pt;
        font-weight: 700;
        margin-top: 0.8em;
        margin-bottom: 0.3em;
        page-break-after: avoid;
    }

    h3 {
        font-size: 13pt;
        font-weight: 700;
        margin-top: 1.5em;
        margin-bottom: 0.2em;
        page-break-after: avoid;
    }

    h4 {
        font-size: 11pt;
        font-weight: 600;
        margin-top: 1.4em;
        margin-bottom: 0.2em;
        page-break-after: avoid;
    }

    h5,
    h6 {
        font-size: 10.5pt;
        font-weight: 600;
        margin-top: 1.3em;
        margin-bottom: 0.2em;
        page-break-after: avoid;
    }

    p {
        margin-top: 0;
        margin-bottom: 0.5em;
        widows: 2;
        orphans: 2;
    }

    a {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.9em;
        color: var(--muted-foreground);
    }

    /* article, section, and div removed to allow page breaks inside content */

    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
        border: 1px solid var(--border) !important;
    }

    figure {
        page-break-inside: avoid;
        margin: 1em 0;
    }

    figcaption {
        font-size: 0.9em;
        font-style: italic;
        text-align: center;
        margin-top: 0.5em;
        color: var(--muted-foreground);
    }

    table {
        width: 100%;
        border-collapse: collapse;
        margin: 0.5em 0;
        page-break-inside: avoid;
    }

    th,
    td {
        padding: 0.4em 0.5em;
        text-align: left;
        border-bottom: 1px solid var(--primary);
    }

    th {
        background: transparent !important;
        font-weight: 700;
        border-bottom: 2px solid var(--primary);
    }

    thead {
        background: transparent !important;
    }

    tr:last-child td,
    tr:last-child th {
        border-bottom: none;
    }

    tr:nth-child(even) {
        background: transparent !important;
    }

    ul,
    ol {
        margin: 0.5em 0;
        padding-left: 1.5em;
    }

    li {
        margin-bottom: 0.15em;
    }

    .prose {
        max-width: 100%;
    }

    .prose h1,
    .prose h2,
    .prose h3,
    .prose h4,
    .prose h5,
    .prose h6 {
        font-weight: 700;
    }

    .prose pre {
        border: 1px solid var(--border);
        background: #f5f5f5 !important;
        padding: 1em;
        overflow: visible;
        white-space: pre-wrap;
    }

    .prose code {
        background: #f0f0f0 !important;
        border: 1px solid #ccc;
        padding: 0.1em 0.3em;
        font-family: "IBM Plex Mono", monospace;
        font-size: 0.9em;
    }

    .prose blockquote {
        border-left: 3px solid var(--primary);
        padding-left: 1em;
        margin: 1em 0;
        font-style: italic;
        color: var(--muted-foreground);
    }

    .border-2,
    .border {
        border: 1px solid var(--border) !important;
    }

    .shadow-brutal,
    .shadow-lg,
    .shadow-md,
    .shadow-sm {
        box-shadow: none !important;
    }

    .hub-card-bg {}

    .text-accent {
        color: var(--accent) !important;
        font-weight: bold;
    }

    .bg-accent {
        background: var(--accent) !important;
        color: var(--accent-foreground) !important;
        font-weight: bold;
    }

    nav,
    header.sticky,
    footer:not(.print-footer),
    .mobile-menu-toggle,
    #mobile-menu,
    .social-hero-container {
        display: none !important;
    }

    @page {
        margin: 20mm;
        margin-bottom: 25mm;
        size: a4;
        counter-increment: page;
    }

    .print-footer-right::after {
        content: "Page " counter(page);
    }

    .max-w-7xl,
    .max-w-4xl,
    .max-w-none {
        max-width: 100% !important;
    }

    .rounded-none,
    .rounded-lg,
    .rounded-full {
        border-radius: 0 !important;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    table,
    figure,
    img,
    ul,
    ol,
    blockquote,
    pre {
        page-break-inside: avoid;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        page-break-after: avoid;
        page-break-before: avoid;
    }

    .sr-only,
    script {
        display: none !important;
    }

    .page-break-before {
        -moz-column-break-before: page;
             break-before: page;
        page-break-before: always;
        display: block;
        height: 0;
    }

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

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

    .print-footer {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 0.4in;
        border-top: 1px solid var(--border);
        font-size: 9pt;
        color: var(--muted-foreground);
        align-items: center;
        justify-content: space-between;
        padding: 0 5mm;
        background: var(--background);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-footer-right::after {
        content: "Page " counter(page);
    }
}

