/* ======================================================================
   lutzkrebs.net Stylesheet
   ====================================================================== */

/* ── Excerpts from the Uchu colour palette ──────────────────────────── */

:root {
    /* Yin — near-white to near-black */
    --uchu-yin-2: oklch(84.61% 0.004 286.31);
    --uchu-yin-3: oklch(76.89% 0.004 247.87);
    --uchu-yin-5: oklch(61.01% 0.005 271.34);
    --uchu-yin-6: oklch(52.79% 0.005 271.32);
    --uchu-yin-7: oklch(43.87% 0.005 271.3);
    --uchu-yin-8: oklch(35.02% 0.005 236.66);
    --uchu-yin-9: oklch(25.11% 0.006 258.36);
    --uchu-yin: oklch(14.38% 0.007 256.88);

    /* Gray — near-neutral */
    --uchu-gray-1: oklch(95.57% 0.003 286.35);
    --uchu-gray-2: oklch(92.04% 0.002 197.12);
    --uchu-gray-3: oklch(88.28% 0.003 286.34);
    --uchu-gray-4: oklch(84.68% 0.002 197.12);
    --uchu-gray-5: oklch(80.73% 0.002 247.84);

    /* Blue */
    --uchu-blue-2: oklch(80.17% 0.091 258.88);
    --uchu-blue-3: oklch(70.94% 0.136 258.06);
    --uchu-blue-6: oklch(51.15% 0.204 260.17);
    --uchu-blue-8: oklch(43.48% 0.17 260.2);
    --uchu-blue-9: oklch(39.53% 0.15 259.87);

    /* Yellow */
    --uchu-yellow-3: oklch(92.76% 0.098 92.58);
    --uchu-yellow-5: oklch(89% 0.146 91.5);
    --uchu-yellow-6: oklch(82.39% 0.133 91.5);
    --uchu-yellow-7: oklch(75.84% 0.122 92.21);

    /* Purple */
    --uchu-purple-3: oklch(68.5% 0.136 303.78);
    --uchu-purple-5: oklch(49.39% 0.215 298.31);
}

/* ── Semantic colour tokens — light theme (default) ──────────────────── */

:root {
    /* Backgrounds */
    --bg: var(--uchu-gray-1);
    --bg-alt: var(--uchu-gray-3);

    /* Accent (active nav underline, skip-link bg, icon hover) */
    --nav-active: var(--uchu-yellow-5);

    /* Site title lettering */
    --site-title-color: var(--uchu-blue-9);

    /* Text */
    --text: var(--uchu-yin);
    --text-muted: var(--uchu-yin-7);
    --text-faint: var(--uchu-yin-5);

    /* Links */
    --link: var(--uchu-blue-6);
    --link-hover: var(--uchu-blue-8);
    --link-visited: var(--uchu-purple-5);

    /* Headings */
    --heading: var(--uchu-yin-9);

    /* Borders */
    --border: var(--uchu-gray-4);
    --border-alt: var(--uchu-gray-5);

    /* Code */
    --code-bg: var(--uchu-gray-2);
    --code-text: var(--uchu-yin-9);

    /* Tables */
    --table-stripe: var(--uchu-gray-2);
    --table-head-bg: var(--uchu-gray-3);

    /* Highlight (mark element / .highlight) */
    --highlight-bg: var(--uchu-yellow-3);
    --highlight-text: var(--uchu-yin-9);

    /* Shadows */
    --shadow-sm: 0 1px 3px oklch(25% 0.15 260 / 0.12);

    /* Layout */
    --content-width: 52rem;
    --page-pad: 1.5rem;
}

/* ── Dark theme via system preference ────────────────────────────────── */

