/* ─────────────────────────────────────────────────────────────────────── */
/* ARTICLE CONTAINER & LAYOUT                                               */
/* ─────────────────────────────────────────────────────────────────────── */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

/* ─────────────────────────────────────────────────────────────────────── */
/* BREADCRUMBS                                                              */
/* ─────────────────────────────────────────────────────────────────────── */

.breadcrumbs {
    margin: 0 0 1.5rem 0;
    padding: 0;
}

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

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb-link {
    color: var(--color-primary-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--color-primary-text);
    text-decoration: underline;
}

.breadcrumb-current {
    color: var(--color-text-dim);
}

.breadcrumb-separator {
    color: var(--color-text-muted);
    opacity: 0.6;
}

/* ─────────────────────────────────────────────────────────────────────── */
/* TABLE OF CONTENTS                                                        */
/* Rendered into the layout sidebar as .nav-item.toc-link and styled there  */
/* (layouts/article.php). The old in-page TOC card is no longer rendered,   */
/* so its styles were removed. Active state comes from .nav-item.active.     */
/* ─────────────────────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────────── */
/* ARTICLE MAIN CONTENT                                                     */
/* ─────────────────────────────────────────────────────────────────────── */

.article-main {
    flex: 1;
}

.article-content {
    /* A gentle reading panel: a touch off the page background — lighter in
       dark mode, darker in light mode — never stark black or white. The
       neutral tint adapts to either theme without a hard border. */
    background: rgba(127, 140, 170, 0.05);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    /* Cap the reading measure (~70 chars); add the padding back on top so the
       text column stays ~70ch. Related grids / prev-next sit outside and stay
       full width. */
    max-width: calc(70ch + 5rem);
    padding: 2.25rem 2.5rem;
}

.article-header {
    margin-bottom: 2rem;
}

.article-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.01em;
}

.article-body {
    color: var(--color-text);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    color: var(--color-text);
    margin: 2.25rem 0 0.75rem;
    font-weight: 700;
    /* Keep anchored headings clear of the sticky top bar (56px) on jump. */
    scroll-margin-top: 80px;
}

/* Extra breathing room above each section so it reads as its own section
   rather than rolling on from the previous one. */
.article-body h2 { font-size: 1.5rem;  margin-top: 2.75rem; }
.article-body h3 { font-size: 1.25rem; margin-top: 2.25rem; }
.article-body h4 { font-size: 1.1rem;  margin-top: 1.75rem; }

/* The first heading shouldn't push a gap at the very top of the body. */
.article-body > :first-child { margin-top: 0; }

.article-body p {
    margin: 0 0 1rem;
}

.article-body a {
    color: var(--color-primary-text);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.article-body a:hover {
    color: #4338ca;
}

.article-body code {
    background: var(--color-surface);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9em;
    color: var(--color-text);
}

.article-body pre {
    background: var(--color-surface);
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--color-border);
}

.article-body pre code {
    background: none;
    padding: 0;
    color: var(--color-text);
}

.article-body ul,
.article-body ol {
    margin: 1rem 0 1rem 1.5rem;
    padding: 0;
}

.article-body li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.article-body blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: var(--color-surface);
    color: var(--color-text-dim);
    font-style: italic;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.article-body th,
.article-body td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.article-body th {
    background: var(--color-surface);
    font-weight: 600;
}

.article-body img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: var(--radius);
}

/* ─────────────────────────────────────────────────────────────────────── */
/* SOURCES BOX                                                              */
/* The trailing Sources/References section is wrapped (in the controller)   */
/* in <aside class="article-sources"> so it reads as its own box: a touch   */
/* lighter than the panel in dark mode, a touch darker in light mode.       */
/* ─────────────────────────────────────────────────────────────────────── */

.article-sources {
    margin-top: 3rem;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .article-sources {
    background: rgba(0, 0, 0, 0.04);
}

.article-sources > h2:first-child {
    margin-top: 0;
    font-size: 1.2rem;
}

.article-sources ol,
.article-sources ul {
    margin: 0.75rem 0 0 1.25rem;
}

.article-sources li {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    line-height: 1.6;
}

.article-sources li + li {
    margin-top: 0.5rem;
}

.article-sources a {
    word-break: break-word;
}

/* ─────────────────────────────────────────────────────────────────────── */
/* SHARE BUTTONS                                                            */
/* ─────────────────────────────────────────────────────────────────────── */

.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.share-label {
    font-weight: 500;
    color: var(--color-text-dim);
    font-size: 0.9rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-primary-text);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary-text);
    background: var(--color-primary-dim);
}

