/* ==========================================================================
   Evergreen — SamaDesign
   1. Tokens   2. Base   3. Shared bits   4. Header & navigation
   5. Hero & featured panel   6. Journal timeline   7. Places   8. People
   9. Ideas   10. Covers & chips (tag, author)   11. Photo mosaic
   12. Article   13. Content (Koenig)   14. Cards & related   15. Newsletter
   16. Footer   17. Misc (pagination, error, motion)
   ========================================================================== */

/* 1. Tokens
   ========================================================================== */

:root {
    /* Fixed palette */
    --eg-forest: #173f35;
    --eg-moss: #56745f;
    --eg-cream: #f5f1e8;
    --eg-sage: #d9e2d5;
    --eg-night: #17201c;

    /* Cream scheme (default) */
    --eg-bg: var(--eg-cream);
    --eg-bg-2: #ece6d8;
    --eg-ink: var(--eg-night);
    --eg-muted: rgb(23 32 28 / 0.7);
    --eg-line: rgb(23 32 28 / 0.14);
    --eg-accent: var(--eg-forest);      /* links, title hovers */
    --eg-label-ink: var(--eg-moss);     /* small capitals, thread */
    --eg-btn-bg: var(--eg-forest);
    --eg-btn-ink: var(--eg-cream);
    --eg-band: var(--eg-sage);          /* Ideas band */
    --eg-band-ink: var(--eg-forest);
    --eg-band-label: #3d5845;
    --eg-band-line: rgb(23 63 53 / 0.25);

    --eg-font-display: var(--gh-font-heading, "Libre Caslon Display", Georgia, serif);
    --eg-font-serif: "Libre Caslon Text", Georgia, serif;
    --eg-font-body: var(--gh-font-body, "Jost", system-ui, -apple-system, "Segoe UI", sans-serif);

    --eg-gutter: 20px;
    --eg-wide: 1240px;
    --eg-content: 700px;
    --eg-head-h: 72px;
    --eg-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

    color-scheme: light;
}

/* Forest night (dark scheme) */
:root[data-scheme="dark"] {
    --eg-bg: #141c18;
    --eg-bg-2: #1b2520;
    --eg-ink: #ece7db;
    --eg-muted: rgb(236 231 219 / 0.7);
    --eg-line: rgb(236 231 219 / 0.15);
    --eg-accent: #a8c8b2;
    --eg-label-ink: #93b39d;
    --eg-btn-bg: var(--eg-sage);
    --eg-btn-ink: var(--eg-night);
    --eg-band: #1f2b25;
    --eg-band-ink: #ece7db;
    --eg-band-label: #93b39d;
    --eg-band-line: rgb(236 231 219 / 0.16);

    color-scheme: dark;
}

@media (min-width: 760px) {
    :root { --eg-gutter: 48px; --eg-head-h: 80px; }
}

/* 2. Base
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--eg-head-h) + 24px);
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--eg-bg);
    color: var(--eg-ink);
    font-family: var(--eg-font-body);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Libre Caslon Display has a single weight: never ask for bold */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--eg-font-display);
    font-weight: 400;
    line-height: 1.08;
}

p, blockquote, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
img, video, svg { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

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

.eg-skip {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 200;
    padding: 10px 16px;
    background: var(--eg-forest);
    color: var(--eg-cream);
}

.eg-skip:focus { top: 12px; }

.eg-site { display: flex; flex-direction: column; min-height: 100vh; }
.eg-main { flex-grow: 1; padding-top: var(--eg-head-h); }
/* Pages that open on a photo (hero, post, cover) slide under the transparent header */
.eg-main:has(.eg-overlay) { padding-top: 0; }

.eg-container {
    width: 100%;
    max-width: calc(var(--eg-wide) + 2 * var(--eg-gutter));
    margin-inline: auto;
    padding-inline: var(--eg-gutter);
}

.eg-narrow {
    width: 100%;
    max-width: calc(var(--eg-content) + 2 * var(--eg-gutter));
    margin-inline: auto;
    padding-inline: var(--eg-gutter);
}

/* 3. Shared bits
   ========================================================================== */

.eg-label {
    display: inline-block;
    color: var(--eg-label-ink);
    font-family: var(--eg-font-body);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

/* Tag label: only the first tag is shown */
.eg-tag-label:empty { display: none; }
.eg-tag-label a + a { display: none; }
.eg-tag-label a:hover { color: var(--eg-ink); }

.eg-standfirst {
    color: var(--eg-muted);
    font-family: var(--eg-font-serif);
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.7;
}

.eg-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    color: var(--eg-muted);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.eg-meta > * { white-space: nowrap; }
.eg-meta > * + *::before { content: "·"; margin-inline: 9px; }
.eg-meta-author:hover { color: var(--eg-accent); }

.eg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 24px;
    border: 1px solid var(--eg-btn-bg);
    background: var(--eg-btn-bg);
    color: var(--eg-btn-ink);
    font-family: var(--eg-font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.eg-btn:hover { background: transparent; color: var(--eg-accent); border-color: var(--eg-accent); }
.eg-btn-line { background: transparent; color: var(--eg-accent); border-color: var(--eg-accent); }
.eg-btn-line:hover { background: var(--eg-btn-bg); border-color: var(--eg-btn-bg); color: var(--eg-btn-ink); }

.eg-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 2px;
    border-bottom: 1px solid currentColor;
    color: var(--eg-accent);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.eg-link .eg-icon { width: 15px; height: 15px; transition: transform 0.3s var(--eg-ease); }
.eg-link:hover .eg-icon { transform: translateX(4px); }

.eg-center { display: flex; justify-content: center; padding-top: 24px; }

.eg-icon { flex-shrink: 0; }

.eg-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.25s ease;
}

.eg-icon-btn:hover { border-color: currentColor; }
.eg-icon-btn .eg-icon { width: 18px; height: 18px; }

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

/* Photo frame with a slow zoom on hover */
.eg-media { position: relative; display: block; overflow: hidden; background: var(--eg-bg-2); }
.eg-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--eg-ease); }

