﻿/* ============================================================
   BROADSHEET — a newspaper-style editorial theme for Hearth.
   Deep navy masthead, bright blue accent, condensed Ubuntu
   headlines over Noto Sans body. Reproduces the adriancs.com
   demo look on Hearth's template class vocabulary.
   ============================================================ */

:root {
    --navy: #1a1a2e; /* masthead / headings */
    --navy-2: #16213e; /* nav strip / hovers */
    --accent: #2a7ae2; /* link / action blue */
    --accent-ink: #1a5bb8;
    --accent-soft: #eaf2fd;
    --bg: #f5f5f5; /* page backdrop */
    --surface: #ffffff; /* content / cards */
    --surface-2: #f8f9fa; /* widgets, code, thumbs */
    --text: #333333;
    --muted: #555555;
    --faint: #999999;
    --border: #eeeeee;
    --border-2: #dddddd;
    --radius: 6px;
    --radius-sm: 4px;
    --shadow: 0 1px 2px rgba(20,20,40,.05), 0 6px 22px rgba(20,20,40,.07);
    --shadow-sm: 0 1px 2px rgba(20,20,40,.05);
    --serif: 'Ubuntu Condensed', 'Arial Narrow', sans-serif; /* display / headlines */
    --sans: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --label: 'Oswald', 'Noto Sans', sans-serif; /* uppercase meta labels */
    --mono: 'Consolas', 'Monaco', 'Courier New', monospace; /* code / markdown source */

    --container: 1200px;
    --narrow: 820px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .5px;
    color: var(--navy);
    margin: 0 0 .5em;
}

a {
    color: var(--accent);
    text-decoration: none;
}

    a:hover {
        color: var(--accent-ink);
    }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

p {
    margin: 0 0 1em;
}

::selection {
    background: var(--accent-soft);
    color: var(--accent-ink);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 3px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 16px;
}

.container-narrow {
    max-width: var(--narrow);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    background: var(--accent);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    z-index: 200;
}

    .skip-link:focus {
        left: 16px;
        color: #fff;
    }

/* ===== Masthead / nav ===== */
.site-header {
    background: var(--navy);
    color: #e0e0e0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 58px;
}

.site-brand {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 0 14px rgba(0,0,0,.6);
}

    .site-brand:hover {
        color: #fff;
    }

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

    .site-nav > a,
    .nav-parent {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 12px 18px;
        font-family: var(--sans);
        font-size: .82rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .8px;
        color: #c8c8d0;
        cursor: pointer;
        transition: background .2s, color .2s;
    }

        .site-nav > a:hover,
        .nav-parent:hover {
            background: var(--navy-2);
            color: #82b1ff;
        }

.nav-caret {
    font-size: .62rem;
    opacity: .6;
}

.nav-group {
    position: relative;
}

.nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: var(--navy-2);
    border-top: 2px solid var(--accent);
    box-shadow: var(--shadow);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .16s, transform .16s, visibility .16s;
    z-index: 50;
}

.nav-group:hover .nav-submenu,
.nav-group:focus-within .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-submenu a {
    display: block;
    padding: 10px 18px;
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #c8c8d0;
}

    .nav-submenu a:hover {
        background: var(--navy);
        color: #82b1ff;
    }

.nav-toggle {
    display: none;
    border: none;
    background: none;
    color: #e0e0e0;
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
    cursor: pointer;
}

.nav-overlay {
    display: none;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sans);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1;
    padding: 12px 26px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.btn-sm {
    padding: 9px 16px;
    font-size: .85rem;
}

.btn-primary {
    background: var(--navy);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--accent);
        color: #fff;
    }

.btn-ghost {
    background: transparent;
    color: var(--navy);
    border-color: var(--border-2);
}

    .btn-ghost:hover {
        background: var(--navy);
        color: #fff;
        border-color: var(--navy);
    }

/* ===== Content shell ===== */
.site-main {
    flex: 1 0 auto;
    background: var(--surface);
}

.section {
    padding: 40px 0;
}

.section-bordered {
    border-top: 1px solid var(--border);
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--navy);
}

    .section-heading h2 {
        font-size: 1.6rem;
        margin: 0;
        letter-spacing: 1px;
    }

.section-link {
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--accent);
}

/* ===== Hero ===== */
.hero {
    padding: 64px 0 48px;
    text-align: center;
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--label);
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--navy);
    margin: 14px auto 14px;
    max-width: 18ch;
}