.share-btn.linkedin:hover {
    color: #0A66C2;
    border-color: #0A66C2;
}

.share-btn.reddit:hover {
    color: #FF4500;
    border-color: #FF4500;
}

.share-btn.twitter:hover {
    color: #000000;
    border-color: #000000;
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

.article-card--featured {
    border-color: var(--color-primary-text);
}

/* ─────────────────────────────────────────────────────────────────────── */
/* PREV / NEXT NAVIGATION                                                   */
/* ─────────────────────────────────────────────────────────────────────── */

.article-prevnext {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--color-border);
}

.prevnext-btn {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.prevnext-btn:hover {
    border-color: var(--color-primary-text);
    background: var(--color-primary-dim);
}

.prevnext-next {
    text-align: right;
}

.prevnext-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary-text);
}

.prevnext-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.3;
}

/* ─────────────────────────────────────────────────────────────────────── */
/* CATEGORY SECTIONS (Recent, Popular, Featured, Other)                    */
/* ─────────────────────────────────────────────────────────────────────── */

.category-section {
    margin: 3rem 0;
    padding: 0;
}

.category-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 1.5rem;
    text-transform: capitalize;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.article-card-link {
    text-decoration: none;
    color: inherit;
}

.article-card {
    padding: 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-color: var(--color-primary-text);
}

.article-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
}

.article-card:hover .article-card-title {
    color: var(--color-primary-text);
}

.article-card-description {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

.article-card-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: auto;
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-link {
    padding: 0.75rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-link:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary-text);
}


/* ─────────────────────────────────────────────────────────────────────── */
/* RESPONSIVE DESIGN                                                        */
/* ─────────────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .toc-sidebar {
        position: relative;
        top: auto;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 1.5rem;
    }

    .article-content {
        /* Trim panel padding on phones so it doesn't compound with the
           layout/container padding and squeeze the text column. */
        padding: 1.25rem 1.1rem;
    }

    .article-body {
        font-size: 0.95rem;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-prevnext {
        grid-template-columns: 1fr;
    }

    .prevnext-next {
        text-align: left;
    }

    .share-buttons {
        flex-wrap: wrap;
    }
}

/* ── AI Knowledgebase widget ──────────────────────────────────────────── */
/* Themed via comptrio tokens so it follows light/dark. The force-graph nodes
   are intentionally NOT themed — their fills are the light OKLCH branch colours,
   so node text stays a fixed dark for contrast on any theme. */