.eg-lock {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    background: var(--eg-cream);
    color: var(--eg-forest);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eg-lock .eg-icon { width: 12px; height: 12px; }

.eg-chip {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
    min-height: 40px;
    padding: 6px 16px;
    border: 1px solid var(--eg-line);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.eg-chip:hover { border-color: var(--eg-label-ink); color: var(--eg-accent); }
.eg-chip.nav-current { border-color: var(--eg-btn-bg); background: var(--eg-btn-bg); color: var(--eg-btn-ink); }

/* Section headings: label, then a large Caslon title */
.eg-section { padding: 0 var(--eg-gutter) 140px; }

.eg-section-head {
    max-width: var(--eg-wide);
    margin: 0 auto 56px;
    text-align: center;
}

.eg-section-title { margin-top: 14px; font-size: clamp(2.4rem, 5vw, 3.8rem); text-wrap: balance; }

.eg-section-head-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    text-align: left;
}

/* 4. Header & navigation
   ========================================================================== */

.eg-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    color: var(--eg-ink);
    background: var(--eg-bg);
    box-shadow: 0 1px 0 var(--eg-line);
    transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

/* Transparent over the opening photo, until main.js marks it solid (needs JS to come back) */
.eg-js body:not(.eg-nav-open) .eg-site:has(.eg-overlay) .eg-header:not(.is-solid) {
    background: transparent;
    box-shadow: none;
    color: var(--eg-cream);
    text-shadow: 0 1px 14px rgb(0 0 0 / 0.25);
}

/* Menu open: always solid */
.eg-js body.eg-nav-open .eg-header {
    background: var(--eg-bg);
    color: var(--eg-ink);
    text-shadow: none;
}

.eg-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    min-height: var(--eg-head-h);
    padding-inline: var(--eg-gutter);
}

.eg-brand { justify-self: start; display: inline-flex; align-items: center; min-width: 0; max-width: 100%; }

.eg-wordmark {
    display: block;
    overflow: hidden;
    font-family: var(--eg-font-body);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eg-logo { width: auto; max-height: 40px; }

.eg-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.eg-menu > li { position: relative; }

.eg-menu a,
.eg-sub-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 0;
    border: 0;
    border-bottom: 1px solid transparent;
    background: none;
    font-size: 0.88rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.eg-menu > li > a:hover,
.eg-menu > .is-current > a,
.eg-menu > .is-current > .eg-sub-toggle,
.eg-sub-toggle:hover { border-bottom-color: currentColor; }

.eg-sub-toggle::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.eg-sub-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }

.eg-submenu { margin: 0; padding: 8px 0; list-style: none; }
.eg-nav-members { display: none; }

.eg-tools { justify-self: end; display: flex; align-items: center; gap: 6px; }
.eg-tools-cta { min-height: 38px; margin-left: 8px; padding: 0 18px; border-color: currentColor; color: inherit; }
.eg-tools-cta:hover { background: var(--eg-btn-bg); border-color: var(--eg-btn-bg); color: var(--eg-btn-ink); }
body:not(.eg-nav-open) .eg-site:has(.eg-overlay) .eg-header:not(.is-solid) .eg-tools-cta:hover { background: var(--eg-cream); border-color: var(--eg-cream); color: var(--eg-forest); text-shadow: none; }

.eg-burger { display: none; flex-direction: column; gap: 6px; }
.eg-burger span { display: block; width: 20px; height: 1.5px; background: currentColor; transition: transform 0.2s ease; }
.eg-burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.eg-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (min-width: 1100px) {
    .eg-submenu {
        position: absolute;
        top: calc(100% + 14px);
        left: -20px;
        min-width: 220px;
        border-top: 1px solid var(--eg-label-ink);
        background: var(--eg-bg);
        color: var(--eg-ink);
        text-shadow: none;
        box-shadow: 0 24px 48px rgb(23 32 28 / 0.14);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-4px);
        transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    }

    .eg-submenu.is-open { opacity: 1; visibility: visible; transform: none; }
    .eg-submenu a { display: flex; width: 100%; padding: 9px 20px; border: 0; }
    .eg-submenu a:hover { color: var(--eg-accent); background: var(--eg-bg-2); }
}

@media (max-width: 1099px) {
    .eg-bar { grid-template-columns: minmax(0, 1fr) auto; }
    .eg-brand { grid-column: 1; grid-row: 1; }
    .eg-tools { grid-column: 2; grid-row: 1; }
    .eg-burger { display: inline-flex; }

    .eg-nav {
        position: fixed;
        inset: 0;
        z-index: 1;
        padding: calc(var(--eg-head-h) + 24px) var(--eg-gutter) 40px;
        overflow-y: auto;
        background: var(--eg-bg);
        color: var(--eg-ink);
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.25s ease, visibility 0.25s;
    }

    /* The fixed menu opens behind the brand and the tools, so the burger stays usable to close it */
    .eg-brand, .eg-tools { position: relative; z-index: 2; }
    .eg-nav.is-open { visibility: visible; opacity: 1; }
    .eg-menu { flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--eg-line); }
    .eg-menu > li { border-bottom: 1px solid var(--eg-line); }

    .eg-menu a,
    .eg-sub-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 14px 0;
        border: 0;
        font-family: var(--eg-font-display);
        font-size: 2rem;
        letter-spacing: 0;
        line-height: 1.15;
    }

    .eg-menu > .is-current > a { color: var(--eg-label-ink); }
    .eg-submenu { display: none; padding: 0 0 14px 16px; }
    .eg-submenu.is-open { display: block; }
    .eg-submenu a { padding: 7px 0; font-size: 1.35rem; }
    .eg-nav-members { display: flex; gap: 10px; margin-top: 32px; }
    .eg-nav-members .eg-btn { flex: 1; }
    body.eg-nav-open { overflow: hidden; }
}

@media (max-width: 599px) {
    .eg-tools-cta { display: none; }
    .eg-wordmark { font-size: 0.9rem; letter-spacing: 0.3em; }
    .eg-tools { gap: 0; }
}

