/* ==========================================================================
   ep-research — Everypixel Research dark brand layer over the Journal theme.
   Loaded AFTER built/screen.css, so these rules win the cascade.
   Brand: dark (#0a0a0a) · single accent (#7000FF) · Circe 400/700.
   ========================================================================== */

@font-face {
    font-family: Circe;
    src: url("../fonts/circe_regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Circe;
    src: url("../fonts/circe_bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Brand tokens */
    --ep-bg: #0a0a0a;
    --ep-fg: #ededed;
    --ep-surface: #141414;
    --ep-muted: #888;
    --ep-accent: #7000ff;
    --ep-accent-hover: #8326ff;
    --ep-border: #262626;

    /* Force the single brand accent regardless of admin setting */
    --ghost-accent-color: #7000ff !important;

    /* Remap Journal text scale to the dark palette */
    --color-primary-text: #ededed;
    --color-secondary-text: #888;
    --color-darker-gray: #ededed;
    --color-dark-gray: #cfcfcf;
    --color-light-gray: #262626;
    --color-lighter-gray: #141414;
    --color-mid-gray: #3a3a3a;

    /* Circe everywhere */
    --font-sans: Circe, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-serif: Circe, system-ui, sans-serif;
    --gh-font-heading: Circe, system-ui, sans-serif;
    --gh-font-body: Circe, system-ui, sans-serif;

    /* Translucent grey-purple surface for content blocks */
    --ep-block: rgba(124, 92, 184, 0.12);
    --ep-block-border: rgba(124, 92, 184, 0.24);
}

/* Unified post column: title, excerpt, feature image and body all share one
   centred ~0.75-page width. Scoped to the article grid only, so the header
   and home page keep the full 1200px container. Setting container == content
   collapses the "wide" grid track, so header items (which sit on wide-start/
   wide-end) line up exactly with the body's main column. */
.post-template .gh-canvas,
.page-template .gh-canvas {
    --content-width: 900px;
    --container-width: 900px;
}

/* ── Global surface ───────────────────────────────────────────────────── */
html {
    background-color: var(--ep-bg);
}

body {
    background-color: var(--ep-bg);
    color: var(--ep-fg);
    font-family: var(--font-sans);
}

::selection {
    background: color-mix(in srgb, var(--ep-accent) 40%, transparent);
}

/* ── Header / navigation ──────────────────────────────────────────────── */
.gh-head {
    background-color: var(--ep-bg);
    border-bottom: 1px solid var(--ep-border);
}

.gh-burger::before,
.gh-burger::after {
    background-color: var(--ep-fg);
}

.gh-icon-btn,
.gh-search {
    color: var(--ep-fg);
}

.gh-head-link {
    color: var(--ep-fg);
}

/* ── Post cards ───────────────────────────────────────────────────────── */
.gh-card-title {
    color: var(--ep-fg);
}

.gh-card-excerpt {
    color: var(--ep-muted);
}

.gh-card-date {
    color: var(--ep-accent);
}

.gh-section-title::after {
    background-color: var(--ep-border);
}

.gh-loadmore {
    color: var(--ep-fg);
    border-color: var(--ep-border);
}

.gh-loadmore:hover {
    border-color: var(--ep-accent);
}

.gh-topic-count {
    border-color: var(--ep-border);
}

/* ── Home layout ──────────────────────────────────────────────────────── */
.ep-home {
    padding-top: 2vmin;
}

/* 1 ─ Hero */
.ep-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: stretch;
    margin: 3rem 0 7rem;
    min-height: 40rem;
}

.ep-hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ep-hero-title {
    margin: 0;
    font-size: clamp(4rem, 2.6rem + 5vw, 8rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ep-fg);
}

.ep-hero-sub {
    margin: 2rem 0 0;
    max-width: 38rem;
    font-size: 1.9rem;
    line-height: 1.5;
    color: var(--ep-muted);
}

.ep-hero-visual {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    background:
        radial-gradient(120% 130% at 78% 18%, #8a2bff 0%, #5800c8 28%, #240046 55%, #0a0a0a 82%),
        var(--ep-bg);
}

.ep-hero-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 42%);
}

