/* ==========================================================================
   knopfi — Fluent-inspired Ghost theme
   IT / endpoint-management blog. Fluent-2 style design language.
   Light + dark via prefers-color-scheme.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------- */

:root {
    /* Brand — Microsoft communication blue ramp */
    --brand-10: #eff6fc;
    --brand-20: #deecf9;
    --brand-40: #a9d3f2;
    --brand-primary: #0f6cbd;   /* Fluent 2 brand primary */
    --brand-hover: #115ea3;
    --brand-pressed: #0c3b5e;
    --brand-communication: #0078d4; /* classic Azure/Intune blue */

    /* knopfi hexagon mark palette */
    --mark-green-light: #a7c796;
    --mark-green: #6f9268;
    --mark-green-dark: #5f7d5b;
    --mark-orange: #bf6529;

    /* Neutrals — light (Fluent grays) */
    --canvas: #f5f5f5;
    --surface: #ffffff;
    --surface-alt: #faf9f8;
    --surface-hover: #f3f2f1;
    --border: #e1dfdd;
    --border-strong: #d2d0ce;
    --text: #242424;
    --text-secondary: #605e5c;
    --text-tertiary: #8a8886;
    --text-on-brand: #ffffff;

    /* Accent resolved to brand (overridable by Ghost accent color) */
    --accent: var(--brand-primary);
    --accent-hover: var(--brand-hover);

    /* Fluent depth (elevation) */
    --shadow-2: 0 0.3px 0.9px rgba(0,0,0,0.10), 0 0.8px 1.8px rgba(0,0,0,0.13);
    --shadow-4: 0 0.3px 0.9px rgba(0,0,0,0.11), 0 1.6px 3.6px rgba(0,0,0,0.13);
    --shadow-8: 0 0.6px 1.8px rgba(0,0,0,0.11), 0 3.2px 7.2px rgba(0,0,0,0.13);
    --shadow-16: 0 1.2px 3.6px rgba(0,0,0,0.11), 0 6.4px 14.4px rgba(0,0,0,0.13);

    /* Shape */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    /* Layout */
    --content-width: 740px;
    --wide-width: 1180px;

    /* Type */
    --font-sans: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI",
        system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "Cascadia Code", "Cascadia Mono", "Consolas", "SFMono-Regular",
        ui-monospace, Menlo, Monaco, monospace;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --canvas: #1b1a19;
        --surface: #292827;
        --surface-alt: #201f1e;
        --surface-hover: #3b3a39;
        --border: #3b3a39;
        --border-strong: #484644;
        --text: #f3f2f1;
        --text-secondary: #c8c6c4;
        --text-tertiary: #979593;
        --text-on-brand: #ffffff;

        --accent: #479ef5;      /* Fluent brand for dark surfaces */
        --accent-hover: #62abf5;

        --brand-10: #082338;
        --brand-20: #0a3055;

        --shadow-2: 0 0.3px 0.9px rgba(0,0,0,0.28), 0 0.8px 1.8px rgba(0,0,0,0.36);
        --shadow-4: 0 0.3px 0.9px rgba(0,0,0,0.28), 0 1.6px 3.6px rgba(0,0,0,0.36);
        --shadow-8: 0 0.6px 1.8px rgba(0,0,0,0.28), 0 3.2px 7.2px rgba(0,0,0,0.36);
        --shadow-16: 0 1.2px 3.6px rgba(0,0,0,0.28), 0 6.4px 14.4px rgba(0,0,0,0.36);
    }
}

/* --- Reset / base -------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--gh-font-body, var(--font-sans));
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    font-family: var(--gh-font-heading, var(--font-sans));
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Layout helpers ------------------------------------------------------ */

.wrap {
    width: 100%;
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0 24px;
}

.site-main { flex: 1 0 auto; padding: 40px 0 64px; }

/* --- Site header --------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 60px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.site-brand:hover { text-decoration: none; color: var(--text); }

.brand-mark { flex: 0 0 auto; display: block; }
.brand-mark polygon { stroke: var(--surface); stroke-width: 0.6; }

.site-brand-logo { height: 30px; width: auto; display: block; }

/* --- Navigation ---------------------------------------------------------- */

