:root {
    --color-page: #f7f4ef;
    --color-surface: #ffffff;
    --color-ink: #171717;
    --color-muted: #66615a;
    --color-line: #ded8cf;
    --color-blue: #275d8c;
    --color-green: #31735f;
    --color-red: #a6443c;
    --color-gold: #b9822b;
    --shadow-soft: 0 16px 40px rgba(28, 24, 18, 0.08);
    --radius: 8px;
    --max-width: 1180px;
    --font-body: var(--gh-font-body, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    --font-heading: var(--gh-font-heading, Georgia, "Times New Roman", serif);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--color-page);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 16px;
    letter-spacing: 0;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        linear-gradient(90deg, rgba(39, 93, 140, 0.06) 0 1px, transparent 1px 100%),
        var(--color-page);
    background-size: 72px 72px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    width: 100%;
    height: auto;
}

.site-shell {
    min-height: 100vh;
}

.section-wrap {
    width: min(var(--max-width), calc(100% - 40px));
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 20;
    padding: 10px 14px;
    background: var(--color-ink);
    color: #fff;
}

.skip-link:focus {
    top: 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--color-line);
    background: rgba(247, 244, 239, 0.94);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 28px;
    width: min(var(--max-width), calc(100% - 40px));
    margin: 0 auto;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
}

.brand img {
    max-width: 180px;
    max-height: 42px;
    object-fit: contain;
}

.site-navigation {
    justify-self: end;
}

.site-navigation .nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-navigation .nav a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--color-muted);
    font-size: 0.93rem;
    font-weight: 700;
}

.site-navigation .nav a:hover,
.site-navigation .nav-current a {
    background: var(--color-ink);
    color: #fff;
}

.nav-toggle {
    display: none;
    justify-self: end;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 9px 12px;
    background: var(--color-surface);
    color: var(--color-ink);
    font-weight: 800;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 28px;
    align-items: stretch;
    padding: 54px 0 28px;
}

.home-hero__intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 4px solid var(--color-red);
    border-bottom: 1px solid var(--color-line);
    padding: 30px 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--color-red);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.05;
    letter-spacing: 0;
}

h1 {
    font-size: 3.4rem;
}

h2 {
    font-size: 2.1rem;
}

h3 {
    font-size: 1.3rem;
}

.hero-summary,
.archive-header p,
.article-excerpt {
    max-width: 680px;
    margin: 18px 0 0;
    color: var(--color-muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

.hero-card,
.post-card,
.topic-card {
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    min-height: 410px;
}

.hero-card__media,
.post-card__media {
    position: relative;
    min-height: 260px;
    background: #d7ded8;
    overflow: hidden;
}

.hero-card__media img,
.post-card__media img {
    height: 100%;
    min-height: inherit;
    object-fit: cover;
}

.hero-card__body,
.post-card__body {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 24px;
}

.hero-card__body {
    justify-content: center;
}

.hero-card__body p,
.post-card__body p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.65;
}

.topic-pill {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    border: 1px solid rgba(49, 115, 95, 0.35);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--color-green);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--color-muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.image-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: inherit;
    background:
        linear-gradient(135deg, rgba(39, 93, 140, 0.2), transparent 42%),
        linear-gradient(45deg, rgba(166, 68, 60, 0.18), transparent 46%),
        #d8d1c7;
    color: var(--color-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.topic-rail,
.latest-section,
.related-section {
    padding: 38px 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    border-top: 1px solid var(--color-line);
    padding-top: 20px;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.topic-card {
    display: flex;
    min-height: 108px;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    box-shadow: none;
}

.topic-card:nth-child(2n) {
    border-top: 4px solid var(--color-blue);
}

.topic-card:nth-child(2n + 1) {
    border-top: 4px solid var(--color-gold);
}

.topic-card span {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.12rem;
    font-weight: 700;
}

.topic-card strong {
    color: var(--color-muted);
    font-size: 0.82rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.post-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.post-card__media {
    aspect-ratio: 16 / 10;
    min-height: 0;
}

.post-card__body {
    flex: 1;
}

.post-card__body h3 a:hover,
.hero-card__body h2 a:hover {
    color: var(--color-blue);
}

.post-grid--compact .post-card__media {
    aspect-ratio: 16 / 9;
}

.archive-header {
    padding: 54px 0 30px;
    border-bottom: 1px solid var(--color-line);
}

.archive-header h1,
.article-header h1 {
    max-width: 900px;
}

.article {
    padding: 54px 0 28px;
}

.article-header {
    max-width: 960px;
    margin: 0 auto 28px;
}

.article-image {
    max-width: 960px;
    margin: 0 auto 34px;
}

.article-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.article-image figcaption {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.article-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 720px);
    gap: 40px;
    justify-content: center;
}

.article-sidebar {
    position: sticky;
    top: 102px;
    align-self: start;
    border-top: 3px solid var(--color-blue);
    padding-top: 14px;
}

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

.tag-list a {
    border: 1px solid var(--color-line);
    border-radius: 999px;
    padding: 7px 10px;
    background: var(--color-surface);
    color: var(--color-muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.gh-content {
    color: #25221f;
    font-family: var(--font-heading);
    font-size: 1.13rem;
    line-height: 1.78;
}

.gh-content > * {
    margin-top: 0;
    margin-bottom: 1.25em;
}

.gh-content h2,
.gh-content h3 {
    margin-top: 1.7em;
}

.gh-content a {
    color: var(--color-blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.gh-content blockquote {
    margin-left: 0;
    border-left: 4px solid var(--color-gold);
    padding-left: 18px;
    color: var(--color-muted);
}

.gh-content img {
    border-radius: var(--radius);
}

.gh-content .kg-width-wide {
    width: min(980px, calc(100vw - 40px));
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

.gh-content .kg-width-full {
    width: 100vw;
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

.gh-content .kg-width-full img {
    border-radius: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 32px 0 0;
    color: var(--color-muted);
    font-weight: 800;
}

.site-footer {
    margin-top: 38px;
    border-top: 1px solid var(--color-line);
    background: #201d1a;
    color: #f8f2e9;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    width: min(var(--max-width), calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0;
}

.footer-inner p {
    margin: 8px 0 0;
    color: #cfc6ba;
}

.footer-nav .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-nav a {
    color: #f8f2e9;
    font-weight: 800;
}

.copyright {
    grid-column: 1 / -1;
    font-size: 0.86rem;
}

@media (max-width: 980px) {
    h1 {
        font-size: 2.55rem;
    }

    .home-hero,
    .hero-card {
        grid-template-columns: 1fr;
    }

    .topic-grid,
    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .article-sidebar {
        position: static;
        max-width: 720px;
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 720px) {
    .section-wrap,
    .header-inner,
    .footer-inner {
        width: min(100% - 28px, var(--max-width));
    }

    .header-inner {
        grid-template-columns: 1fr auto;
        gap: 12px;
        min-height: 64px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-navigation {
        display: none;
        grid-column: 1 / -1;
        justify-self: stretch;
        padding-bottom: 14px;
    }

    .site-navigation.is-open {
        display: block;
    }

    .site-navigation .nav {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: start;
    }

    .site-navigation .nav a {
        border: 1px solid var(--color-line);
        background: var(--color-surface);
    }

    .home-hero {
        padding-top: 34px;
    }

    h1 {
        font-size: 2.1rem;
    }

    h2 {
        font-size: 1.65rem;
    }

    .topic-grid,
    .post-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-card__body,
    .post-card__body {
        padding: 20px;
    }

    .section-heading {
        display: block;
    }

    .gh-content {
        font-size: 1.04rem;
    }
}