@media (prefers-color-scheme: dark) {
    :root {
        --bg: var(--uchu-yin-9);
        --bg-alt: var(--uchu-yin-8);

        --nav-active: var(--uchu-yellow-6);
        --site-title-color: var(--uchu-blue-2);

        --text: var(--uchu-yin-3);
        --text-muted: var(--uchu-yin-5);
        --text-faint: var(--uchu-yin-6);

        --link: var(--uchu-blue-3);
        --link-hover: var(--uchu-blue-2);
        --link-visited: var(--uchu-purple-3);

        --heading: var(--uchu-yin-2);

        --border: var(--uchu-yin-8);
        --border-alt: var(--uchu-yin-7);

        --code-bg: var(--uchu-yin);
        --code-text: var(--uchu-yin-3);

        --table-stripe: var(--uchu-yin);
        --table-head-bg: var(--uchu-yin-8);

        --highlight-bg: var(--uchu-yellow-7);
        --highlight-text: var(--uchu-yin-9);

        --shadow-sm: 0 1px 3px oklch(0% 0 0 / 0.35);
        --shadow-md: 0 2px 8px oklch(0% 0 0 / 0.50);
    }
}

/* ── User-forced dark theme ──────────────────────────────────────────── */

html[data-theme="dark"] {
    --bg: var(--uchu-yin-9);
    --bg-alt: var(--uchu-yin-8);

    --nav-active: var(--uchu-yellow-6);
    --site-title-color: var(--uchu-blue-2);

    --text: var(--uchu-yin-3);
    --text-muted: var(--uchu-yin-5);
    --text-faint: var(--uchu-yin-6);

    --link: var(--uchu-blue-3);
    --link-hover: var(--uchu-blue-2);
    --link-visited: var(--uchu-purple-3);

    --heading: var(--uchu-yin-2);

    --border: var(--uchu-yin-8);
    --border-alt: var(--uchu-yin-7);

    --code-bg: var(--uchu-yin);
    --code-text: var(--uchu-yin-3);

    --table-stripe: var(--uchu-yin);
    --table-head-bg: var(--uchu-yin-8);

    --highlight-bg: var(--uchu-yellow-7);
    --highlight-text: var(--uchu-yin-9);

    --shadow-sm: 0 1px 3px oklch(0% 0 0 / 0.35);
    --shadow-md: 0 2px 8px oklch(0% 0 0 / 0.50);
}

/* ── User-forced light theme ─────────────────────────────────────────── */

html[data-theme="light"] {
    --bg: var(--uchu-gray-1);
    --bg-alt: var(--uchu-gray-3);

    --nav-active: var(--uchu-yellow-5);
    --site-title-color: var(--uchu-blue-9);

    --text: var(--uchu-yin);
    --text-muted: var(--uchu-yin-7);
    --text-faint: var(--uchu-yin-5);

    --link: var(--uchu-blue-6);
    --link-hover: var(--uchu-blue-8);
    --link-visited: var(--uchu-purple-5);

    --heading: var(--uchu-yin-9);

    --border: var(--uchu-gray-4);
    --border-alt: var(--uchu-gray-5);

    --code-bg: var(--uchu-gray-2);
    --code-text: var(--uchu-yin-9);

    --table-stripe: var(--uchu-gray-2);
    --table-head-bg: var(--uchu-gray-3);

    --highlight-bg: var(--uchu-yellow-3);
    --highlight-text: var(--uchu-yin-9);

    --shadow-sm: 0 1px 3px oklch(25% 0.15 260 / 0.12);
}


/* ── Reset & base ────────────────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

/* Sticky footer: body is a flex column that fills at least the viewport */
body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Alegreya', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.72;
    transition: background-color 0.2s, color 0.2s;
}

img, video, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--link);
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--link-hover);
}

a:visited {
    color: var(--link-visited);
}

/* ── Skip link ───────────────────────────────────────────────────────── */

.skip-link {
    position: absolute;
    top: -4rem;
    left: 1rem;
    background: var(--nav-active);
    color: var(--heading);
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 0 0 4px 4px;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.15s;
}

.skip-link:focus {
    top: 0;
}