.site-nav { display: flex; align-items: center; gap: 4px; }

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

.nav-item a {
    display: inline-block;
    padding: 7px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.12s ease, color 0.12s ease;
}
.nav-item a:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }

.nav-item.nav-current a {
    color: var(--accent);
    background: var(--brand-10);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-hover); }
.nav-toggle svg { width: 20px; height: 20px; }

/* Header search button — triggers Ghost's built-in search (also Ctrl/Cmd-K) */
.site-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.site-search:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-strong); }
.site-search svg { width: 18px; height: 18px; }

@media (max-width: 720px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: absolute;
        top: 60px; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-8);
        padding: 8px;
        display: none;
    }
    .site-nav.is-open { display: flex; }
    .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
    .nav-item a { padding: 12px; border-radius: var(--radius-md); }
}

/* --- Home hero ----------------------------------------------------------- */

.home-hero {
    max-width: var(--wide-width);
    margin: 0 auto 40px;
    padding: 0 24px;
}
.home-hero-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    background:
        radial-gradient(1200px 400px at 100% -20%, color-mix(in srgb, var(--brand-communication) 22%, transparent), transparent 70%),
        linear-gradient(135deg, var(--brand-pressed), var(--brand-primary) 55%, var(--brand-communication));
    color: #fff;
    box-shadow: var(--shadow-8);
}
.home-hero-card h1 {
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin: 0 0 10px;
    max-width: 22ch;
}
.home-hero-card p {
    margin: 0;
    max-width: 60ch;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.92);
}
.home-hero-squares {
    position: absolute;
    top: 32px; right: 40px;
    opacity: 0.9;
}
@media (max-width: 720px) {
    .home-hero-squares { display: none; }
    .home-hero-card { padding: 32px 24px; }
}

/* --- Featured post ------------------------------------------------------- */

.featured-section { margin-bottom: 32px; }

.featured-card {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-4);
    transition: box-shadow 0.16s ease, border-color 0.16s ease;
}
.featured-card:hover { box-shadow: var(--shadow-16); border-color: var(--border-strong); }

.featured-card-image-link { display: block; overflow: hidden; background: var(--surface-alt); min-height: 240px; }
.featured-card-image { width: 100%; height: 100%; object-fit: cover; display: block; }

.featured-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 32px;
}
.featured-card-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.featured-card-title { font-size: clamp(1.4rem, 2.5vw, 2rem); margin: 0; letter-spacing: -0.01em; }
.featured-card-title a { color: var(--text); }
.featured-card-title a:hover { color: var(--accent); text-decoration: none; }
.featured-card-excerpt { margin: 0; color: var(--text-secondary); font-size: 1.02rem; line-height: 1.55; }

.featured-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-on-brand);
    background: var(--accent);
    border-radius: 999px;
}

@media (max-width: 760px) {
    .featured-card { grid-template-columns: 1fr; }
    .featured-card-image-link { min-height: 0; aspect-ratio: 16 / 9; }
    .featured-card-body { padding: 24px; }
}

/* --- Topic pillars ------------------------------------------------------- */

.topic-pillars {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}
.topic-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 9px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: var(--shadow-2);
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}
.topic-pill:hover { background: var(--surface-hover); border-color: var(--border-strong); text-decoration: none; transform: translateY(-1px); }
.topic-pill-name::before { content: "#"; color: var(--accent); opacity: 0.7; margin-right: 1px; }
.topic-pill-count { font-size: 0.78rem; color: var(--text-tertiary); font-weight: 600; }

/* --- Post feed (cards) --------------------------------------------------- */

.post-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-2);
    transition: box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}
.post-card:hover {
    box-shadow: var(--shadow-8);
    transform: translateY(-2px);
    border-color: var(--border-strong);
}

.post-card-image-link { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-alt); }
.post-card-image { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    gap: 10px;
}

.post-card-title { margin: 0; font-size: 1.2rem; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--accent); text-decoration: none; }