.hero-sub {
    font-size: 1.12rem;
    color: var(--muted);
    max-width: 60ch;
    margin: 0 auto 28px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Features ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.feature {
    text-align: left;
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.feature h3 {
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.feature p {
    color: var(--muted);
    margin: 0;
    font-size: .96rem;
}

/* ===== Home post grid (category-card style, vertical) ===== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: transform .25s, box-shadow .25s;
}

    .post-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow);
    }

.post-card-inner {
    display: block;
    padding: 22px;
    color: inherit;
}

    .post-card-inner:hover {
        color: inherit;
    }

.post-card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    letter-spacing: .5px;
}

.post-card:hover .post-card-title {
    color: var(--accent);
}

.post-card-excerpt {
    color: var(--muted);
    font-size: .92rem;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--label);
    font-size: .76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--faint);
}

/* ===== List pages (latest / category / search) ===== */
.list-intro {
    padding-top: 40px;
}

.list-head {
    margin-bottom: 24px;
}

    .list-head h1 {
        font-size: clamp(1.9rem, 4.5vw, 2.6rem);
        margin: 0;
        letter-spacing: 1px;
    }

.list-sub {
    color: var(--muted);
    font-size: 1.05rem;
    margin: 8px 0 0;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 2px solid var(--border-2);
    border-radius: var(--radius-sm);
    padding: 4px 14px;
    margin-bottom: 26px;
    transition: border-color .2s;
}

    .search-bar:focus-within {
        border-color: var(--accent);
    }

.search-ico {
    color: var(--faint);
}

.search-input {
    flex: 1;
    border: 0;
    background: transparent;
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--text);
    padding: 9px 0;
}

    .search-input:focus {
        outline: none;
    }

.search-meta {
    font-size: .92rem;
    color: var(--muted);
    margin: 0 0 20px;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px dashed var(--border-2);
    border-radius: var(--radius-sm);
    padding: 46px 24px;
}

/* ===== Row list — adriancs horizontal article cards ===== */
.row-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.row-post {
    border-bottom: 1px solid var(--border);
}

    .row-post:last-child {
        border-bottom: none;
    }

.row-link {
    display: flex;
    align-items: stretch;
    gap: 20px;
    padding: 26px 0;
    color: inherit;
}

    .row-link:hover {
        color: inherit;
    }

.row-thumb {
    flex: 0 0 240px;
    width: 240px;
    height: 150px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
    transition: transform .3s;
}

    .row-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.row-post:hover .row-thumb {
    transform: scale(1.03);
}

.row-thumb.is-empty {
    background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 10px, #eef0f2 10px, #eef0f2 20px);
}

.row-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.row-title {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: .5px;
    color: var(--navy);
    order: 2;
}

.row-post:hover .row-title {
    color: var(--accent);
}

.row-excerpt {
    color: var(--muted);
    font-size: .92rem;
    order: 3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.row-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--label);
    font-size: .74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--faint);
    order: 1;
}

.row-date, .row-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.row-cat {
    color: var(--navy);
}

    .row-cat a {
        color: var(--navy);
    }

        .row-cat a:hover {
            color: var(--accent);
        }

.row-arrow {
    display: none;
}

/* ===== Category sections (categories-latest-post) ===== */
.cat-section {
    padding: 36px 0 44px;
}

    .cat-section + .cat-section {
        border-top: 1px solid var(--border);
    }

.cat-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--navy);
}

    .cat-head h2 {
        font-size: 1.55rem;
        margin: 0;
        letter-spacing: 1px;
    }

        .cat-head h2 a {
            color: var(--navy);
        }

            .cat-head h2 a:hover {
                color: var(--accent);
            }

.cat-all {
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--accent);
}

.cat-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 26px;
    align-items: start;
}

.cat-feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}

    .cat-feature:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow);
    }

.cat-feature-link {
    display: block;
    color: inherit;
}

    .cat-feature-link:hover {
        color: inherit;
    }

.cat-feature-img {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-2);
}

    .cat-feature-img img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .cat-feature-img.is-empty {
        background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 11px, #eef0f2 11px, #eef0f2 22px);
    }

.cat-feature-title {
    font-size: 1.3rem;
    margin: 16px 18px 8px;
    letter-spacing: .5px;
}

.cat-feature:hover .cat-feature-title {
    color: var(--accent);
}

.cat-feature-excerpt {
    color: var(--muted);
    font-size: .92rem;
    margin: 0 18px 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-feature-meta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--label);
    font-size: .74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--faint);
    margin: 0 18px 18px;
}

.cat-mini {
    display: flex;
    flex-direction: column;
}

.mini-link {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: inherit;
}

.cat-mini .mini-link:first-child {
    padding-top: 0;
}

.mini-link:hover {
    color: inherit;
}

.mini-thumb {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
}

    .mini-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .mini-thumb.is-empty {
        background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 7px, #eef0f2 7px, #eef0f2 14px);
    }

.mini-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mini-title {
    font-family: var(--serif);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--navy);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mini-link:hover .mini-title {
    color: var(--accent);
}

