:root {
    --bg: #f5f1e8;
    --surface: #fffdfa;
    --surface-strong: #fbf7ee;
    --ink: #172033;
    --muted: #58657d;
    --line: rgba(23, 32, 51, 0.12);
    --accent: #0f766e;
    --accent-strong: #0b5d57;
    --accent-soft: rgba(15, 118, 110, 0.12);
    --gold: #c9892b;
    --shadow: 0 24px 70px rgba(19, 26, 40, 0.08);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --container: 1240px;
}

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

html {
    font-size: 16px;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(201, 137, 43, 0.12), transparent 34%),
        linear-gradient(180deg, #f8f3e8 0%, #f4efe4 32%, #f8f7f2 100%);
    color: var(--ink);
    font-family: "Manrope", sans-serif;
    line-height: 1.6;
}

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

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(calc(100% - 2rem), var(--container));
    margin: 0 auto;
}

.site-main {
    padding-bottom: 5rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(248, 243, 232, 0.82);
    border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}

.site-header__inner,
.site-nav-wrap,
.footer-grid,
.hero-actions,
.hero-metrics,
.content-grid,
.article-grid,
.article-kickers,
.article-meta,
.post-card__meta,
.post-card__footer {
    display: flex;
    gap: 1rem;
}

.site-header__inner {
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.site-brand img,
.site-brand__mark {
    width: 3rem;
    height: 3rem;
    border-radius: 16px;
}

.site-brand__mark {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--gold));
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
}

.site-brand__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.site-brand__text strong {
    font-size: 1rem;
}

.site-brand__text small,
.gh-navigation a,
.footer-copy,
.post-card__meta,
.post-card__footer,
.article-meta,
.article-date,
.meta-list,
.sidebar-story__meta,
.pagination,
.archive-hero p,
.page-header p,
.hero-summary,
.section-heading p {
    color: var(--muted);
}

.gh-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    align-items: center;
}

.gh-navigation a {
    font-size: 0.95rem;
    font-weight: 600;
}

.gh-navigation .nav-current a,
.gh-navigation a:hover,
.feature-card h2 a:hover,
.post-card h3:hover,
.sidebar-story h4 a:hover {
    color: var(--accent);
}

.site-nav-wrap {
    align-items: center;
}

.header-cta,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.8rem 1.25rem;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-cta,
.button-primary {
    background: var(--ink);
    color: #fff;
}

.button-secondary {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.64);
}

.header-cta:hover,
.button:hover {
    transform: translateY(-1px);
}

.home-hero,
.category-rail,
.content-band,
.archive-listing,
.related-posts,
.page-shell {
    padding-top: 2rem;
}

.hero-grid,
.content-grid,
.article-grid {
    display: grid;
    gap: 1.5rem;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
    align-items: stretch;
}

.hero-copy,
.feature-card,
.category-card,
.post-card,
.sidebar-card,
.archive-hero__inner,
.page-container,
.article-header,
.article-body-wrap,
.article-sidebar .sidebar-card {
    background: rgba(255, 253, 250, 0.86);
    border: 1px solid rgba(23, 32, 51, 0.08);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: clamp(2rem, 4vw, 4rem);
    border-radius: 34px;
    position: relative;
    overflow: hidden;
}

.hero-copy::after {
    content: "";
    position: absolute;
    inset: auto -5% -20% auto;
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.2), transparent 68%);
}

.eyebrow,
.section-label,
.tag-pill,
.topic-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow,
.section-label {
    color: var(--accent);
}

.hero-copy h1,
.archive-hero h1,
.page-header h1,
.article-header h1 {
    margin: 0.65rem 0 1rem;
    font-family: "Source Serif 4", serif;
    line-height: 0.95;
    letter-spacing: -0.03em;
}

.hero-copy h1 {
    font-size: clamp(3.3rem, 7vw, 6rem);
    max-width: 11ch;
}

.hero-summary {
    max-width: 62ch;
    font-size: 1.05rem;
}

.hero-actions {
    flex-wrap: wrap;
    margin: 2rem 0;
}

.hero-metrics {
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.hero-metrics div {
    min-width: 10rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(23, 32, 51, 0.08);
}

.hero-metrics dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.hero-metrics dd {
    margin: 0.35rem 0 0;
    font-weight: 700;
}

.feature-card {
    border-radius: 34px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feature-card__topline,
.section-heading,
.sidebar-story,
.topic-pills,
.check-list,
.meta-list,
.pagination-wrap,
.page-header,
.archive-hero__inner,
.article-sidebar,
.article-content > * + *,
.page-content > * + *,
.kg-card + .kg-card {
    display: flex;
    flex-direction: column;
}

.feature-card__topline,
.article-kickers,
.article-meta,
.post-card__meta,
.post-card__footer {
    justify-content: space-between;
    flex-wrap: wrap;
}

.feature-card h2 {
    margin: 1.25rem 0 0.9rem;
    font-family: "Source Serif 4", serif;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.02;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
}

.tag-pill,
.topic-pill {
    width: fit-content;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.section-heading {
    gap: 0.35rem;
    margin-bottom: 1.5rem;
}

.section-heading h2,
.sidebar-card h3,
.page-header h1,
.archive-hero h1 {
    margin: 0.3rem 0 0;
    font-family: "Source Serif 4", serif;
}

.section-heading h2 {
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    line-height: 1.05;
}

.category-grid,
.post-card-grid {
    display: grid;
    gap: 1.1rem;
}

.category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card {
    padding: 1.15rem 1.2rem;
    border-radius: var(--radius-md);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.post-card:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 118, 110, 0.24);
}

.category-card__name {
    display: block;
    font-weight: 800;
}

.category-card__count {
    color: var(--muted);
    font-size: 0.92rem;
}

.content-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.7fr);
    align-items: start;
}

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