.post-card-excerpt {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin-top: auto;
}
.post-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* --- Tag pills ----------------------------------------------------------- */

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--accent);
    background: var(--brand-10);
    border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.12s ease;
}
.tag-pill:hover { background: var(--brand-20); text-decoration: none; }
.tag-pill::before { content: "#"; opacity: 0.6; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- Single post --------------------------------------------------------- */

.post {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* Two-column layout with a sticky table of contents (desktop, when JS adds .has-toc) */
.post-toc { display: none; }

@media (min-width: 1080px) {
    .post-wrap.has-toc {
        display: grid;
        grid-template-columns: minmax(0, var(--content-width)) 232px;
        gap: 44px;
        justify-content: center;
        align-items: start;
        max-width: none;
    }
    .post-wrap.has-toc > .post { margin: 0; max-width: none; }
    .post-wrap.has-toc .post-toc {
        display: block;
        position: sticky;
        top: 84px;
        max-height: calc(100vh - 108px);
        overflow-y: auto;
        font-size: 0.9rem;
    }
}

.post-toc-title {
    margin: 0 0 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.post-toc-list { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.post-toc-item a {
    display: block;
    padding: 4px 0 4px 14px;
    margin-left: -2px;
    border-left: 2px solid transparent;
    color: var(--text-secondary);
    line-height: 1.4;
    transition: color 0.12s ease, border-color 0.12s ease;
}
.post-toc-item a:hover { color: var(--text); text-decoration: none; }
.post-toc-item.is-h3 a { padding-left: 28px; font-size: 0.85rem; }
.post-toc-item a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

.post-header { margin-bottom: 28px; }

.post-tags { margin-bottom: 16px; }

.post-title {
    font-size: clamp(1.9rem, 4.5vw, 2.6rem);
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.92rem;
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }

.author-chip { display: inline-flex; align-items: center; gap: 8px; }
.author-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    object-fit: cover; background: var(--surface-hover);
}
.author-name { font-weight: 600; color: var(--text); }

.post-feature-image {
    margin: 0 0 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-4);
}
.post-feature-image img { width: 100%; display: block; }

/* --- Prose (post content) ------------------------------------------------ */

.post-content { font-size: 1.06rem; }

.post-content > * { margin-top: 0; margin-bottom: 1.4em; }
.post-content > *:last-child { margin-bottom: 0; }

.post-content h2 { font-size: 1.6rem; margin-top: 2em; margin-bottom: 0.6em; padding-bottom: 0.25em; border-bottom: 1px solid var(--border); }
.post-content h3 { font-size: 1.3rem; margin-top: 1.8em; margin-bottom: 0.5em; }
.post-content h4 { font-size: 1.1rem; margin-top: 1.6em; margin-bottom: 0.4em; }

.post-content a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content li { margin-bottom: 0.4em; }
.post-content li::marker { color: var(--accent); }

.post-content img { border-radius: var(--radius-md); box-shadow: var(--shadow-2); }
.post-content figure { margin: 2em 0; }
.post-content figcaption {
    margin-top: 0.6em; text-align: center;
    font-size: 0.85rem; color: var(--text-tertiary);
}

/* Koenig editor breakout widths — the post column is narrow (740px), so
   wide/full images escape it, centred on the page. */
.post-content .kg-width-wide {
    position: relative;
    width: min(1080px, 92vw);
    margin-left: 50%;
    transform: translateX(-50%);
}
.post-content .kg-width-full {
    position: relative;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}
.post-content .kg-width-full img { border-radius: 0; box-shadow: none; }

/* Blockquote / callout */
.post-content blockquote {
    margin: 1.6em 0;
    padding: 14px 20px;
    background: var(--brand-10);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-md);
    color: var(--text);
}
.post-content blockquote p:last-child { margin-bottom: 0; }

/* Inline + block code */
.post-content :not(pre) > code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.12em 0.4em;
    color: var(--text);
}