/* Frosted glass panel floating over the gradient */
.ep-hero-glass {
    position: absolute;
    inset: 16%;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* 2 ─ Latest article: text column + image column of equal height */
.ep-latest {
    margin: 0;
}

.ep-latest-link {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: stretch;
}

.ep-latest-link:hover {
    opacity: 1;
}

.ep-latest-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 0;
}

.ep-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.ep-pill {
    padding: 0.3rem 0.95rem;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.7;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 9999px;
}

.ep-pill-date {
    color: var(--ep-fg);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ep-border);
}

.ep-pill-rubric {
    color: #cbb3ff;
    background: color-mix(in srgb, var(--ep-accent) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--ep-accent) 50%, transparent);
}

.ep-latest-title {
    margin: 1.6rem 0 0;
    font-size: clamp(2.6rem, 1.9rem + 2.2vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ep-fg);
}

.ep-latest-link:hover .ep-latest-title {
    opacity: 0.85;
}

.ep-latest-excerpt {
    margin: 1.4rem 0 0;
    font-size: 1.8rem;
    line-height: 1.55;
    color: var(--ep-muted);
}

.ep-latest-reading {
    margin-top: 1.8rem;
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ep-muted);
}

.ep-latest-media {
    height: 100%;
    min-height: 28rem;
}

.ep-latest-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
}

/* 3 ─ Divider */
.ep-divider {
    height: 0;
    margin: 6rem 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* 4 ─ Popular: vertical list of horizontal cards */
.ep-popular {
    display: flex;
    flex-direction: column;
    gap: 2.8rem;
}

.ep-pop-link {
    display: grid;
    grid-template-columns: 9.6rem 1fr;
    gap: 1.8rem;
    align-items: start;
}

.ep-pop-link:hover {
    opacity: 1;
}

.ep-pop-media {
    width: 9.6rem;
    height: 9.6rem;
    overflow: hidden;
    border-radius: 0.9rem;
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
}

.ep-pop-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ep-pop-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ep-fg);
}

.ep-pop-link:hover .ep-pop-title {
    opacity: 0.85;
}

.ep-pop-excerpt {
    margin: 0.6rem 0 0;
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--ep-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ep-pop-meta {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-top: 0.9rem;
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ep-muted);
}

.ep-pop-meta > * + *::before {
    content: "·";
    margin-right: 0.8rem;
}

.ep-cta-inner {
    position: relative;
    overflow: hidden;
    padding: 7rem 2rem;
    text-align: center;
    border-radius: 2rem;
    border: 1px solid var(--ep-border);
    background:
        radial-gradient(80% 150% at 50% 125%, rgba(112, 0, 255, 0.38) 0%, rgba(112, 0, 255, 0) 60%),
        var(--ep-surface);
}

.ep-cta-title {
    margin: 0;
    font-size: clamp(2.8rem, 2rem + 2.6vw, 4.4rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ep-fg);
}

.ep-cta-sub {
    margin: 1.6rem 0 0;
    font-size: 1.8rem;
    color: var(--ep-muted);
}

.ep-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 5rem;
    margin-top: 3.2rem;
    padding: 0 2.4rem;
    font-size: 1.7rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: var(--ep-accent);
    border-radius: 9999px;
    transition: background 150ms;
}

.ep-cta-btn:hover {
    background: var(--ep-accent-hover);
    opacity: 1;
}

/* Email subscribe pill (members enabled) */
.ep-cta-input {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    width: 100%;
    max-width: 44rem;
    height: 5.4rem;
    margin: 3.2rem auto 0;
    padding: 0 0.6rem 0 1.8rem;
    font-size: 1.6rem;
    text-decoration: none;
    background: #fff;
    border-radius: 9999px;
    transition: box-shadow 150ms;
}

.ep-cta-input:hover {
    opacity: 1;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ep-accent) 45%, transparent);
}