/* ── Page structure ──────────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background-color: var(--bg);
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}



.header-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0.7rem var(--page-pad);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-header.scrolled .header-inner {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

/* Main content grows to fill remaining viewport height → footer stays at bottom */
main {
    flex: 1;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2.5rem var(--page-pad) 3rem;
    width: 100%;
    outline: none;
}

.site-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--text-faint);
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 300;
    font-size: 0.78rem;
    line-height: 1.55;
    padding: 1.5rem 0;
}

.footer-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--page-pad);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-credits {
    flex: 1;
    min-width: 16rem;
    margin: 0;
    color: var(--text-faint);
}

.footer-credits a {
    color: var(--text-faint);
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.footer-credits a:hover {
    color: var(--link);
}

.footer-profiles {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-shrink: 0;
    padding-top: 0.15rem;
}

.footer-profile-link {
    display: flex;
    align-items: center;
    opacity: 0.7;
    text-decoration: none;
}

.footer-profile-link:hover {
    opacity: 1;
}


/* ── Site title ──────────────────────────────────────────────────────── */

.site-title {
    font-family: 'Allison', 'Alegreya', serif;
    font-weight: 400;
    font-size: 2rem;
    color: var(--site-title-color);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.site-title:hover {
    color: var(--link);
    text-decoration: none;
}

.site-title:visited {
    color: var(--site-title-color);
}

.site-header.scrolled .site-title {
    font-size: 1.3rem;
}


/* ── Navigation ──────────────────────────────────────────────────────── */

.site-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.nav-link {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.2em;
    border-bottom: 2px solid transparent;
    letter-spacing: 0.01em;
}

.nav-link:hover {
    color: var(--link);
    text-decoration: none;
}

.nav-link:visited {
    color: var(--text-muted);
}

.nav-link.active {
    color: var(--heading);
    font-weight: 700;
    border-bottom-color: var(--nav-active); /* yellow accent underline */
}

/* Mobile hamburger button */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 4px;
    padding: 0.25rem 0.45rem;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}

.nav-toggle:hover {
    border-color: var(--link);
    color: var(--link);
}


/* ── Theme toggle button ───────────────────────────────────────────────────── */

.theme-toggle {
    background: none;
    border: none;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.theme-toggle-icon {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1;
}

.theme-toggle:hover .theme-toggle-icon {
    color: var(--link);
}


/* ── Typography ──────────────────────────────────────────────────────── */

/* Page titles (h1) — Alegreya Sans Bold */
h1 {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 700;
    font-size: 2.1rem;
    line-height: 1.2;
    color: var(--heading);
    margin: 1.2em 0 0.6em;
}

/* Second-level headings */
h2 {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 700;
    font-size: 1.45rem;
    line-height: 1.3;
    color: var(--heading);
    margin: 1em 0 0.5em;
}

/* h3 and below — Alegreya Sans Regular */
h3 {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 400;
    font-size: 1.2rem;
    line-height: 1.35;
    color: var(--heading);
    margin: 0.8em 0 0.4em;
}

h4 {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 400;
    font-size: 1.05rem;
    color: var(--heading);
    margin: 0.6em 0 0.3em;
}

h5, h6 {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0.4em 0 0.2em;
}

p {
    margin: 0 0 1em;
}

em {
    font-style: italic;
}

strong {
    font-weight: 700;
}

/* Highlighted text — use <mark> or class="highlight" */
mark, .highlight {
    background-color: var(--highlight-bg);
    color: var(--highlight-text);
    padding: 0.05em 0.25em;
    border-radius: 2px;
    font-style: normal;
}

blockquote {
    margin: 1.5em 0;
    padding: 0.6em 1.4em;
    border-left: 3px solid var(--border-alt);
    color: var(--text-muted);
    font-style: italic;
}

blockquote p:last-child {
    margin-bottom: 0;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

ul, ol {
    padding-left: 1.6em;
    margin: 0 0 1em;
}

li {
    margin-bottom: 0.2em;
}

li > ul, li > ol {
    margin-top: 0.2em;
    margin-bottom: 0.2em;
}


/* ── Code ────────────────────────────────────────────────────────────── */

code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em;
    background: var(--code-bg);
    color: var(--code-text);
    padding: 0.1em 0.3em;
    border-radius: 3px;
}

pre {
    background: var(--code-bg);
    color: var(--code-text);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.83em;
    padding: 1em 1.25em;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid var(--border);
    line-height: 1.5;
    margin: 0 0 1em;
}

pre code {
    background: none;
    padding: 0;
    font-size: 1em;
}


/* ── Tables ──────────────────────────────────────────────────────────── */

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5em 0;
    font-size: 0.88rem;
    font-family: 'Alegreya Sans', sans-serif;
    background: var(--bg);
}

th {
    font-weight: 700;
    text-align: left;
    padding: 0.5em 0.75em;
    background: var(--table-head-bg);
    color: var(--heading);
    border-bottom: 2px solid var(--border-alt);
}

td {
    padding: 0.45em 0.75em;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr:nth-child(even) {
    background: var(--table-stripe);
}

tbody tr:hover {
    background: var(--bg-alt);
}

th[style*="text-align: left"],
td[style*="text-align: left"] {
    text-align: left;
}


/* ── Post layouts ────────────────────────────────────────────────────── */

.post-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.post-title {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 700;
    font-size: 2.1rem;
    color: var(--heading);
    margin: 0 0 0.2rem;
    line-height: 1.2;
}

.post-meta {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.post-body {
    margin-bottom: 2rem;
}

.post-nav {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.post-nav-back {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
}

.post-nav-back:hover {
    color: var(--link);
}


/* ── Blog listing (me ♥ this) ────────────────────────────────────────── */

.blog-title {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 700;
    font-size: 2.1rem;
    color: var(--heading);
    margin: 0 0 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3em;
}

.blog-description {
    font-family: 'Alegreya Sans', sans-serif;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-list-item {
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--border);
}

.post-list-item:first-child {
    border-top: 1px solid var(--border);
}

.post-list-title {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 0 0.15rem;
    line-height: 1.3;
}

.post-list-title a {
    color: var(--heading);
    text-decoration: none;
}

.post-list-title a:hover {
    color: var(--link);
    text-decoration: underline;
}

.post-list-title a:visited {
    color: var(--heading);
}

.post-list-meta {
    font-family: 'Alegreya Sans', sans-serif;
    font-size: 0.83rem;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
}

.post-list-excerpt {
    color: var(--text);
    font-size: 0.95rem;
    margin: 0;
}


/* ── Page content ────────────────────────────────────────────────────── */

.page-content > *:first-child,
.page-content > h1:first-child {
    margin-top: 0;
}

h1 + p, h2 + p, h3 + p, h4 + p {
    margin-top: 0;
}

.page-content img {
    border-radius: 3px;
    margin: 0.5em 0;
}

img[style*="float: right"],
img[style*="float:right"] {
    margin-left: 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 3px;
}


/* ── SVG Icon system ─────────────────────────────────────────────────── */

.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    flex-shrink: 0;
}

/* ─ Heart — Font Awesome 7 solid heart, golden yellow ─ */
.icon-heart {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23f0c040' d='M241 87.1l15 20.7 15-20.7C296 52.5 336.2 32 378.9 32 452.4 32 512 91.6 512 165.1l0 2.6c0 112.2-139.9 242.5-212.9 298.2-12.4 9.4-27.6 14.1-43.1 14.1s-30.8-4.6-43.1-14.1C139.9 410.2 0 279.9 0 167.7l0-2.6C0 91.6 59.6 32 133.1 32 175.8 32 216 52.5 241 87.1z'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
    .icon-heart {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23b58900' d='M241 87.1l15 20.7 15-20.7C296 52.5 336.2 32 378.9 32 452.4 32 512 91.6 512 165.1l0 2.6c0 112.2-139.9 242.5-212.9 298.2-12.4 9.4-27.6 14.1-43.1 14.1s-30.8-4.6-43.1-14.1C139.9 410.2 0 279.9 0 167.7l0-2.6C0 91.6 59.6 32 133.1 32 175.8 32 216 52.5 241 87.1z'/%3E%3C/svg%3E");
    }
}

html[data-theme="dark"] .icon-heart {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23b58900' d='M241 87.1l15 20.7 15-20.7C296 52.5 336.2 32 378.9 32 452.4 32 512 91.6 512 165.1l0 2.6c0 112.2-139.9 242.5-212.9 298.2-12.4 9.4-27.6 14.1-43.1 14.1s-30.8-4.6-43.1-14.1C139.9 410.2 0 279.9 0 167.7l0-2.6C0 91.6 59.6 32 133.1 32 175.8 32 216 52.5 241 87.1z'/%3E%3C/svg%3E");
}

html[data-theme="light"] .icon-heart {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23f0c040' d='M241 87.1l15 20.7 15-20.7C296 52.5 336.2 32 378.9 32 452.4 32 512 91.6 512 165.1l0 2.6c0 112.2-139.9 242.5-212.9 298.2-12.4 9.4-27.6 14.1-43.1 14.1s-30.8-4.6-43.1-14.1C139.9 410.2 0 279.9 0 167.7l0-2.6C0 91.6 59.6 32 133.1 32 175.8 32 216 52.5 241 87.1z'/%3E%3C/svg%3E");
}

/* ── Organization icons ────────────────────────────────────────────────── */

.org-icon {
    display: inline-block;
    vertical-align: middle;
}

.footer-profile-link .org-icon {
    opacity: 0.6;
}

.footer-profile-link:hover .org-icon {
    opacity: 1;
}

.org-icon-um       { width: 1.15rem; height: 1.55rem; }
.org-icon-unu      { width: 1.84rem; height: 1.55rem; }
.org-icon-codeberg { width: 1.55rem; height: 1.55rem; }


/* ── 404 page ────────────────────────────────────────────────────────── */

.error-link {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 700;
}


/* ── Responsive — mobile ─────────────────────────────────────────────── */

@media (max-width: 640px) {

    html {
        font-size: 16px;
    }

    .header-inner {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .site-title {
        font-size: 1.1rem;
    }

    .site-header.scrolled .site-title {
        font-size: 1rem;
    }

    .nav-toggle {
        display: flex;
        order: 3;
        margin-left: auto;
    }

    .theme-toggle {
        order: 4;
    }

    .site-nav {
        order: 5;
        flex-basis: 100%;
        justify-content: flex-start;
        display: none;
        overflow: hidden;
    }

    .site-nav.open {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 0.5rem 0;
        border-top: 1px solid var(--border);
    }

    .nav-list li {
        width: 100%;
    }

    .nav-link {
        padding: 0.6rem 0.5rem;
        width: 100%;
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .nav-link.active {
        border-left-color: var(--nav-active);
        border-bottom: none;
    }

    main {
        padding: 1.75rem 1rem 2.5rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-profiles {
        padding-top: 0;
    }

    h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .post-title {
        font-size: 1.7rem;
    }

    .blog-title {
        font-size: 1.7rem;
    }

    .page-content table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 400px) {
    :root {
        --page-pad: 1rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }
}


/* ── Print ───────────────────────────────────────────────────────────── */

@media print {
    .site-header,
    .site-footer,
    .skip-link,
    .theme-toggle,
    .nav-toggle {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
        line-height: 1.5;
        min-height: unset;
        display: block;
    }

    a {
        color: #000;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.75em;
        color: #555;
    }

    a[href^="#"]::after {
        content: "";
    }

    main {
        max-width: 100%;
        padding: 0;
    }

    h1, h2, h3 {
        break-after: avoid;
    }

    table, figure {
        break-inside: avoid;
    }
}