/* 5. Hero & featured panel
   ========================================================================== */

.eg-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 88vh;
    min-height: 88svh;
    padding: calc(var(--eg-head-h) + 60px) var(--eg-gutter) 96px;
    overflow: hidden;
    background: var(--eg-forest);
    color: var(--eg-cream);
}

.eg-hero:has(+ .eg-featured-wrap) { padding-bottom: 190px; }

.eg-hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Veil: darker at the top (header) and at the bottom (statement) for contrast */
.eg-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgb(23 32 28 / 0.5) 0%, rgb(23 32 28 / 0.08) 30%, rgb(23 32 28 / 0.12) 50%, rgb(23 32 28 / 0.66) 100%);
}

.eg-hero-copy { position: relative; z-index: 2; width: 100%; max-width: var(--eg-wide); margin: 0 auto; text-shadow: 0 1px 24px rgb(0 0 0 / 0.25); }
.eg-hero .eg-label { color: var(--eg-sage); }

.eg-hero-title {
    max-width: 880px;
    margin: 18px 0 20px;
    font-size: clamp(3.1rem, 8.5vw, 7.6rem);
    line-height: 0.98;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.eg-hero-text { max-width: 460px; font-family: var(--eg-font-serif); font-size: 1.15rem; font-style: italic; line-height: 1.55; }

.eg-hero-credit {
    position: absolute;
    right: var(--eg-gutter);
    bottom: 18px;
    z-index: 2;
    font-size: 0.72rem;
    opacity: 0.85;
}

.eg-hero:has(+ .eg-featured-wrap) .eg-hero-credit { top: calc(var(--eg-head-h) + 12px); bottom: auto; }

/* Featured story panel overlapping the bottom of the photo */
.eg-featured-wrap {
    position: relative;
    z-index: 3;
    max-width: calc(var(--eg-wide) + 2 * var(--eg-gutter));
    margin: 0 auto;
    padding: 40px var(--eg-gutter) 0;
}

.eg-hero + .eg-featured-wrap { margin-top: -150px; padding-top: 0; }

.eg-featured {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    width: min(780px, 100%);
    margin-left: auto;
    padding: 28px;
    background: var(--eg-bg);
    color: var(--eg-ink);
}

[data-scheme="dark"] .eg-featured { background: var(--eg-bg-2); }
.eg-featured:not(:has(.eg-featured-media)) { grid-template-columns: minmax(0, 1fr); }
.eg-featured-media img { aspect-ratio: 4 / 5; }
.eg-featured:hover .eg-featured-media img { transform: scale(1.04); }
.eg-featured-body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; min-width: 0; }
.eg-featured-title { font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: 1.1; }
.eg-featured-title a:hover { color: var(--eg-accent); }

@media (max-width: 759px) {
    .eg-hero { padding-bottom: 72px; }
    .eg-hero:has(+ .eg-featured-wrap) { padding-bottom: 120px; }
    .eg-hero + .eg-featured-wrap { margin-top: -80px; }
    .eg-featured { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px; }
    .eg-featured-media img { aspect-ratio: 3 / 2; }
}

/* 6. Journal timeline
   ========================================================================== */

.eg-journal { position: relative; padding: 140px var(--eg-gutter) 120px; }
.eg-section-journal .eg-section-head { margin-bottom: 150px; }
.eg-archive { padding-top: 96px; }
.eg-chips + .eg-archive { padding-top: 130px; }
.eg-main > .eg-archive:first-child { padding-top: 72px; }
.eg-archive .eg-section-head { margin-bottom: 150px; }

.eg-feed { position: relative; }

/* The thread: a thin moss line linking the entries */
.eg-feed::before {
    content: "";
    position: absolute;
    top: -90px;
    bottom: 40px;
    left: 50%;
    width: 1px;
    background: var(--eg-label-ink);
    opacity: 0.4;
}

.eg-entry {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 28px;
    align-items: center;
    max-width: var(--eg-wide);
    margin: 0 auto 150px;
}

.eg-entry > * { min-width: 0; }
.eg-feed > .eg-entry:last-child { margin-bottom: 64px; }

/* The date sits on the thread, on a cream patch */
.eg-date {
    position: absolute;
    top: -84px;
    left: 50%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    background: var(--eg-bg);
    color: var(--eg-label-ink);
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.eg-date b { color: var(--eg-ink); font-family: var(--eg-font-display); font-size: 1.9rem; font-weight: 400; line-height: 1; letter-spacing: 0; }
.eg-date span { margin-right: -0.24em; }

.eg-entry-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.eg-entry-title { margin: 14px 0 16px; font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.06; text-wrap: balance; }
.eg-entry-title a:hover { color: var(--eg-accent); }
.eg-entry .eg-standfirst { margin-bottom: 18px; }
.eg-entry:hover .eg-entry-media img { transform: scale(1.03); }

/* Left: landscape image left, text right */
.eg-entry-left .eg-entry-media { grid-column: 1 / span 7; aspect-ratio: 4 / 3; }
.eg-entry-left .eg-entry-copy { grid-column: 9 / span 4; }

/* Right: text left (aligned on the thread), portrait image right */
.eg-entry-right .eg-entry-copy { grid-column: 1 / span 5; grid-row: 1; align-items: flex-end; text-align: right; }
.eg-entry-right .eg-entry-media { grid-column: 7 / span 5; aspect-ratio: 4 / 5; }

/* Center (and entries without an image): centered text above a wide image */
.eg-entry-center,
.eg-entry.no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 840px;
    text-align: center;
}

.eg-entry-center .eg-entry-copy,
.eg-entry.no-image .eg-entry-copy { order: -1; align-items: center; padding: 12px 24px; background: var(--eg-bg); }
.eg-entry-center .eg-entry-media { width: 100%; margin-top: 12px; aspect-ratio: 16 / 9; }