.mini-date {
    font-family: var(--label);
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--faint);
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 14px;
}

    .breadcrumbs a {
        color: var(--muted);
    }

        .breadcrumbs a:hover {
            color: var(--accent);
        }

    .breadcrumbs .sep {
        color: var(--faint);
    }

    .breadcrumbs .crumb-current {
        color: var(--navy);
        font-weight: 600;
    }

/* ===== Article (doc) ===== */
.doc {
    padding: 40px 0 56px;
}

.doc-header {
    margin-bottom: 26px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

    .doc-header h1 {
        font-size: clamp(1.9rem, 5vw, 2.6rem);
        letter-spacing: 1px;
        color: var(--navy);
        margin: 0;
    }

.doc-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    margin-top: 14px;
}

.doc-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--label);
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--navy);
}

.doc-meta-update, .doc-meta-author {
    color: var(--faint);
}

.content-cover-image {
    margin-bottom: 30px;
}

    .content-cover-image img,
    .doc-cover {
        width: 100%;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border);
    }

.doc-cover {
    margin-bottom: 30px;
}

.layout-split .doc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: start;
}

.layout-split.no-aside .doc-grid {
    grid-template-columns: minmax(0, 1fr);
}

.layout-stack .doc-content {
    max-width: var(--narrow);
    margin-inline: auto;
}

/* ===== Aside (keep reading) — sidebar widget ===== */
.doc-aside {
    position: sticky;
    top: 20px;
    bottom: 20px;
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 20px;
}

.layout-stack .doc-aside {
    margin-top: 40px;
    max-width: var(--narrow);
    margin-inline: auto;
    position: static;
}

.aside-heading {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--navy);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.reclist {
    display: flex;
    flex-direction: column;
}

.rec-item {
    border-bottom: 1px solid var(--border);
}

    .rec-item:last-child {
        border-bottom: none;
    }

.rec-link {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    color: inherit;
}

    .rec-link:hover {
        color: inherit;
    }

.rec-thumb {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
}

    .rec-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.rec-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rec-title {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--navy);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rec-item:hover .rec-title {
    color: var(--accent);
}

.rec-date {
    font-family: var(--label);
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--faint);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ===== Prose (rendered article body) ===== */
.prose {
    font-size: 1.02rem;
    line-height: 1.8;
    color: #444;
}

    .prose > *:first-child {
        margin-top: 0;
    }

    .prose h1, .prose h2, .prose h3, .prose h4 {
        margin: 1.6em 0 .5em;
        color: var(--navy);
        letter-spacing: .5px;
    }

    .prose h2 {
        font-size: 1.6rem;
    }

    .prose h3 {
        font-size: 1.3rem;
    }

    .prose p {
        margin: 0 0 1.1em;
    }

    .prose a {
        color: var(--accent);
        text-decoration: underline;
    }

        .prose a:hover {
            color: var(--accent-ink);
        }

    .prose ul, .prose ol {
        margin: 0 0 1.1em;
        padding-left: 1.6em;
    }

    .prose li {
        margin: .35em 0;
    }

    .prose img {
        border-radius: var(--radius-sm);
        margin: 1.4em auto;
    }

    .prose blockquote {
        margin: 1.4em 0;
        padding: 12px 20px;
        border-left: 4px solid var(--accent);
        background: var(--surface-2);
        color: var(--muted);
        font-style: italic;
    }

        .prose blockquote p {
            margin: 0;
        }

    .prose code {
        font-family: var(--mono);
        font-size: .9em;
        background: #f0f0f0;
        padding: 2px 6px;
        border-radius: 3px;
    }

    .prose pre {
        margin: 1.5em 0;
        border-radius: var(--radius);
        overflow-x: auto;
    }

        .prose pre code {
            display: block;
            padding: 18px 22px;
            background: #1e1e2e;
            color: #cdd6f4;
            line-height: 1.6;
            border-radius: var(--radius);
            font-size: .9rem;
        }

    .prose hr {
        border: 0;
        border-top: 1px solid var(--border-2);
        margin: 2.2em 0;
    }

    .prose table {
        width: 100%;
        border-collapse: collapse;
        margin: 1.5em 0;
        font-size: .95rem;
    }

    .prose th, .prose td {
        border: 1px solid var(--border-2);
        padding: 10px 14px;
        text-align: left;
    }

    .prose th {
        background: var(--surface-2);
        font-weight: 700;
    }

    .prose tr:nth-child(even) {
        background: #fafafa;
    }