.ep-cta-input-text {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: #6b6b6b;
}

.ep-cta-input-text svg {
    width: 1.7rem;
    height: 1.7rem;
}

.ep-cta-input-btn {
    display: inline-flex;
    align-items: center;
    height: 4.2rem;
    padding: 0 2rem;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #fff;
    background: var(--ep-accent);
    border-radius: 9999px;
}

.ep-cta-input:hover .ep-cta-input-btn {
    background: var(--ep-accent-hover);
}

@media (max-width: 767px) {
    .ep-cta-inner { padding: 4rem 1.6rem; }
    .ep-cta-input {
        height: auto;
        flex-direction: column;
        gap: 1.2rem;
        padding: 1rem;
    }
    .ep-cta-input-btn { width: 100%; justify-content: center; }
}

/* ── Archive feed (index.hbs): 2-column smaller cards ─────────────────── */
.gh-feed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4.8rem 3.2rem;
}

.gh-feed .gh-card + .gh-card {
    margin-top: 0;
}

.gh-feed .gh-card-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
}

.gh-feed .gh-card-excerpt {
    margin-top: 0.8rem;
    font-size: 1.5rem;
    line-height: 1.55;
}

.gh-feed .gh-card-meta {
    margin-top: 1.6rem;
}

/* Narrow sidebar feeds stay single column */
.gh-sidebar .gh-feed {
    grid-template-columns: 1fr;
    gap: 2.8rem;
}