/* Full: full-bleed image, text in two columns underneath */
.eg-entry-full:not(.no-image) { display: block; max-width: none; margin-inline: calc(-1 * var(--eg-gutter)); }
.eg-entry-full .eg-entry-media { height: 78vh; min-height: 420px; max-height: 860px; }

.eg-entry-full:not(.no-image) .eg-entry-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 56px;
    align-items: end;
    max-width: calc(var(--eg-wide) + 2 * var(--eg-gutter));
    margin: 0 auto;
    padding: 40px var(--eg-gutter) 0;
    background: var(--eg-bg);
}

.eg-entry-full .eg-entry-copy .eg-tag-label { grid-column: 1 / -1; }
.eg-entry-full .eg-entry-title { grid-column: 1; grid-row: 2; font-size: clamp(2.6rem, 5vw, 4.4rem); margin-bottom: 0; }
.eg-entry-full .eg-standfirst { grid-column: 2; grid-row: 2; margin-bottom: 8px; }
.eg-entry-full .eg-meta { grid-column: 2; grid-row: 3; }

@media (max-width: 999px) {
    .eg-journal { padding-top: 96px; }
    .eg-section-journal .eg-section-head,
    .eg-archive .eg-section-head { margin-bottom: 96px; }
    .eg-chips + .eg-archive { padding-top: 96px; }

    /* The thread moves to the left edge */
    .eg-feed::before { top: -60px; left: 0; }

    .eg-entry,
    .eg-entry-center,
    .eg-entry.no-image {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 22px;
        max-width: none;
        margin-bottom: 110px;
        padding-left: 26px;
        text-align: left;
    }

    .eg-date {
        top: -54px;
        left: 0;
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
        padding: 4px 10px 4px 22px;
        transform: none;
    }

    /* A small dot on the thread */
    .eg-date::before {
        content: "";
        position: absolute;
        top: 50%;
        left: -4px;
        width: 9px;
        height: 9px;
        border: 1px solid var(--eg-label-ink);
        border-radius: 50%;
        background: var(--eg-bg);
        transform: translateY(-50%);
    }

    .eg-date b { font-size: 1.6rem; }
    .eg-entry-copy,
    .eg-entry-center .eg-entry-copy,
    .eg-entry.no-image .eg-entry-copy,
    .eg-entry-right .eg-entry-copy { order: 2; align-items: flex-start; padding: 0; text-align: left; background: none; }
    .eg-entry-center .eg-entry-media { margin-top: 0; }
    .eg-entry-right .eg-entry-media { aspect-ratio: 4 / 5; max-height: 70vh; }
    .eg-entry-title { margin: 10px 0 12px; }

    .eg-entry-full:not(.no-image) { padding-left: 0; }
    .eg-entry-full .eg-date { left: var(--eg-gutter); top: -54px; }
    .eg-entry-full .eg-entry-media { height: 60vh; min-height: 320px; }
    .eg-entry-full:not(.no-image) .eg-entry-copy { display: flex; flex-direction: column; align-items: flex-start; padding: 0 var(--eg-gutter) 0 calc(var(--eg-gutter) + 26px); }
    .eg-entry-full .eg-entry-title { margin-bottom: 12px; }
}

/* 7. Places
   ========================================================================== */

.eg-places-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    max-width: var(--eg-wide);
    height: min(86vh, 860px);
    margin: 0 auto;
}

.eg-place { position: relative; min-width: 0; overflow: hidden; background: var(--eg-forest); color: var(--eg-cream); }
.eg-place-tall { grid-row: span 2; }
.eg-places-grid:has(> .eg-place:only-child) { grid-template-columns: minmax(0, 1fr); }
.eg-place-tall:nth-last-child(2) { grid-row: auto; }
.eg-places-grid:has(> .eg-place:nth-child(2):last-child) { grid-template-rows: minmax(0, 1fr); height: min(70vh, 640px); }
.eg-place img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--eg-ease); }
.eg-place:hover img { transform: scale(1.04); }
.eg-place::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgb(23 32 28 / 0.78)); pointer-events: none; }

.eg-place-copy { position: absolute; left: 26px; right: 26px; bottom: 24px; z-index: 1; text-shadow: 0 1px 16px rgb(0 0 0 / 0.3); }
.eg-place .eg-label { position: relative; z-index: 2; margin-bottom: 8px; color: var(--eg-sage); }
.eg-place-title { font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.15; text-wrap: balance; }
/* The whole tile is clickable */
.eg-place-title a::after { content: ""; position: absolute; inset: -100vh -100vw; }
.eg-place-title a { position: static; }
.eg-place-copy { position: absolute; }
.eg-place:has(a:focus-visible) { outline: 2px solid var(--eg-ink); outline-offset: 3px; }
.eg-place-title a:focus-visible { outline: none; }

@media (max-width: 999px) {
    .eg-places-grid,
    .eg-places-grid:has(> .eg-place:nth-child(2):last-child) { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; height: auto; }
    .eg-place { aspect-ratio: 4 / 3; }
    .eg-place-tall { grid-row: auto; aspect-ratio: 4 / 5; }
}

/* 8. People
   ========================================================================== */

.eg-people-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    max-width: var(--eg-wide);
    margin: 0 auto;
}

.eg-person { min-width: 0; }
.eg-people-row .eg-person:nth-child(2) { margin-top: 80px; }
.eg-person-media { aspect-ratio: 4 / 5; }
.eg-person-media img { filter: saturate(0.85); transition: transform 1.4s var(--eg-ease), filter 0.6s ease; }
.eg-person:hover .eg-person-media img { filter: none; transform: scale(1.03); }
.eg-person-name { margin-top: 22px; font-size: 1.9rem; }
.eg-person-name a:hover { color: var(--eg-accent); }
.eg-person-role { margin-top: 6px; color: var(--eg-label-ink); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; }
.eg-person-quote { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--eg-line); font-family: var(--eg-font-serif); font-size: 1.05rem; font-style: italic; line-height: 1.6; }

@media (max-width: 999px) {
    .eg-people-row { grid-template-columns: minmax(0, 1fr); gap: 56px; max-width: 560px; }
    .eg-people-row .eg-person:nth-child(2) { margin-top: 0; }
}