.post-card {
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.post-card__link {
    display: block;
    height: 100%;
}

.post-card__frame {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.18), rgba(201, 137, 43, 0.18));
}

.post-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card__image--placeholder {
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.18), rgba(201, 137, 43, 0.16)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent);
}

.post-card__body {
    padding: 1.25rem;
}

.post-card h3 {
    margin: 0.65rem 0 0.6rem;
    font-family: "Source Serif 4", serif;
    font-size: 1.5rem;
    line-height: 1.12;
}

.post-card p,
.sidebar-card p,
.page-header p,
.article-dek {
    margin: 0;
    color: var(--muted);
}

.sidebar-stack,
.article-sidebar {
    display: grid;
    gap: 1rem;
}

.sidebar-card {
    padding: 1.25rem;
    border-radius: 22px;
}

.sidebar-list,
.check-list,
.meta-list {
    margin-top: 1rem;
}

.sidebar-story + .sidebar-story,
.check-list li + li,
.meta-list li + li {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
}

.sidebar-story h4 {
    margin: 0.3rem 0 0;
    font-size: 1rem;
    line-height: 1.35;
}

.check-list,
.meta-list {
    margin-bottom: 0;
    padding-left: 1.1rem;
    color: var(--muted);
}

.pagination-wrap {
    align-items: center;
    margin-top: 2rem;
}

.pagination {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--line);
}

.archive-hero,
.article-shell {
    padding-top: 2rem;
}

.archive-hero__inner,
.page-container {
    padding: clamp(2rem, 4vw, 3rem);
    border-radius: 30px;
}

.archive-hero h1,
.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.article-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    grid-template-areas:
        "header sidebar"
        "body sidebar";
}

.article-header {
    grid-area: header;
    border-radius: 30px;
    padding: clamp(2rem, 4vw, 3rem);
}

.article-body-wrap {
    grid-area: body;
    border-radius: 30px;
    padding: clamp(1.25rem, 3vw, 2rem);
}

.article-sidebar {
    grid-area: sidebar;
    align-self: start;
    position: sticky;
    top: 6rem;
}

.article-header h1 {
    font-size: clamp(2.7rem, 5vw, 4.75rem);
    max-width: 14ch;
}

.article-dek {
    font-size: 1.08rem;
    max-width: 65ch;
}

.article-image {
    margin: 0 0 1.75rem;
}

.article-image img {
    border-radius: 22px;
}

.article-image figcaption {
    margin-top: 0.55rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.article-content,
.page-content {
    font-size: 1.06rem;
}

.article-content h2,
.article-content h3,
.article-content h4,
.page-content h2,
.page-content h3,
.page-content h4 {
    font-family: "Source Serif 4", serif;
    line-height: 1.15;
}

.article-content blockquote,
.page-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--accent);
    background: var(--surface-strong);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-content a,
.page-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.12em;
}

.article-content ul,
.article-content ol,
.page-content ul,
.page-content ol {
    padding-left: 1.2rem;
}

.topic-pills {
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-grid {
    justify-content: space-between;
    padding: 2rem 0 4rem;
    border-top: 1px solid rgba(23, 32, 51, 0.08);
    margin-top: 4rem;
}

.footer-grid > div {
    flex: 1 1 0;
}

.footer-nav .gh-navigation {
    margin-top: 0.8rem;
}

@media (max-width: 1100px) {
    .hero-grid,
    .content-grid,
    .article-grid,
    .category-grid,
    .post-card-grid {
        grid-template-columns: 1fr;
    }

    .article-grid {
        grid-template-areas:
            "header"
            "body"
            "sidebar";
    }

    .article-sidebar {
        position: static;
    }
}

@media (max-width: 780px) {
    .site-header {
        position: static;
    }

    .site-header__inner,
    .site-nav-wrap,
    .footer-grid {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-copy h1 {
        font-size: clamp(2.5rem, 14vw, 4rem);
    }

    .feature-card h2,
    .article-header h1 {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .header-cta,
    .button {
        width: 100%;
    }
}

/* ── Koenig editor required classes ── */
.kg-width-wide {
    margin-left: calc(50% - 50vw + 2rem);
    margin-right: calc(50% - 50vw + 2rem);
    max-width: calc(100vw - 4rem);
}

.kg-width-full {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
}