/* ── Responsive: collapse home blocks ─────────────────────────────────── */
@media (max-width: 900px) {
    .ep-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .ep-hero-visual {
        min-height: 26rem;
    }

    .ep-latest-link {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ep-latest-body {
        order: 2;
    }

    .ep-latest-media {
        min-height: 22rem;
    }
}

@media (max-width: 767px) {
    .gh-feed {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .ep-pop-link {
        grid-template-columns: 7.2rem 1fr;
        gap: 1.4rem;
    }

    .ep-pop-media {
        width: 7.2rem;
        height: 7.2rem;
    }
}

/* ── Article ──────────────────────────────────────────────────────────── */
.gh-article-title {
    font-size: clamp(3.4rem, 2.3rem + 3.2vw, 5.4rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ep-fg);
}

.gh-article-excerpt {
    margin-top: 1.4rem;
    font-size: clamp(1.8rem, 1.5rem + 0.8vw, 2.2rem);
    line-height: 1.45;
    color: var(--ep-muted);
}

.gh-article-image {
    margin-top: 0.4rem;
}

.gh-article-meta a {
    color: var(--ep-accent);
}

.gh-article-image img {
    border-radius: 1rem;
}

.gh-article-footer {
    border-top-color: var(--ep-border);
}

.gh-navigation-title {
    color: var(--ep-fg);
}

/* ── Prose content ────────────────────────────────────────────────────── */
.gh-content a {
    color: var(--ep-accent);
    text-underline-offset: 3px;
}

.gh-content a:hover {
    color: var(--ep-accent-hover);
}

.gh-content blockquote {
    border-left: 2px solid color-mix(in srgb, var(--ep-accent) 55%, transparent);
    color: var(--ep-muted);
}

.gh-content :where(pre, code) {
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
}

/* Tables — the base Journal/Ghost rules are built for a light theme and use
   `:not(.gist table)` (higher specificity) plus white edge-gradients as a
   scroll hint. Mirror that selector to win, and strip the light-theme tricks.
   `:not(.benchmark-table__table)` exempts the benchmark COMPONENT table — it
   styles itself in components.css and must not inherit the prose-table look. */
body .gh-content table:not(.gist table):not(.benchmark-table__table) {
    width: 100%;
    white-space: normal;
    background-image: none !important;
    background-color: var(--ep-bg) !important;
}

body .gh-content table:not(.gist table):not(.benchmark-table__table) th,
body .gh-content table:not(.gist table):not(.benchmark-table__table) td {
    padding: 1.3rem 1.8rem;
    color: var(--ep-fg) !important;
    background-color: var(--ep-bg) !important;
    border: 1px solid var(--ep-fg) !important;
    vertical-align: top;
}

body .gh-content table:not(.gist table):not(.benchmark-table__table) th {
    font-weight: 700 !important;
}

body .gh-content table:not(.gist table):not(.benchmark-table__table) td {
    font-weight: 400;
}

/* Tables pasted from Google Docs / Word carry inline styles on EVERY <span>
   inside cells (color:#000, background:#e8e8e8, font-family:Georgia, etc.).
   Inline styles beat external selectors — but an author !important rule still
   beats a non-important inline style per the CSS cascade. Force descendants
   to inherit from the cell so the theme tokens win. */
body .gh-content table:not(.gist table):not(.benchmark-table__table) td *,
body .gh-content table:not(.gist table):not(.benchmark-table__table) th * {
    color: inherit !important;
    background-color: transparent !important;
    font-family: inherit !important;
    font-weight: inherit !important;
}

/* Kill the white left/right scroll-shadow masks on edge cells */
body .gh-content table:not(.gist table):not(.benchmark-table__table) td:first-child,
body .gh-content table:not(.gist table):not(.benchmark-table__table) td:last-child {
    background-image: none !important;
}

/* ==========================================================================
   Koenig editor cards — on-brand styling. These are how per-post structured
   blocks are authored (in the post body): Callout = TL;DR / Finding,
   Toggle = Methodology.
   ========================================================================== */

.kg-callout-card {
    border-radius: 1rem;
    border: 0;
    border-left: 2px solid var(--ep-accent);
    padding: 2rem 2.4rem;
}

/* Recolour EVERY callout colour variant (grey/white/blue/green/…/custom) to a
   translucent grey-purple. `.gh-content` prefix raises specificity above the
   cards.min.css that Ghost injects via {{ghost_head}} after this stylesheet. */
.gh-content .kg-callout-card,
.gh-content [class*="kg-callout-card-"] {
    background: var(--ep-block);
}

.kg-callout-text {
    color: var(--ep-fg);
}

.gh-content .kg-toggle-card {
    background: var(--ep-block);
    border: 1px solid var(--ep-block-border);
    border-radius: 1rem;
}

.kg-toggle-heading-text {
    color: var(--ep-fg);
}

.kg-toggle-card-icon .kg-toggle-card-icon-arrow {
    stroke: var(--ep-muted);
}

.kg-toggle-content {
    color: var(--ep-muted);
}

.gh-content .kg-header-card,
.gh-content .kg-product-card-container,
.gh-content .kg-bookmark-container,
.gh-content .kg-file-card-container {
    background: var(--ep-block);
    border: 1px solid var(--ep-block-border);
    border-radius: 1rem;
}

.kg-bookmark-container:hover,
.kg-file-card-container:hover {
    border-color: color-mix(in srgb, var(--ep-fg) 20%, transparent);
}

.kg-bookmark-title,
.kg-file-card-title {
    color: var(--ep-fg);
}

.kg-bookmark-description,
.kg-bookmark-metadata,
.kg-file-card-caption,
.kg-file-card-metadata {
    color: var(--ep-muted);
}

.kg-btn-accent {
    background: var(--ep-accent);
    color: #fff;
}

.kg-btn-accent:hover {
    background: var(--ep-accent-hover);
}

/* ==========================================================================
   Cite-this-article block (auto-rendered from post metadata in post.hbs)
   ========================================================================== */

.ep-cite {
    margin: 4rem 0 0;
    padding: 2.4rem 2.8rem;
    background: var(--ep-block);
    border: 1px solid var(--ep-block-border);
    border-radius: 1rem;
}

.ep-label {
    margin: 0 0 1.2rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ep-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ep-cite-code-wrap {
    position: relative;
}

.ep-cite-pre {
    padding: 1.6rem;
    margin: 0;
    overflow-x: auto;
    font-family: var(--font-mono, monospace);
    font-size: 1.35rem;
    line-height: 1.6;
    color: var(--ep-fg);
    white-space: pre-wrap;
    word-break: break-all;
    background: var(--ep-bg);
    border: 1px solid var(--ep-border);
    border-radius: 0.75rem;
}

.ep-cite-copy {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    height: 3rem;
    padding: 0 1rem;
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--ep-fg);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ep-border);
    border-radius: 9999px;
    transition: border-color 150ms;
}

.ep-cite-copy:hover {
    border-color: var(--ep-accent);
}

.ep-cite-apa {
    margin: 1.2rem 0 0;
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--ep-muted);
    user-select: all;
}