/* 9. Ideas (text only, on a sage band)
   ========================================================================== */

.eg-ideas {
    --eg-label-ink: var(--eg-band-label);
    --eg-accent: var(--eg-band-ink);
    margin-bottom: 0;
    padding: 110px var(--eg-gutter) 110px;
    background: var(--eg-band);
    color: var(--eg-band-ink);
}

.eg-ideas-list {
    max-width: 980px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--eg-band-line);
    counter-reset: idea;
}

.eg-ideas-list li { border-bottom: 1px solid var(--eg-band-line); counter-increment: idea; }

.eg-idea {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: baseline;
    padding: 28px 0;
    transition: padding-left 0.4s var(--eg-ease);
}

.eg-idea::before { content: counter(idea, upper-roman); grid-row: span 2; color: var(--eg-band-label); font-family: var(--eg-font-serif); font-size: 1.4rem; font-style: italic; }
.eg-idea:hover { padding-left: 14px; }
.eg-idea-title { font-family: var(--eg-font-display); font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.1; }
.eg-idea-meta { margin-top: 8px; color: var(--eg-band-label); font-size: 0.85rem; }
.eg-ideas .eg-center { padding-top: 40px; }

@media (max-width: 599px) {
    .eg-idea { grid-template-columns: 54px minmax(0, 1fr); padding: 22px 0; }
}

/* 10. Covers & chips (tag and author pages)
   ========================================================================== */

.eg-cover {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 72vh;
    min-height: 72svh;
    padding: calc(var(--eg-head-h) + 48px) var(--eg-gutter) 64px;
    overflow: hidden;
    background: var(--eg-forest);
    color: var(--eg-cream);
    isolation: isolate;
}

.eg-cover:not(.has-image) { min-height: 56vh; }
.eg-cover-image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }

.eg-cover.has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgb(23 32 28 / 0.55) 0%, rgb(23 32 28 / 0.1) 40%, rgb(23 32 28 / 0.7) 100%);
}

/* No image: the name as a large outlined watermark */
.eg-cover-watermark {
    position: absolute;
    right: -0.04em;
    top: 50%;
    z-index: -1;
    color: transparent;
    font-family: var(--eg-font-display);
    font-size: clamp(8rem, 24vw, 22rem);
    line-height: 1;
    white-space: nowrap;
    -webkit-text-stroke: 1px rgb(217 226 213 / 0.3);
    transform: translateY(-50%);
    pointer-events: none;
    user-select: none;
}

.eg-cover-copy { width: 100%; max-width: var(--eg-wide); margin: 0 auto; text-shadow: 0 1px 24px rgb(0 0 0 / 0.25); }
.eg-cover:not(.has-image) .eg-cover-copy { text-shadow: none; }
.eg-cover .eg-label { color: var(--eg-sage); }
.eg-cover-title { margin: 14px 0 12px; font-size: clamp(3.2rem, 9vw, 8rem); line-height: 0.98; overflow-wrap: anywhere; }
.eg-cover-author .eg-cover-title { font-size: clamp(2.8rem, 7vw, 6rem); }
.eg-cover-text { max-width: 520px; font-family: var(--eg-font-serif); font-size: 1.15rem; font-style: italic; line-height: 1.55; }
.eg-cover-avatar { width: 96px; height: 96px; margin-bottom: 22px; border: 1px solid var(--eg-sage); border-radius: 50%; object-fit: cover; }
.eg-cover-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.eg-cover-links:empty { display: none; }
.eg-cover-website { padding-bottom: 2px; border-bottom: 1px solid currentColor; margin-right: 10px; font-size: 0.9rem; }

.eg-cover-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgb(245 241 232 / 0.4);
}

.eg-cover-social:hover { border-color: var(--eg-cream); }
.eg-cover-social .eg-icon { width: 16px; height: 16px; }

.eg-chips {
    display: flex;
    gap: 10px;
    max-width: calc(var(--eg-wide) + 2 * var(--eg-gutter));
    margin: 0 auto;
    padding: 28px var(--eg-gutter) 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}

.eg-chips::-webkit-scrollbar { display: none; }
.eg-chip-author { padding-left: 6px; }
.eg-chip-author img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

/* 11. Photo mosaic (photography tag page)
   ========================================================================== */

.eg-visual { padding: 48px var(--eg-gutter) 140px; }

.eg-mosaic {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 260px;
    grid-auto-flow: dense;
    gap: 14px;
    max-width: var(--eg-wide);
    margin: 0 auto;
}

/* Pattern of 8 (one page): wide, tall, -, wide, -, -, wide, - fills three rows of four */
.eg-tile:nth-child(8n + 1),
.eg-tile:nth-child(8n + 4),
.eg-tile:nth-child(8n + 7) { grid-column: span 2; }
.eg-tile:nth-child(8n + 2) { grid-row: span 2; }

.eg-tile { position: relative; display: block; min-width: 0; overflow: hidden; background: var(--eg-forest); color: var(--eg-cream); }
.eg-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--eg-ease); }
.eg-tile::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, rgb(23 32 28 / 0.65)); opacity: 0; transition: opacity 0.4s ease; }

.eg-tile-title {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    z-index: 1;
    font-family: var(--eg-font-serif);
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.35;
    text-shadow: 0 1px 12px rgb(0 0 0 / 0.5);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.eg-tile:hover img { transform: scale(1.05); }
.eg-tile:hover::after, .eg-tile:focus-visible::after, .eg-tile.no-image::after { opacity: 1; }
.eg-tile:hover .eg-tile-title,
.eg-tile:focus-visible .eg-tile-title,
.eg-tile.no-image .eg-tile-title { opacity: 1; transform: none; }

/* No hover on touch screens: titles always visible */
@media (hover: none) {
    .eg-tile::after { opacity: 1; }
    .eg-tile-title { opacity: 1; transform: none; }
}

@media (max-width: 999px) {
    .eg-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 220px; gap: 10px; }
    .eg-tile:nth-child(8n + 4) { grid-column: auto; }
    .eg-tile:nth-child(8n + 8) { grid-column: span 2; }
}