.post-content pre {
    position: relative;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.55;
    background: #1b1a19;
    color: #f3f2f1;
    border: 1px solid #3b3a39;
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.post-content pre code {
    font-family: inherit;
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Copy button injected by main.js */
.code-copy-btn {
    position: absolute;
    top: 8px; right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    color: #f3f2f1;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.14s ease, background 0.14s ease;
}
.post-content pre:hover .code-copy-btn { opacity: 1; }
.code-copy-btn:hover { background: rgba(255,255,255,0.16); }
.code-copy-btn.is-copied { color: var(--mark-green-dark); border-color: color-mix(in srgb, var(--mark-green-dark) 50%, transparent); }

/* Language label injected by main.js (top-left of each code block) */
.post-content pre { padding-top: 30px; }   /* room for the label */
.code-lang-label {
    position: absolute;
    top: 9px; left: 14px;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a8886;
    pointer-events: none;
    user-select: none;
}

/* Prism syntax tokens — VS Code "Dark+" tuned to the Microsoft palette.
   The <pre> is always dark (#1b1a19), so one palette covers light + dark. */
.post-content pre .token.comment,
.post-content pre .token.prolog,
.post-content pre .token.doctype,
.post-content pre .token.cdata { color: #7a7876; font-style: italic; }
.post-content pre .token.punctuation { color: #cfcfcf; }
.post-content pre .token.namespace { opacity: 0.7; }
.post-content pre .token.boolean,
.post-content pre .token.number,
.post-content pre .token.constant,
.post-content pre .token.symbol { color: #ffb900; }
.post-content pre .token.property,
.post-content pre .token.tag,
.post-content pre .token.deleted { color: #4fc3f7; }
.post-content pre .token.selector,
.post-content pre .token.attr-name,
.post-content pre .token.string,
.post-content pre .token.char,
.post-content pre .token.builtin,
.post-content pre .token.inserted { color: #a5d66f; }
.post-content pre .token.operator,
.post-content pre .token.entity,
.post-content pre .token.url { color: #d4d4d4; }
.post-content pre .token.atrule,
.post-content pre .token.attr-value,
.post-content pre .token.keyword { color: #4aa3f0; }
.post-content pre .token.function,
.post-content pre .token.class-name { color: #4ec9b0; }
.post-content pre .token.regex,
.post-content pre .token.important,
.post-content pre .token.variable { color: #ff9d6f; }
.post-content pre .token.important,
.post-content pre .token.bold { font-weight: 600; }
.post-content pre .token.italic { font-style: italic; }

/* Tables — Fluent DetailsList feel */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.post-content th, .post-content td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}
.post-content thead th {
    background: var(--surface-alt);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.post-content tbody tr:hover { background: var(--surface-hover); }
.post-content tbody tr:last-child td { border-bottom: 0; }

.post-content hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }

/* Table wrapper for horizontal scroll on mobile */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --- Post footer / tags / author bio ------------------------------------ */

.post-footer {
    max-width: var(--content-width);
    margin: 40px auto 0;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.author-bio {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-top: 24px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.author-bio .author-avatar { width: 48px; height: 48px; }
.author-bio h3 { margin: 0 0 4px; font-size: 1.05rem; }
.author-bio p { margin: 0; color: var(--text-secondary); font-size: 0.92rem; }

/* --- Page header (tag / author archives) -------------------------------- */

.archive-header {
    max-width: var(--content-width);
    margin: 0 auto 36px;
    text-align: center;
}
.archive-kicker {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 8px;
}
.archive-header h1 { font-size: 2.1rem; margin: 0 0 8px; }
.archive-header p { color: var(--text-secondary); margin: 0; }

/* --- Pagination ---------------------------------------------------------- */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 48px;
}
.pagination a, .pagination .page-number {
    padding: 9px 16px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 500;
}
.pagination a {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
    transition: background 0.12s ease, border-color 0.12s ease;
}
.pagination a:hover { background: var(--surface-hover); border-color: var(--border-strong); text-decoration: none; }
.pagination .page-number { color: var(--text-secondary); }

/* --- Buttons ------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.12s ease;
}
.btn-primary { background: var(--accent); color: var(--text-on-brand); }
.btn-primary:hover { background: var(--accent-hover); color: var(--text-on-brand); text-decoration: none; }

/* --- Error page ---------------------------------------------------------- */

.error-page {
    max-width: var(--content-width);
    margin: 60px auto;
    text-align: center;
}
.error-code {
    font-size: clamp(4rem, 14vw, 7rem);
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    letter-spacing: -0.04em;
}
.error-message { font-size: 1.4rem; margin: 8px 0 24px; }

/* --- Site footer --------------------------------------------------------- */

.site-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 24px;
    padding-bottom: 24px;
}
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--accent); }
.footer-nav { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }

/* --- Reduced motion ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