@media (max-width: 767px) {
    .ep-cite {
        padding: 1.6rem;
    }
}

/* ==========================================================================
   LIGHT THEME — applied only to single posts (body.post-template).
   Palette inspired by editorial/drafts/faq-block.html:
     headings/strong  #1a1a1a   body text   #444     muted/labels  #888/#999
     borders          #e8e8e4   surface     #f7f7f4  code          #c0392b on #f2f2ef
     accent           #7000ff (single brand accent, kept from dark theme)
   Pages (.page-template), home and archives keep the default dark theme.
   ========================================================================== */

body.post-template {
    --ep-bg: #ffffff;
    --ep-fg: #1a1a1a;
    --ep-muted: #999;
    --ep-secondary: #444;
    --ep-surface: #f7f7f4;
    --ep-border: #e8e8e4;
    --ep-mid-border: #d0d0cc;
    --ep-code-bg: #f2f2ef;
    --ep-code-fg: #c0392b;
    --ep-table-border: #e8e8e4;

    --ep-block: rgba(112, 0, 255, 0.05);
    --ep-block-border: rgba(112, 0, 255, 0.18);

    /* Remap the shared Journal tokens used by built/screen.css */
    --color-primary-text: #1a1a1a;
    --color-secondary-text: #888;
    --color-darker-gray: #1a1a1a;
    --color-dark-gray: #444;
    --color-light-gray: #e8e8e4;
    --color-lighter-gray: #f7f7f4;
    --color-mid-gray: #d0d0cc;

    background-color: #ffffff;
    color: var(--ep-secondary);
}

/* Cover the scroll-bounce area too */
html:has(body.post-template) {
    background-color: #ffffff;
}

/* ── Header / navigation (light) ──────────────────────────────────────── */
body.post-template .gh-head {
    background-color: #ffffff;
    border-bottom: 1px solid var(--ep-border);
}

body.post-template .gh-burger::before,
body.post-template .gh-burger::after {
    background-color: #1a1a1a;
}

body.post-template .gh-icon-btn,
body.post-template .gh-search,
body.post-template .gh-head-link,
body.post-template .gh-head-logo {
    color: #1a1a1a;
}

/* Two logo variants. The white version (`@site.logo`) is shown on dark
   surfaces (home, page, archives); the dark version (`@custom.logo_dark`)
   is shown on light single posts. The dark file is uploaded at
   Settings → Design → ep-research → Dark logo. */
.gh-head-logo-dark { display: none; }
body.post-template .gh-head-logo-light { display: none; }
body.post-template .gh-head-logo-dark { display: inline-block; }