@media (max-width: 599px) {
    .eg-mosaic { grid-auto-rows: 170px; }
    .eg-tile-title { left: 12px; right: 12px; bottom: 10px; font-size: 0.95rem; }
}

/* 12. Article
   ========================================================================== */

.eg-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 70; height: 2px; pointer-events: none; }
.eg-progress-bar { display: block; height: 100%; background: var(--eg-label-ink); transform: scaleX(0); transform-origin: left; }

/* Full-bleed photo opening, title over the photo */
.eg-opening {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 86vh;
    min-height: 86svh;
    padding: calc(var(--eg-head-h) + 48px) var(--eg-gutter) 64px;
    overflow: hidden;
    background: var(--eg-forest);
    color: var(--eg-cream);
    isolation: isolate;
}

.eg-opening-image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }

.eg-opening::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgb(23 32 28 / 0.5) 0%, rgb(23 32 28 / 0.05) 35%, rgb(23 32 28 / 0.25) 55%, rgb(23 32 28 / 0.78) 100%);
}

.eg-opening-copy { width: 100%; max-width: var(--eg-wide); margin: 0 auto; text-shadow: 0 1px 24px rgb(0 0 0 / 0.3); }
.eg-opening .eg-label { color: var(--eg-sage); }
.eg-opening .eg-article-title { max-width: 980px; }
.eg-opening .eg-article-excerpt { max-width: 620px; margin-inline: 0; color: inherit; opacity: 0.92; }
.eg-opening .eg-byline { justify-content: flex-start; border-color: rgb(245 241 232 / 0.3); color: inherit; }

.eg-opening-caption {
    max-width: calc(var(--eg-wide) + 2 * var(--eg-gutter));
    margin: 0 auto;
    padding: 12px var(--eg-gutter) 0;
    color: var(--eg-muted);
    font-size: 0.8rem;
    text-align: right;
}

.eg-opening-caption a { text-decoration: underline; text-underline-offset: 2px; }

/* Without a feature image: title block on cream */
.eg-article-head {
    max-width: calc(880px + 2 * var(--eg-gutter));
    margin: 0 auto;
    padding: 80px var(--eg-gutter) 8px;
    text-align: center;
}

.eg-post-tags { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 20px; }
.eg-article-head .eg-post-tags { justify-content: center; }
.eg-post-tags a:hover { text-decoration: underline; text-underline-offset: 4px; }

.eg-article-title { font-size: clamp(2.6rem, 6.5vw, 5.6rem); line-height: 1; letter-spacing: -0.01em; text-wrap: balance; }

.eg-article-excerpt {
    max-width: 640px;
    margin: 22px auto 0;
    color: var(--eg-muted);
    font-family: var(--eg-font-serif);
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    font-style: italic;
    line-height: 1.55;
}

.eg-byline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 0;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--eg-line);
    color: var(--eg-muted);
    font-size: 0.9rem;
}

.eg-byline > * { white-space: nowrap; }
/* The comments link is excluded: its count is filled by Ghost's JS and may stay empty */
.eg-byline > * + *:not(.eg-byline-comments)::before { content: "·"; margin-inline: 10px; }
.eg-byline-by { color: inherit; }
.eg-byline-by a { border-bottom: 1px solid transparent; }
.eg-byline-by a:hover { border-color: currentColor; }
.eg-count:not(:empty)::before { content: "·"; margin-inline: 10px; }

/* Phones: the authors on their own line, then date and reading time */
@media (max-width: 599px) {
    .eg-byline-by { flex-basis: 100%; white-space: normal; }
    .eg-byline > .eg-byline-by + *::before { content: none; }
    .eg-article-head .eg-byline-by { text-align: center; }
}

.eg-article-body { position: relative; padding-top: 72px; }

/* Table of contents */
.eg-toc { width: 100%; max-width: calc(var(--eg-content) + 2 * var(--eg-gutter)); margin: 0 auto 48px; padding-inline: var(--eg-gutter); }
.eg-toc-box { border-top: 1px solid var(--eg-ink); border-bottom: 1px solid var(--eg-line); }
.eg-toc-summary { display: flex; align-items: center; gap: 10px; padding: 14px 0; cursor: pointer; list-style: none; user-select: none; }
.eg-toc-summary::-webkit-details-marker { display: none; }

.eg-toc-summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-right: 1px solid var(--eg-muted);
    border-bottom: 1px solid var(--eg-muted);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease;
}

