/*
 * sheet-print.css: shared print layout for the /learn/resources/ one-pagers.
 * Linked AFTER each sheet's inline <style>, so it wins on equal specificity.
 * Goal: every sheet prints to exactly one US Letter page, because every card,
 * gate and kicker promises "one page". Re-check with headless Chrome after any
 * content change (python3 scripts/build_sheet_pdfs.py, which also rebuilds assets/pdf/).
 */
@page { size: letter; margin: 0.4in 0.45in; }

@media print {
    html { font-size: 11px !important; }
    body { background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    header, footer, .sheet-actionbar, .skip-link, .cc-banner, #cc-banner, #cookie-banner, .subscribe-net-banner { display: none !important; }

    .sheet-wrap { padding: 0 !important; max-width: none !important; margin: 0 !important; }
    .sheet { border: 0 !important; border-radius: 0 !important; padding: 0 !important; }

    .sheet-head { padding-bottom: 0.55rem !important; margin-bottom: 0.7rem !important; border-bottom-width: 2px !important; }
    .sheet h1 { font-size: 1.85rem !important; margin: 0.15rem 0 0.3rem !important; }
    .sheet-lede { font-size: 1rem !important; line-height: 1.45 !important; }
    .sheet h2 { margin: 0.95rem 0 0.4rem !important; font-size: 1.05rem !important; break-after: avoid; page-break-after: avoid; }
    .sheet h3 { break-after: avoid; }
    .sheet p, .sheet li { line-height: 1.42 !important; }

    /* Tables: tighter cells, never clipped by a scroll wrapper */
    .table-wrapper, .tbl-scroll { overflow: visible !important; }
    .sheet table th, .sheet table td { padding: 0.28rem 0.4rem !important; line-height: 1.32 !important; }
    .sheet table td:first-child { white-space: normal !important; }
    .sheet tr { break-inside: avoid; page-break-inside: avoid; }

    /* Lists and boxes: tighter rhythm, and never split across a page */
    .rules, .check-list, .steps { gap: 0.32rem !important; }
    .check-list li, .rules li { margin-bottom: 0 !important; }
    .redflags, .callout-box, .note-box, .worked, .fit-card, .kit, .three { break-inside: avoid; page-break-inside: avoid; }
    .redflags, .callout-box, .note-box, .worked { padding: 0.6rem 0.8rem !important; margin-top: 0.7rem !important; }
    .fit-grid { gap: 0.5rem !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .fit-card { padding: 0.5rem 0.6rem !important; }

    .sheet-foot { margin-top: 0.8rem !important; padding-top: 0.5rem !important; font-size: 0.82rem !important; line-height: 1.4 !important; }
    a { color: inherit !important; text-decoration: none !important; }
    .sheet-url { color: #4f46e5 !important; }
}