.kb-widget {
    margin: 3rem 0 2rem;
    padding: 2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.kb-widget h3,
.kb-topics h3,
.kb-explainer h3 {
    color: var(--color-primary-text);
    margin: 0 auto 1.25rem;
    text-align: center;
}
.kb-explainer h3 { text-align: left; margin-bottom: 1rem; }

.kb-controls { margin-bottom: 0.75rem; text-align: center; }
.kb-controls button {
    margin: 0 0.5rem 0.25rem 0;
    padding: 8px 16px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.kb-controls button:hover { filter: brightness(1.1); }
.kb-search { display: inline-block; }
.kb-search input {
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    width: 200px;
    background: var(--color-surface-alt);
    color: var(--color-text);
}
.kb-info { margin-bottom: 0.75rem; color: var(--color-text-dim); text-align: center; font-size: 0.9rem; }

#kb-viz { width: 100%; text-align: center; }
#kb-viz svg {
    max-width: 100%;
    height: auto;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.kb-node { cursor: pointer; }
.kb-node text { font-size: 14px; text-anchor: middle; pointer-events: none; fill: #1f2430; }
.kb-link { stroke: var(--color-text-dim); stroke-opacity: 0.7; stroke-width: 2px; }
.kb-node-circle.highlighted { stroke: var(--color-warning) !important; stroke-width: 3px !important; }
.kb-link.connected { stroke: var(--color-warning) !important; stroke-width: 3px !important; stroke-opacity: 1 !important; }

.kb-explainer {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.kb-principles { list-style: none; padding-left: 0; margin: 1.25rem 0; }
.kb-principles li { padding: 0.4rem 0 0.4rem 1.75rem; position: relative; line-height: 1.6; }
.kb-principles li::before {
    content: "→";
    position: absolute;
    left: 0;
    top: 0.4rem;
    color: var(--color-primary-text);
    font-weight: bold;
}

.kb-topics {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.kb-article-list { display: none; }
.kb-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.kb-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kb-card:hover { transform: translateY(-2px); }
.kb-card-title {
    color: var(--color-primary-text);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}
.kb-card-title-link { color: var(--color-primary-text); text-decoration: none; }
.kb-card-title-link:hover { text-decoration: underline; }
.kb-card-list { list-style: none; margin: 0; padding: 0; }
.kb-card-link {
    display: block;
    padding: 0.45rem 0 0.45rem 0.75rem;
    margin-left: -0.75rem;
    border-left: 3px solid transparent;
    color: var(--color-text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
}
.kb-card-link:hover {
    color: var(--color-primary-text);
    border-left-color: var(--color-primary-text);
    background: var(--color-primary-dim);
}

@media (max-width: 767px) {
    .kb-cards-grid { grid-template-columns: 1fr; gap: 1rem; }
    .kb-widget, .kb-explainer, .kb-topics { padding: 1rem; }
    .kb-search input { width: 140px; }
}
        /* Metric-matched local fallback: keeps layout stable while Google Fonts load async */
        @font-face {
            font-family: 'Inter Fallback';
            src: local('Arial');
            size-adjust: 105.78%;
            ascent-override: 91.58%;
            descent-override: 22.8%;
            line-gap-override: 0%;
        }

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

        /* ── Dark theme (default) ── */
        :root,
        [data-theme="dark"] {
            --color-bg:          #0f1117;
            --color-surface:     #1a1d27;
            --color-surface-alt: #20232f;
            --color-border:      #2a2d3a;
            --color-primary:     #6164f1;
            --color-primary-text: #7a7df3;
            --color-primary-dim: rgba(99,102,241,0.15);
            --color-text:        #e2e4ed;
            --color-text-dim:    #85899c;
            --color-text-muted:  #8488a5;
            --color-success:     #22c55e;
            --color-warning:     #f59e0b;
            --color-danger:      #ef4444;
            --color-info:        #3b82f6;
            --shadow-sm:         0 1px 3px rgba(0,0,0,0.5);
            --font: 'Inter', 'Inter Fallback', system-ui, sans-serif;
            --radius: 8px;
        }

        /* ── Light theme ── */
        [data-theme="light"] {
            --color-bg:          #f1f3f8;
            --color-surface:     #ffffff;
            --color-surface-alt: #f8f9fc;
            --color-border:      #dde1ed;
            --color-primary:     #4f46e5;
            --color-primary-dim: rgba(79,70,229,0.08);
            --color-text:        #1a1c2e;
            --color-text-dim:    #6b7080;
            --color-text-muted:  #b8bccf;
            --color-success:     #16a34a;
            --color-warning:     #d97706;
            --color-danger:      #dc2626;
            --color-info:        #2563eb;
            --shadow-sm:         0 1px 4px rgba(0,0,0,0.08);
        }

        /* ── Global transitions for theme switching ── */
        *, *::before, *::after {
            transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
        }
        /* Don't animate things that shouldn't transition */
        svg, svg *, .status-dot { transition: none; }

        html, body {
            height: 100%;
            background: var(--color-bg);
            color: var(--color-text);
            font-family: var(--font);
            font-size: 15px;
            line-height: 1.6;
        }

        /* ── Layout shell (two-column with sidebar) ── */
        .shell {
            display: grid;
            grid-template-columns: 280px 1fr;
            grid-template-rows: 56px 1fr auto;
            min-height: 100vh;
        }

        /* ── Top bar ── */
        .topbar {
            grid-column: 1 / -1;
            display: flex;
            align-items: center;
            padding: 0 1.5rem;
            background: var(--color-surface);
            border-bottom: 1px solid var(--color-border);
            gap: 0.75rem;
            box-shadow: var(--shadow-sm);
            /* Stay pinned so the sticky sidebar tucks neatly beneath it. */
            position: sticky;
            top: 0;
            z-index: 20;
        }

        .topbar-logo {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 700;
            font-size: 1rem;
            color: var(--color-primary-text);
            text-decoration: none;
            letter-spacing: -0.01em;
        }

        .topbar-logo svg { width: 22px; height: 22px; }

        .topbar-divider {
            width: 1px;
            height: 24px;
            background: var(--color-border);
            margin: 0 0.25rem;
        }

        .topbar-title {
            font-size: 0.9rem;
            color: var(--color-text-dim);
        }

        .topbar-spacer { flex: 1; }

        /* ── Theme toggle ── */
        .theme-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 6px;
            border: 1px solid var(--color-border);
            background: transparent;
            color: var(--color-text-dim);
            cursor: pointer;
            margin-left: 0.75rem;
            flex-shrink: 0;
        }

        .theme-toggle:hover {
            background: var(--color-primary-dim);
            color: var(--color-primary-text);
            border-color: var(--color-primary-text);
        }

        .theme-toggle svg { width: 15px; height: 15px; }

        [data-theme="dark"]  .icon-sun  { display: block; }
        [data-theme="dark"]  .icon-moon { display: none;  }
        [data-theme="light"] .icon-sun  { display: none;  }
        [data-theme="light"] .icon-moon { display: block; }

        /* ── Sidebar (TOC/Navigation) ── */
        .sidebar {
            background: var(--color-surface);
            border-right: 1px solid var(--color-border);
            padding: 1rem 0;
            /* Pin the nav (incl. the TOC) so it stays in view — and its
               scroll-spy highlight stays visible — as the article scrolls.
               align-self:start stops the grid item from stretching, which
               is what lets position:sticky take effect. */
            position: sticky;
            top: 56px;
            align-self: start;
            height: calc(100vh - 56px);
            overflow-y: auto;
        }

        .nav-section {
            padding: 0.5rem 0;
        }

        .nav-section:not(:first-child) {
            border-top: 1px solid var(--color-border);
            margin-top: 0.75rem;
            padding-top: 0.75rem;
        }

        .nav-section-label {
            padding: 0.5rem 1rem;
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--color-text-muted);
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.65rem 1rem;
            color: var(--color-text-dim);
            text-decoration: none;
            font-size: 0.9rem;
            transition: all 0.2s ease;
        }

        .nav-item:hover {
            background: var(--color-surface-alt);
            color: var(--color-text);
        }

        .nav-item.active {
            background: var(--color-primary-dim);
            color: var(--color-primary-text);
            border-left: 3px solid var(--color-primary);
            padding-left: calc(1rem - 3px);
        }

        .nav-item svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
            opacity: 0.8;
        }

        /* ── Main content ── */
        .main-content {
            overflow-y: auto;
            padding: 2rem;
            background: var(--color-bg);
        }

        /* ── Responsive: hide sidebar on small screens ── */
        @media (max-width: 1024px) {
            .shell {
                grid-template-columns: 1fr;
            }
            .sidebar {
                display: none;
            }
        }

        /* ── Footer ──
           Spans both shell columns so the background is full-width, but the
           inner content sits in col 2 only — leaving col 1 as background-only
           space behind the sticky sidebar (same surface color, seamless). */
        .footer {
            grid-column: 1 / -1;
            grid-row: 3;
            display: grid;
            grid-template-columns: 280px 1fr;
            background: var(--color-surface);
            border-top: 1px solid var(--color-border);
            color: var(--color-text-dim);
            font-size: 0.85rem;
        }

        .footer-inner {
            grid-column: 2;
            max-width: 1100px;
            margin: 0 auto;
            padding: 3rem 2rem 1.5rem;
            display: grid;
            grid-template-columns: 1.6fr 1fr 1fr;
            gap: 2.5rem;
        }

        .footer-brand-logo {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 700;
            font-size: 1rem;
            color: var(--color-primary-text);
            text-decoration: none;
            letter-spacing: -0.01em;
        }

        .footer-brand-logo svg { width: 20px; height: 20px; }

        .footer-tagline {
            margin-top: 0.85rem;
            max-width: 300px;
            line-height: 1.65;
            color: var(--color-text-dim);
        }

        .footer-col h3 {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.62rem;
            font-weight: 500;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--color-text-dim);
            margin-bottom: 1.1rem;
        }

        .footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
        .footer-col a { color: var(--color-text-dim); text-decoration: none; transition: color 0.15s ease; }
        .footer-col a:hover { color: var(--color-primary-text); }

        .footer-bottom {
            grid-column: 2;
            max-width: 1100px;
            margin: 0 auto;
            padding: 1.25rem 2rem;
            border-top: 1px solid var(--color-border);
            text-align: center;
            color: var(--color-text-muted);
            font-size: 0.8rem;
        }

        @media (max-width: 1024px) {
            /* Sidebar is hidden at this breakpoint, so the footer no longer
               needs to leave the 280px gutter. */
            .footer { grid-template-columns: 1fr; }
            .footer-inner, .footer-bottom { grid-column: 1; }
        }

        @media (max-width: 768px) {
            .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
        }