.eg-toc-box[open] .eg-toc-summary::after { transform: translateY(2px) rotate(-135deg); }
.eg-toc-title { color: var(--eg-label-ink); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; }
.eg-toc-count { color: var(--eg-muted); font-family: var(--eg-font-serif); font-style: italic; }
.eg-toc-box nav { padding: 0 0 16px; }
.eg-toc-list { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.eg-toc-list li { counter-increment: toc; }

.eg-toc-list a {
    display: flex;
    gap: 12px;
    padding: 7px 0 7px 14px;
    border-left: 1px solid var(--eg-line);
    color: var(--eg-muted);
    font-size: 0.92rem;
    line-height: 1.45;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.eg-toc-list a::before { content: counter(toc, upper-roman); flex-shrink: 0; min-width: 1.8em; font-family: var(--eg-font-serif); font-style: italic; }
.eg-toc-list a:hover { color: var(--eg-ink); }
.eg-toc-list a.is-read { border-left-color: var(--eg-label-ink); }
.eg-toc-list a.is-active { border-left: 2px solid var(--eg-label-ink); color: var(--eg-ink); }

@media (min-width: 1400px) {
    .eg-toc { position: absolute; top: 72px; bottom: 0; left: calc(50% - var(--eg-content) / 2 - 300px); width: 230px; margin: 0; padding: 0; }
    .eg-toc-box { position: sticky; top: calc(var(--eg-head-h) + 40px); border-bottom: 0; }
    .eg-toc-summary { cursor: default; pointer-events: none; }
    .eg-toc-summary::after { display: none; }
}

.eg-article-foot { display: flex; flex-direction: column; gap: 28px; padding-top: 64px; padding-bottom: 24px; }
.eg-article-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.eg-share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-block: 16px; border-block: 1px solid var(--eg-line); }
.eg-share .eg-label { margin-right: 10px; }
.eg-share .eg-icon-btn { border-color: var(--eg-line); }
.eg-share .eg-icon-btn:hover { border-color: var(--eg-label-ink); color: var(--eg-accent); }
.eg-share .eg-icon { width: 16px; height: 16px; }
.eg-copy.is-copied { border-color: var(--eg-label-ink); color: var(--eg-accent); }

.eg-author-card { display: flex; gap: 18px; padding-top: 24px; border-top: 1px solid var(--eg-ink); }
.eg-avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; border-radius: 50%; background: var(--eg-forest); color: var(--eg-cream); }
.eg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.eg-avatar span { width: 1ch; overflow: hidden; white-space: nowrap; }
.eg-avatar-lg { width: 68px; height: 68px; font-size: 1.4rem; }
.eg-author-card-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.eg-author-card-name { font-family: var(--eg-font-display); font-size: 1.6rem; line-height: 1.1; }
.eg-author-card-name a:hover { color: var(--eg-accent); }
.eg-author-card-bio { color: var(--eg-muted); font-family: var(--eg-font-serif); font-style: italic; font-size: 0.98rem; line-height: 1.6; }

.eg-comments { padding-block: 32px; }

/* Social links */
.eg-social { display: flex; flex-wrap: wrap; gap: 6px; }
.eg-social:empty { display: none; }

.eg-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--eg-line);
    transition: color 0.25s ease, border-color 0.25s ease;
}

.eg-social a:hover { border-color: var(--eg-label-ink); color: var(--eg-accent); }
.eg-social .eg-icon { width: 16px; height: 16px; }
.eg-social-sm a { width: 34px; height: 34px; }
.eg-social-sm .eg-icon { width: 14px; height: 14px; }
.eg-social-fallback { font-size: 0.65rem; }

/* 13. Content (Koenig editor)
   ========================================================================== */

.eg-content {
    display: grid;
    grid-template-columns:
        [full-start] minmax(var(--eg-gutter), 1fr)
        [wide-start] minmax(0, 200px)
        [main-start] min(var(--eg-content), calc(100% - 2 * var(--eg-gutter)))
        [main-end] minmax(0, 200px)
        [wide-end] minmax(var(--eg-gutter), 1fr)
        [full-end];
    font-size: 1.12rem;
    line-height: 1.85;
    overflow-wrap: break-word;
}

.eg-content-wide {
    grid-template-columns:
        [full-start] minmax(var(--eg-gutter), 1fr)
        [wide-start main-start] min(var(--eg-wide), calc(100% - 2 * var(--eg-gutter)))
        [main-end wide-end] minmax(var(--eg-gutter), 1fr)
        [full-end];
}

.eg-content > * { grid-column: main; min-width: 0; }
.eg-content > .kg-width-wide { grid-column: wide; }
.eg-content > .kg-width-full { grid-column: full; }
.eg-content > * + * { margin-top: 1.5em; margin-bottom: 0; }
.eg-content > :first-child { margin-top: 0; }

/* Caslon drop cap on posts */
.eg-article:not(.eg-page) .eg-content > p:first-child::first-letter {
    float: left;
    margin: 0.1em 0.12em 0 0;
    color: var(--eg-accent);
    font-family: var(--eg-font-display);
    font-size: 5.2em;
    font-weight: 400;
    line-height: 0.78;
}

.eg-content > h2 { margin-top: 2em; font-size: 2.3rem; }
.eg-content > h3 { margin-top: 1.75em; font-size: 1.75rem; }
.eg-content > h4 { margin-top: 1.5em; font-family: var(--eg-font-body); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; }
.eg-content > h2 + *, .eg-content > h3 + *, .eg-content > h4 + * { margin-top: 0.75em; }
.eg-content strong { font-weight: 500; }