/* ── Article header ───────────────────────────────────────────────────── */
body.post-template .gh-article-title { color: #1a1a1a; }
body.post-template .gh-article-excerpt { color: var(--ep-secondary); }
body.post-template .gh-article-meta { color: var(--ep-secondary); }
body.post-template .gh-article-meta a { color: var(--ep-accent); }

/* ── Article body (prose) ─────────────────────────────────────────────── */
body.post-template .gh-content { color: var(--ep-secondary); }

body.post-template .gh-content h1,
body.post-template .gh-content h2,
body.post-template .gh-content h3,
body.post-template .gh-content h4,
body.post-template .gh-content h5,
body.post-template .gh-content h6 { color: #1a1a1a; }

body.post-template .gh-content strong { color: #1a1a1a; }

body.post-template .gh-content a {
    color: var(--ep-accent);
    text-decoration-color: rgba(112, 0, 255, 0.35);
}

body.post-template .gh-content a:hover {
    color: var(--ep-accent-hover);
}

body.post-template .gh-content blockquote {
    border-left: 2px solid var(--ep-accent);
    color: var(--ep-secondary);
}

/* Inline code: terracotta on warm-light, no border (matches FAQ doc) */
body.post-template .gh-content :is(p, li, td, th) code {
    background: var(--ep-code-bg);
    color: var(--ep-code-fg);
    border: none;
}

/* Code blocks stay surface + border, dark text */
body.post-template .gh-content pre,
body.post-template .gh-content .kg-code-card {
    background: var(--ep-surface);
    border: 1px solid var(--ep-border);
}

body.post-template .gh-content pre code,
body.post-template .gh-content .kg-code-card code {
    background: none;
    color: #1a1a1a;
    border: none;
}

/* ── Article footer / next-prev nav ───────────────────────────────────── */
body.post-template .gh-article-footer { border-top-color: var(--ep-border); }
body.post-template .gh-navigation-title { color: #1a1a1a; }
body.post-template .gh-navigation-label { color: var(--ep-secondary); }

/* ── Koenig cards (light variant) ─────────────────────────────────────── */
body.post-template .gh-content .kg-callout-card,
body.post-template .gh-content [class*="kg-callout-card-"] {
    background: var(--ep-block) !important;
    color: #1a1a1a !important;
}

body.post-template .gh-content .kg-callout-text { color: #1a1a1a !important; }

body.post-template .gh-content .kg-toggle-card {
    background: #ffffff;
    border-color: var(--ep-border);
}

body.post-template .gh-content .kg-toggle-heading-text { color: #1a1a1a; }
body.post-template .gh-content .kg-toggle-card-icon .kg-toggle-card-icon-arrow { stroke: #888; }
body.post-template .gh-content .kg-toggle-content { color: var(--ep-secondary); }

body.post-template .gh-content .kg-header-card,
body.post-template .gh-content .kg-product-card-container,
body.post-template .gh-content .kg-bookmark-container,
body.post-template .gh-content .kg-file-card-container {
    background: #ffffff;
    border-color: var(--ep-border);
}

body.post-template .gh-content .kg-bookmark-title,
body.post-template .gh-content .kg-file-card-title { color: #1a1a1a; }

body.post-template .gh-content .kg-bookmark-description,
body.post-template .gh-content .kg-bookmark-metadata,
body.post-template .gh-content .kg-file-card-caption,
body.post-template .gh-content .kg-file-card-metadata { color: var(--ep-secondary); }

/* ── Tables: editorial light style (hairline borders, no heavy fills) ─── */
body.post-template .gh-content table:not(.gist table) {
    background-color: #ffffff !important;
}

body.post-template .gh-content table:not(.gist table) th,
body.post-template .gh-content table:not(.gist table) td {
    border: 1px solid var(--ep-table-border) !important;
}

body.post-template .gh-content table:not(.gist table) th {
    background-color: var(--ep-surface) !important;
    color: #1a1a1a !important;
}

body.post-template .gh-content table:not(.gist table) td {
    background-color: #ffffff !important;
    color: var(--ep-secondary) !important;
}

/* The earlier `td *, th *` !important rule (color:inherit) keeps cell
   descendants — including the inline-styled spans from Google Docs paste —
   in sync with these light cell colours automatically. */

/* ── Cite block (light) ───────────────────────────────────────────────── */
body.post-template .ep-cite {
    background: var(--ep-surface);
    border-color: var(--ep-border);
}

body.post-template .ep-label { color: var(--ep-muted); }

body.post-template .ep-cite-pre {
    background: #ffffff;
    border: 1px solid var(--ep-border);
    color: #1a1a1a;
}

body.post-template .ep-cite-copy {
    background: #ffffff;
    color: #1a1a1a;
    border-color: var(--ep-border);
}

body.post-template .ep-cite-apa { color: var(--ep-secondary); }

