/**
 * Print Preset — clean document-like output for reading / printing.
 * Loaded with media="print" only: zero cost on screen rendering.
 * Goal: single column, serif type, no site chrome, no ads, no widgets.
 *
 * @package twentysix
 */

/* Page box */
@page {
    size: A4;
    margin: 20mm 16mm 20mm 16mm;
}

/* ============ Hide everything that is not the document ============ */
.site-header,
.main-navigation,
.mobile-menu-toggle,
.menu-toggle,
.search-form,
.theme-toggle,
.breadcrumbs,
.breadcrumb,
.widget-area.sidebar,
.site-footer,
.footer-widget-area,
.footer-widgets,
#comments,
.comments-area,
.comment-list,
.comment-respond,
.post-navigation,
.posts-navigation,
.pagination,
.page-links,
.twentysix-ad-slot,
.twentysix-nag,
.twentysix-cookie-settings-link,
#open-cookie-settings,
#cookie-consent-popup,
.back-to-top,
.reading-progress-bar,
.reading-progress,
.share-buttons,
.social-share,
.author-box,
.related-posts,
.entry-footer .tags-links,
.widget {
    display: none !important;
}

/* ============ Single-column document canvas ============ */
body {
    background: #fff !important;
    color: #111 !important;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 12pt;
    line-height: 1.6;
}

.site-content,
.content-area,
.site-main,
.container,
.entry-content,
article {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* ============ Document header ============ */
.entry-header {
    border-bottom: 1pt solid #999;
    margin-bottom: 14pt;
    padding-bottom: 10pt;
}

.entry-title {
    font-size: 22pt;
    line-height: 1.25;
    margin: 0 0 6pt 0;
    color: #000 !important;
}

.entry-meta,
.post-categories {
    font-size: 9.5pt;
    color: #444 !important;
}

/* ============ Body type ============ */
.entry-content p,
.entry-content li {
    orphans: 3;
    widows: 3;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: #000 !important;
    break-after: avoid;
    margin-top: 16pt;
}

.entry-content h2 { font-size: 16pt; }
.entry-content h3 { font-size: 13pt; }

/* ============ Links: underline + show external URLs ============ */
.entry-content a {
    color: #000 !important;
    text-decoration: underline;
    background: none !important;
}

/* Print destination for real external links only (skip #anchors, JS, same-page) */
.entry-content a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8.5pt;
    color: #555 !important;
    word-break: break-all;
}

/* ============ Media: keep inside the page ============ */
.entry-content img,
.entry-content figure,
.wp-caption {
    max-width: 100% !important;
    height: auto !important;
    break-inside: avoid;
}

.entry-content figure {
    margin: 12pt 0;
}

.entry-content figcaption {
    font-size: 9pt;
    color: #444 !important;
    text-align: center;
}

/* Featured image: present but capped so it never eats the first page */
.post-thumbnail img,
.entry-header img {
    max-height: 90mm;
    width: auto;
}

/* ============ Tables: ruled, repeating header ============ */
.entry-content table {
    border-collapse: collapse;
    width: 100% !important;
    font-size: 10pt;
    break-inside: auto;
}

.entry-content thead { display: table-header-group; }
.entry-content tr { break-inside: avoid; }

.entry-content th,
.entry-content td {
    border: 0.75pt solid #666;
    padding: 4pt 6pt;
    background: none !important;
    color: #000 !important;
}

/* ============ Code: wrapped, boxed, light ============ */
.entry-content pre,
.entry-content code {
    font-family: 'Courier New', monospace;
    font-size: 9.5pt;
    background: none !important;
    color: #000 !important;
    border: 0.75pt solid #999;
}

.entry-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 8pt;
    break-inside: avoid;
}

/* ============ Misc print hygiene ============ */
.entry-content blockquote {
    border-left: 2pt solid #666;
    margin-left: 0;
    padding-left: 12pt;
    color: #222 !important;
    break-inside: avoid;
}

.entry-content hr {
    border: none;
    border-top: 0.75pt solid #999;
}

/* Never leave a heading stranded at the bottom of a page */
h1, h2, h3, h4, h5, h6 {
    break-after: avoid;
}