.eg-content a { color: var(--eg-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.eg-content a:hover { color: var(--eg-label-ink); }
.eg-content ul, .eg-content ol { padding-left: 1.4em; }
.eg-content li + li { margin-top: 0.4em; }
.eg-content li::marker { color: var(--eg-label-ink); }

.eg-content blockquote:not([class]) {
    margin-inline: 0;
    padding-left: 26px;
    border-left: 1px solid var(--eg-label-ink);
    font-family: var(--eg-font-serif);
    font-size: 1.4rem;
    font-style: italic;
    line-height: 1.55;
}

.eg-content blockquote.kg-blockquote-alt {
    margin-inline: 0;
    padding: 0.5em 0;
    font-family: var(--eg-font-display);
    font-size: 2.3rem;
    line-height: 1.2;
    text-align: center;
}

/* Separator: a thin line with a leaf-like dot */
.eg-content hr {
    position: relative;
    width: 160px;
    height: 1px;
    margin: 3em auto;
    border: 0;
    background: var(--eg-label-ink);
    overflow: visible;
}

.eg-content hr::after {
    content: "";
    position: absolute;
    top: -4px;
    left: calc(50% - 4px);
    width: 9px;
    height: 9px;
    border: 1px solid var(--eg-label-ink);
    border-radius: 50%;
    background: var(--eg-bg);
}

.eg-content code:not(pre code) { padding: 0.15em 0.4em; background: var(--eg-bg-2); font-size: 0.88em; }
.eg-content pre { overflow-x: auto; padding: 20px; background: var(--eg-night); color: var(--eg-cream); font-size: 0.9rem; line-height: 1.6; }
.eg-content table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 0.95rem; }
.eg-content th, .eg-content td { padding: 10px 14px; border-bottom: 1px solid var(--eg-line); text-align: left; }
.eg-content th { border-bottom-color: var(--eg-ink); font-weight: 500; }
.eg-content figure { margin-inline: 0; }
.eg-content figcaption,
.eg-page-image figcaption { margin-top: 12px; padding-inline: var(--eg-gutter); color: var(--eg-muted); font-size: 0.8rem; line-height: 1.5; text-align: center; }
.eg-content figcaption a, .eg-page-image figcaption a { text-decoration: underline; }
.eg-content .kg-bookmark-container { color: var(--eg-ink); text-decoration: none; }
.eg-content .kg-btn,
.eg-content .kg-btn-accent { color: #fff; text-decoration: none; }
.eg-content .kg-callout-card { font-size: 1rem; }
.eg-content > .kg-width-full + .kg-width-full:not(.kg-card-hascaption + .kg-width-full) { margin-top: 0; }

.eg-page .eg-content { padding-top: 56px; padding-bottom: 96px; }
.eg-page-image { max-width: calc(var(--eg-wide) + 2 * var(--eg-gutter)); margin: 48px auto 0; padding-inline: var(--eg-gutter); }
.eg-page-image img { width: 100%; }
.eg-full-width .eg-content { padding-top: 72px; }

/* 14. Cards & related stories
   ========================================================================== */

.eg-related { padding-top: 120px; padding-bottom: 120px; border-top: 1px solid var(--eg-line); margin-top: 64px; }

.eg-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px 36px;
    max-width: var(--eg-wide);
    margin: 0 auto;
}

.eg-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.eg-card-media { width: 100%; margin-bottom: 8px; aspect-ratio: 4 / 3; }
.eg-card:hover .eg-card-media img { transform: scale(1.04); }
.eg-card-title { font-size: 1.7rem; line-height: 1.12; text-wrap: balance; }
.eg-card-title a:hover { color: var(--eg-accent); }

@media (max-width: 899px) {
    .eg-cards { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}

/* 15. Newsletter (forest band)
   ========================================================================== */

.eg-news {
    --eg-label-ink: var(--eg-sage);
    padding: 120px var(--eg-gutter);
    background: var(--eg-forest);
    color: var(--eg-cream);
    text-align: center;
}

.eg-news-inner { max-width: 760px; margin: 0 auto; }
.eg-news-title { margin: 18px 0 16px; font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.02; text-wrap: balance; }
.eg-news-text { max-width: 520px; margin: 0 auto; font-family: var(--eg-font-serif); font-size: 1.1rem; font-style: italic; line-height: 1.6; opacity: 0.88; }

.eg-form { max-width: 560px; margin: 40px auto 0; }
.eg-form-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.eg-form-row > * { min-width: 0; }

.eg-news input {
    flex: 1 1 260px;
    min-height: 46px;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--eg-cream);
    border-radius: 0;
    background: none;
    color: var(--eg-cream);
    font-size: 1rem;
}

.eg-news input::placeholder { color: rgb(245 241 232 / 0.7); }
.eg-news input:focus { outline: none; border-bottom-width: 2px; border-color: var(--eg-sage); }
.eg-news .eg-btn { border-color: var(--eg-cream); background: var(--eg-cream); color: var(--eg-forest); }
.eg-news .eg-btn:hover { background: transparent; color: var(--eg-cream); }

.eg-form-loading, .eg-form-success, .eg-form-error { display: none; }
.eg-form .eg-btn { position: relative; }
.eg-form.loading .eg-form-label { visibility: hidden; }

.eg-form.loading .eg-form-loading {
    display: block;
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: eg-spin 0.7s linear infinite;
}

.eg-form.success .eg-form-row { display: none; }
.eg-form.success .eg-form-success { display: block; font-family: var(--eg-font-serif); font-style: italic; font-size: 1.15rem; }
.eg-form.error .eg-form-error { display: block; margin-top: 12px; font-size: 0.9rem; }

@keyframes eg-spin { to { transform: rotate(360deg); } }

/* 16. Footer
   ========================================================================== */

.eg-footer { padding: 56px 0 32px; border-top: 1px solid var(--eg-line); }
.eg-news + .eg-footer { border-top: 0; }

.eg-footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 28px 48px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--eg-line);
}

.eg-footer-about { max-width: 440px; }
.eg-footer-brand { display: inline-block; max-width: 100%; }
.eg-footer-desc { margin-top: 12px; color: var(--eg-muted); font-family: var(--eg-font-serif); font-style: italic; font-size: 1rem; line-height: 1.6; }

.eg-footer-menu { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 0; list-style: none; font-size: 0.92rem; }
.eg-footer-menu a { padding-bottom: 2px; border-bottom: 1px solid transparent; }
.eg-footer-menu a:hover { border-color: currentColor; }

.eg-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding-top: 28px; }
.eg-footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--eg-muted); font-size: 0.85rem; }
.eg-footer-legal a { text-decoration: underline; text-underline-offset: 2px; }
.eg-footer-legal a:hover { color: var(--eg-ink); }

/* 17. Misc: pagination, error, motion
   ========================================================================== */

.eg-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 40px; }
.eg-pagination[hidden] { display: none; }
.eg-page-number { color: var(--eg-muted); font-size: 0.85rem; }
.eg-load-more-wrap { display: flex; justify-content: center; margin-top: 24px; }
.eg-mosaic + .eg-pagination, .eg-mosaic ~ .eg-load-more-wrap { margin-top: 56px; }
.eg-load-more[hidden] { display: none; }
.eg-load-more.is-loading { opacity: 0.6; pointer-events: none; }

.eg-error { max-width: 760px; margin: 0 auto; padding: 110px var(--eg-gutter) 96px; text-align: center; }
.eg-error-code { color: var(--eg-label-ink); font-family: var(--eg-font-display); font-size: clamp(7rem, 22vw, 13rem); line-height: 1; }
.eg-error-title { margin: 16px 0 14px; font-size: clamp(2rem, 4.4vw, 3.2rem); text-wrap: balance; }
.eg-error-text { color: var(--eg-muted); font-family: var(--eg-font-serif); font-style: italic; }
.eg-error .eg-btn { margin-top: 32px; }

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