/* ===== Footer ===== */
.site-footer {
    flex-shrink: 0;
    background: var(--navy);
    color: #999;
    padding: 26px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-meta {
    color: #888;
    font-size: .88rem;
}

.footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

    .footer-links a {
        color: #c8c8d0;
        font-size: .88rem;
        font-weight: 500;
    }

        .footer-links a:hover {
            color: #82b1ff;
        }

.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    padding-bottom: 24px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

    .footer-cols:empty {
        display: none;
    }

.footer-col {
    color: #b8b8c4;
    font-size: .9rem;
    line-height: 1.7;
}

    .footer-col > *:first-child {
        margin-top: 0;
    }

    .footer-col > *:last-child {
        margin-bottom: 0;
    }

    .footer-col h1, .footer-col h2, .footer-col h3, .footer-col h4 {
        font-family: var(--label);
        font-size: .78rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #fff;
        margin: 0 0 12px;
    }

    .footer-col a {
        color: #c8c8d0;
    }

        .footer-col a:hover {
            color: #82b1ff;
        }

    .footer-col ul, .footer-col ol {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .footer-col li {
        margin: 0 0 8px;
    }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (min-width: 1400px) {

    .content-cover-image {
        position: relative;
        width: 930px;
        left: -100px;
        height: auto;
    }

        .content-cover-image img {
            width: 100%;
            height: 100%;
        }
}

@media (min-width: 1550px) {

    .content-cover-image {
        position: relative;
        width: 1030px;
        left: -200px;
        height: auto;
    }

        .content-cover-image img {
            width: 100%;
            height: 100%;
        }
}

@media (max-width: 960px) {
    .post-grid, .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cat-feature {
        grid-column: 1 / -1;
    }

    .layout-split .doc-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .doc-aside {
        position: static;
    }
}

@media (max-width: 680px) {
    .section {
        padding: 30px 0;
    }

    .hero {
        padding: 48px 0 36px;
    }

    /* mobile sidebar nav */
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        position: fixed;
        top: 0;
        left: -290px;
        width: 280px;
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--navy-2);
        z-index: 1000;
        overflow-y: auto;
        padding-top: 60px;
        transition: left .3s ease;
    }

        .site-nav.is-open {
            left: 0;
        }

        .site-nav > a, .nav-parent {
            width: 100%;
            padding: 14px 24px;
            border-bottom: 1px solid rgba(255,255,255,.05);
        }

    .nav-group {
        width: 100%;
    }

    .nav-submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: 0;
        background: var(--navy);
        padding: 0;
    }

        .nav-submenu a {
            padding-left: 38px;
        }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s;
        z-index: 999;
    }

        .nav-overlay.is-open {
            opacity: 1;
            visibility: visible;
        }

    .post-grid, .features-grid, .cat-grid {
        grid-template-columns: 1fr;
    }

    .content-cover-image {
        position: relative;
        width: 100vw;
        left: -16px;
        height: auto;
        border-radius: 0;
    }

        .content-cover-image img {
            width: 100%;
            height: 100%;
        }

        .content-cover-image img, .doc-cover {
            border-radius: 0;
        }

    /* horizontal cards stack on mobile */
    .row-link {
        flex-direction: column;
    }

    .row-thumb {
        flex: none;
        width: 100%;
        height: 200px;
    }

    .footer-inner {
        flex-direction: column;
    }
}


.site-logo-img {
    height: 2rem;
    width: auto;
    display: block;
}


/* ============================================================
   Markdown source toggle — View Content / View Markdown
   ============================================================ */
.md-toolbar {
    display: flex;
    gap: 8px;
    margin: 0 0 18px;
}

    .md-toolbar button {
        font-family: var(--label);
        font-size: .78rem;
        text-transform: uppercase;
        letter-spacing: .04em;
        padding: 7px 16px;
        color: var(--navy);
        background: var(--surface-2);
        border: 1px solid var(--border-2);
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: background .12s, color .12s, border-color .12s;
    }

        .md-toolbar button:hover {
            background: var(--accent-soft);
            border-color: var(--accent);
            color: var(--accent-ink);
        }

#post_markdown textarea {
    width: 100%;
    height: 75vh;
    font-family: var(--mono);
    font-size: .9rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    padding: 18px 22px;
    resize: vertical;
}

/* ===== Pagination (paged latest-post listing) ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin: 2.5rem 0 .5rem;
    font-family: var(--label);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .85rem;
}

.pagination-pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem;
}

.pagination-prev,
.pagination-next,
.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    min-width: 2.4em;
    height: 2.4em;
    padding: 0 .85em;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--muted);
    text-decoration: none;
    line-height: 1;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

    .pagination-prev:hover,
    .pagination-next:hover,
    .pagination-page:hover {
        color: var(--accent);
        border-color: var(--accent);
    }

    .pagination-page.is-active {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
    }

    .pagination-prev.is-disabled,
    .pagination-next.is-disabled {
        opacity: .45;
        pointer-events: none;
    }

.pagination-gap {
    padding: 0 .25em;
    color: var(--faint);
}
