/*
 * matty.page: print stylesheet
 *
 * Copyright (c) 2026 matty.page
 * Licensed under the GNU General Public License, version 3.
 * See the LICENSE file in the repository root for the full licence text.
 *
 * Loaded after main.css, so these rules win where specificity is equal.
 * The tokens are redefined rather than every individual colour, so that
 * anything inheriting from body (including headings) flips to dark on white.
 */

@page {
    margin: 2cm;
}

/* ==========================================================================
   1. Dark text, white background
   ========================================================================== */

:root {
    color-scheme: light;

    --colour-body: #ffffff;
    --colour-chrome: #ffffff;
    --colour-text: #181818;
    --colour-text-hover: #181818;
    --colour-focus: #181818;
    --colour-rule: #181818;
}

/* ==========================================================================
   2. Full printable width
   With max-width: none there is no free space for auto margins to resolve
   against, so the content fills the page box and aligns to the left edge
   without any margin override.
   ========================================================================== */

.header-inner,
.article-inner,
.footer-inner {
    max-width: none;
    padding: 0;
}

.site-header,
.site-footer {
    max-width: none;
    padding: 0;
}

/* ==========================================================================
   3. Avoid splitting media across pages
   The figure rule keeps the image with its caption.
   ========================================================================== */

figure,
img {
    break-inside: avoid;
}
