/* ============================================================
   Dispatch — a membership-native theme for Ghost
   Austere monochrome editorial. Light default, dark option.
   Bodoni Moda (display) · Inter (UI) · Newsreader (reading).
   No chromatic accent — emphasis via scale, weight, whitespace.
   ============================================================ */

/* ----- Design tokens (light is the default) ----- */
:root {
    --gh-font-heading: "Bodoni Moda", Didot, Georgia, "Times New Roman", serif;
    --gh-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --gh-font-read: "Newsreader", Georgia, "Times New Roman", serif;

    /* Brand palette (Silverpoint house tokens) */
    --bg:          #F7F5F0;  /* paper */
    --bg-raised:   #FFFFFF;
    --bg-sunken:   #EFECE4;  /* paper-deep */
    --text:        #1B1B1A;  /* ink */
    --text-soft:   #3A3A38;  /* ink-soft */
    --text-muted:  #8C8F94;  /* silver */
    --line:        #E3DFD6;  /* hairline */
    --line-strong: #D2CDC2;

    --cta-bg:   #1B1B1A;     /* solid graphite CTA */
    --cta-text: #F7F5F0;

    --wrap: 1240px;
    --wrap-text: 40rem;
    --gap: clamp(1.1rem, 2.4vw, 2rem);
    --space: clamp(3.25rem, 7vw, 6rem);

    --radius: 2px;           /* near-square, editorial */
    --radius-pill: 999px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark palette */
.scheme-Dark {
    --bg:          #15161A;
    --bg-raised:   #1C1E23;
    --bg-sunken:   #101116;
    --text:        #ECEAE3;
    --text-soft:   #C7C5BE;
    --text-muted:  #8C8F94;
    --line:        #2A2B30;
    --line-strong: #3A3C42;
    --cta-bg:   #ECEAE3;
    --cta-text: #15161A;
}

/* Auto follows the system; light tokens are the default above */
@media (prefers-color-scheme: dark) {
    .scheme-Auto {
        --bg:          #15161A;
        --bg-raised:   #1C1E23;
        --bg-sunken:   #101116;
        --text:        #ECEAE3;
        --text-soft:   #C7C5BE;
        --text-muted:  #8C8F94;
        --line:        #2A2B30;
        --line-strong: #3A3C42;
        --cta-bg:   #ECEAE3;
        --cta-text: #15161A;
    }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--gh-font-body);
    font-size: 17px;
    line-height: 1.6;
    font-feature-settings: "kern", "liga";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--gh-font-heading);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0;
}

::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--cta-bg);
    color: var(--cta-text);
    padding: 0.6rem 1rem;
    z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ----- Layout helpers ----- */
.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: clamp(1.2rem, 4vw, 3rem);
}
.wrap-text {
    width: 100%;
    max-width: var(--wrap-text);
    margin-inline: auto;
    padding-inline: clamp(1.2rem, 4vw, 2rem);
}

.kicker {
    display: inline-block;
    font-family: var(--gh-font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* The silver dot — a small recurring motif */
.dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    vertical-align: middle;
    margin-right: 0.55em;
    flex-shrink: 0;
}
.dot--lg { width: 11px; height: 11px; margin: 0 0 1.2rem; }

.section-heading {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-family: var(--gh-font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 var(--gap);
}
.section-heading span { white-space: nowrap; }
.section-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.empty { color: var(--text-muted); grid-column: 1 / -1; }

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--gh-font-body);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.7em 1.3em;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    color: var(--text);
    background: transparent;
    transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
    cursor: pointer;
    white-space: nowrap;
}
.btn--ghost:hover { border-color: var(--text); color: var(--text); }
.btn--solid {
    background: var(--cta-bg);
    border-color: var(--cta-bg);
    color: var(--cta-text);
}
.btn--solid:hover { transform: translateY(-1px); }

/* Badges (members-only markers) */
.badge {
    display: inline-block;
    font-family: var(--gh-font-body);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    padding: 0.32em 0.6em;
    border-radius: var(--radius);
    line-height: 1;
}
.badge--paid { background: var(--cta-bg); color: var(--cta-text); }
.badge--free { background: transparent; color: var(--text-soft); border: 1px solid var(--line-strong); }
/* On media, badges float top-left */
.card__media .badge, .lead__media .badge {
    position: absolute;
    top: 0.8rem; left: 0.8rem;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.badge--inline { vertical-align: middle; }

/* ============================================================
   Member bar (slim top strip)
   ============================================================ */
.member-bar {
    background: var(--text);
    color: var(--bg);
    font-size: 0.76rem;
    letter-spacing: 0.01em;
}
.member-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 36px;
    padding-block: 0.4rem;
}
.member-bar .dot { background: var(--text-muted); }
.member-bar__status { display: inline-flex; align-items: center; color: var(--bg); opacity: 0.92; }
.member-bar__email { margin-left: 0.5rem; opacity: 0.6; }
.member-bar__actions { display: inline-flex; align-items: center; gap: 1.1rem; }
.member-bar__actions a { color: var(--bg); font-weight: 500; opacity: 0.78; transition: opacity 0.2s var(--ease); }
.member-bar__actions a:hover { opacity: 1; }
.member-bar__cta {
    border: 1px solid color-mix(in srgb, var(--bg) 45%, transparent);
    border-radius: var(--radius);
    padding: 0.28em 0.8em;
    opacity: 1 !important;
}
.member-bar__cta:hover { background: var(--bg); color: var(--text) !important; }
@media (max-width: 620px) { .member-bar__email { display: none; } }

/* ============================================================
   Site header
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(150%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: 70px;
}
.site-header__brand { margin-right: auto; }
.site-header__title {
    font-family: var(--gh-font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0;
}
.site-header__logo img { max-height: 30px; width: auto; }

.site-nav__list {
    display: flex;
    gap: 1.7rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav__item a {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-block: 0.4rem;
    transition: color 0.2s var(--ease);
}
.site-nav__item a:hover,
.site-nav__item.is-current a { color: var(--text); }

.site-header__actions { display: inline-flex; align-items: center; gap: 0.7rem; }
.site-header__actions .btn { font-size: 0.76rem; padding: 0.55em 1em; }

@media (max-width: 820px) {
    .site-nav { display: none; }
    .site-header__signin { display: none; }
}

/* ============================================================
   Homepage hero
   ============================================================ */
.hero { border-bottom: 1px solid var(--line); }
.hero__inner {
    padding-block: clamp(3rem, 8vw, 6rem);
    text-align: center;
    max-width: 50rem;
}
.hero__title {
    font-size: clamp(2.8rem, 8vw, 5.6rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-top: 1rem;
}
.hero__intro {
    margin: 1.2rem auto 0;
    max-width: 34ch;
    color: var(--text-soft);
    font-family: var(--gh-font-read);
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    line-height: 1.5;
}
.hero__form {
    display: flex;
    gap: 0.6rem;
    max-width: 27rem;
    margin: 2rem auto 0;
}
.hero__input, .subscribe__input {
    flex: 1;
    min-width: 0;
    font-family: var(--gh-font-body);
    font-size: 0.95rem;
    padding: 0.75em 1em;
    color: var(--text);
    background: var(--bg-raised);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
}
.hero__input:focus, .subscribe__input:focus { outline: none; border-color: var(--text); }
.hero__form .btn, .subscribe__form .btn { padding-inline: 1.4em; }
.hero__note, .subscribe__note {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1rem auto 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.hero__note [data-members-error], .subscribe__note [data-members-error] { color: #b4453c; }
.hero__note [data-members-error]:not(:empty), .subscribe__note [data-members-error]:not(:empty) { margin-right: 0.5rem; }

/* ============================================================
   Lead (featured latest post)
   ============================================================ */
.lead { padding-block: var(--space); border-bottom: 1px solid var(--line); }
.lead__link {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(1.5rem, 4vw, 3.2rem);
    align-items: center;
}
@media (max-width: 980px) { .lead__link { grid-template-columns: 1fr; } }
.lead__media {
    position: relative;
    margin: 0;
    aspect-ratio: 5 / 4;
    overflow: hidden;
    background: var(--bg-sunken);
    border: 1px solid var(--line);
}
.lead__image {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.02);
    transition: transform 1.2s var(--ease), filter 0.5s var(--ease);
}
.lead__link:hover .lead__image { transform: scale(1.03); filter: grayscale(0.7); }
.lead__meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.9rem; }
.lead__flag {
    font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted);
}
.lead__title {
    font-size: clamp(1.9rem, 4vw, 3.1rem);
    font-weight: 500;
}
.lead__link:hover .lead__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; }
.lead__dek {
    margin: 1rem 0 0;
    color: var(--text-soft);
    font-family: var(--gh-font-read);
    font-size: 1.18rem;
    line-height: 1.5;
    max-width: 46ch;
}
.lead__foot {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.4rem;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.lead__more { margin-left: auto; color: var(--text); font-weight: 600; }
.card__dot { color: var(--line-strong); }

/* ============================================================
   Feed grid + cards
   ============================================================ */
.feed { padding-block: var(--space); }
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.5rem, 3vw, 2.6rem);
}
@media (max-width: 1040px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.card { position: relative; }
.card__link { display: block; }
.card__media {
    position: relative;
    margin: 0 0 1rem;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-sunken);
    border: 1px solid var(--line);
}
.card__image {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.02);
    transition: transform 0.9s var(--ease), filter 0.5s var(--ease);
}
.card__image--empty { background: var(--bg-sunken); }
.card__link:hover .card__image { transform: scale(1.04); filter: grayscale(0.6); }
.card__meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.5rem;
}
.card__kicker {
    font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--text-muted);
}
.card__title {
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    font-weight: 500;
    line-height: 1.18;
}
.card__link:hover .card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.1em; }
.card__excerpt {
    margin: 0.6rem 0 0;
    color: var(--text-soft);
    font-family: var(--gh-font-read);
    font-size: 1rem;
    line-height: 1.55;
}
.card__foot {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.9rem;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ============================================================
   Subscribe block
   ============================================================ */
.subscribe {
    border-block: 1px solid var(--line);
    background: var(--bg-sunken);
}
.subscribe__inner {
    padding-block: var(--space);
    text-align: center;
}
.subscribe--compact .subscribe__inner { padding-block: clamp(2.4rem, 5vw, 3.4rem); }
.subscribe__title {
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
    font-weight: 500;
    margin: 0.8rem auto 0;
    max-width: 22ch;
}
.subscribe__text {
    margin: 1rem auto 0;
    max-width: 44ch;
    color: var(--text-soft);
    font-family: var(--gh-font-read);
    font-size: 1.1rem;
    line-height: 1.55;
}
.subscribe__text--member a { color: var(--text); text-decoration: underline; text-underline-offset: 0.15em; }
.subscribe__form {
    display: flex;
    gap: 0.6rem;
    max-width: 27rem;
    margin: 1.8rem auto 0;
}

/* ============================================================
   Pricing tiers
   ============================================================ */
.pricing { border-top: 1px solid var(--line); }
.pricing__inner { padding-block: var(--space); }
.pricing__head { text-align: center; max-width: 46rem; margin: 0 auto clamp(2rem, 4vw, 3rem); }
.pricing__title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; margin-top: 0.7rem; }
.pricing__sub {
    margin: 1rem auto 0;
    max-width: 48ch;
    color: var(--text-muted);
    font-size: 1.02rem;
}
.pricing__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: clamp(1.2rem, 2.4vw, 1.8rem);
    max-width: 60rem;
    margin-inline: auto;
    align-items: stretch;
}
.tier {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(1.6rem, 3vw, 2.2rem);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.tier--paid {
    border-color: var(--text);
    box-shadow: 0 1px 0 var(--text);
}
.tier__flag {
    position: absolute;
    top: -0.7rem; left: clamp(1.6rem, 3vw, 2.2rem);
    background: var(--cta-bg);
    color: var(--cta-text);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.35em 0.7em;
    border-radius: var(--radius);
}
/* Only the first paid tier is flagged "Most popular" (not every paid tier) */
.tier--paid ~ .tier--paid .tier__flag { display: none; }
.tier__name { font-size: 1.5rem; font-weight: 500; }
.tier__desc { margin: 0.5rem 0 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }
.tier__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1.4rem 0;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--line);
}
.tier__amount { font-family: var(--gh-font-heading); font-size: 2.6rem; font-weight: 500; line-height: 1; }
.tier__period { color: var(--text-muted); font-size: 0.9rem; }
.tier__yearly { flex-basis: 100%; color: var(--text-muted); font-size: 0.82rem; margin-top: 0.2rem; }
.tier__benefits {
    list-style: none;
    margin: 0 0 1.6rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.92rem;
    color: var(--text-soft);
}
.tier__benefits li { display: flex; align-items: flex-start; line-height: 1.45; }
.tier__benefits .dot { margin-top: 0.5em; }
.tier__cta { margin-top: auto; width: 100%; }
.pricing__foot { text-align: center; margin-top: 2rem; color: var(--text-muted); font-size: 0.9rem; }
.pricing__foot a { color: var(--text); text-decoration: underline; text-underline-offset: 0.15em; }

/* ============================================================
   Paywall (gated posts)
   ============================================================ */
.article__body--teaser {
    position: relative;
    max-height: 22rem;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
.paywall { margin-top: clamp(1rem, 3vw, 2rem); }
.paywall__gate {
    text-align: center;
    padding-block: clamp(1rem, 3vw, 2rem) clamp(2.4rem, 5vw, 3.6rem);
}
.paywall__title {
    font-size: clamp(1.7rem, 3.6vw, 2.6rem);
    font-weight: 500;
    margin: 0.6rem 0 0;
}
.paywall__text {
    margin: 1rem auto 0;
    max-width: 44ch;
    color: var(--text-soft);
    font-family: var(--gh-font-read);
    font-size: 1.12rem;
    line-height: 1.55;
}
.paywall__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: center;
    margin-top: 1.8rem;
}
.paywall .pricing { border-top: 1px solid var(--line); background: var(--bg-sunken); }

/* ============================================================
   Article (single post) — Newsreader for reading
   ============================================================ */
.article { padding-bottom: var(--space); }
.article__header { padding-top: clamp(2.4rem, 5vw, 4rem); text-align: center; }
.article__meta-top {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.article__date { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.article__title {
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 500;
    letter-spacing: -0.02em;
}
.article__dek {
    margin: 1.2rem auto 0;
    max-width: 42ch;
    color: var(--text-soft);
    font-family: var(--gh-font-read);
    font-size: 1.3rem;
    font-style: italic;
    line-height: 1.45;
}
.article__byline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    font-size: 0.86rem;
    color: var(--text-muted);
}
.article__author { display: flex; align-items: center; gap: 0.55rem; }
.article__author-name { color: var(--text-soft); font-weight: 500; }
.article__avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.article__reading-time::before { content: "·"; margin-right: 1rem; color: var(--line-strong); }

.article__hero {
    margin: clamp(2rem, 4vw, 3.2rem) auto 0;
    max-width: 64rem;
    padding-inline: clamp(1.2rem, 4vw, 3rem);
}
.article__hero-image {
    width: 100%;
    max-height: 78vh;
    object-fit: cover;
    border: 1px solid var(--line);
    filter: grayscale(1) contrast(1.02);
}
.article__hero-caption { margin-top: 0.8rem; color: var(--text-muted); font-size: 0.82rem; font-style: italic; text-align: center; }

/* ----- Article body / gh-content (Newsreader) ----- */
.article__body { margin-top: clamp(2.4rem, 5vw, 3.6rem); }
.gh-content {
    font-family: var(--gh-font-read);
    font-size: 1.24rem;
    line-height: 1.7;
    color: var(--text);
}
.gh-content > * { margin-block: 0 1.6rem; max-width: var(--wrap-text); margin-inline: auto; }
.gh-content a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--text-muted);
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}
.gh-content a:hover { text-decoration-color: var(--text); }
.gh-content h2 {
    font-size: 1.9rem;
    font-weight: 600;
    font-family: var(--gh-font-heading);
    color: var(--text);
    margin-top: 2.8rem;
    letter-spacing: -0.01em;
}
.gh-content h3 {
    font-size: 1.45rem;
    font-weight: 600;
    font-family: var(--gh-font-heading);
    color: var(--text);
    margin-top: 2.2rem;
}
.gh-content strong { font-weight: 600; }
.gh-content blockquote {
    margin-inline: auto;
    padding-left: 1.5rem;
    border-left: 2px solid var(--text);
    font-style: italic;
    font-size: 1.4rem;
    line-height: 1.45;
    color: var(--text);
}
.gh-content ul, .gh-content ol { padding-left: 1.4rem; }
.gh-content li { margin-bottom: 0.5rem; }
.gh-content hr { border: 0; height: 1px; background: var(--line); margin-block: 2.8rem; }
.gh-content code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.84em;
    background: var(--bg-sunken);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.1em 0.4em;
}
.gh-content pre {
    background: var(--bg-sunken);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
    overflow-x: auto;
    font-size: 0.92rem;
    line-height: 1.6;
}
.gh-content pre code { background: none; border: 0; padding: 0; }
.gh-content figure { margin: 2.6rem auto; }
.gh-content figcaption { margin-top: 0.7rem; text-align: center; font-size: 0.82rem; font-style: italic; color: var(--text-muted); }
.gh-content img { border-radius: var(--radius); }
.gh-content .kg-width-wide { width: min(92vw, 58rem); max-width: none; }
.gh-content .kg-width-full { width: 100vw; margin-inline: calc(50% - 50vw); max-width: none; }
.gh-content .kg-width-full img { width: 100%; border-radius: 0; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 0.7rem; max-width: min(92vw, 58rem); margin-inline: auto; }
.kg-gallery-row { display: flex; gap: 0.7rem; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }

/* ----- Article footer ----- */
.article__footer { margin-top: clamp(2.4rem, 5vw, 3.6rem); }
.article__tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tag-pill {
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    padding: 0.42em 0.9em;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tag-pill:hover { color: var(--text); border-color: var(--text); }

.author-card {
    display: flex;
    gap: 1.3rem;
    align-items: flex-start;
    margin-top: clamp(2.6rem, 5vw, 3.6rem);
    padding-top: clamp(2rem, 4vw, 2.6rem);
    border-top: 1px solid var(--line);
}
.author-card__avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-card__name { font-size: 1.5rem; font-weight: 500; margin-top: 0.3rem; }
.author-card__name a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
.author-card__bio { margin: 0.5rem 0 0; color: var(--text-muted); font-size: 0.98rem; line-height: 1.55; }

/* Post navigation */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    margin-top: var(--space);
}
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav__item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.3rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.2s var(--ease);
}
.post-nav__item:hover { border-color: var(--text); }
.post-nav__item--next { text-align: right; }
.post-nav__label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.post-nav__title { font-family: var(--gh-font-heading); font-size: 1.2rem; font-weight: 500; color: var(--text); line-height: 1.2; }

/* ============================================================
   Archive / collection headers
   ============================================================ */
.archive { padding-block: var(--space); }
.archive__header { margin-bottom: var(--gap); text-align: center; }
.archive__title { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 500; margin-top: 0.5rem; }

.collection-header { border-bottom: 1px solid var(--line); background: var(--bg-sunken); }
.collection-header__inner { padding-block: clamp(3rem, 7vw, 5rem); text-align: center; }
.collection-header__avatar {
    width: 84px; height: 84px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.2rem;
    border: 1px solid var(--line-strong);
}
.collection-header__title { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 500; margin-top: 0.5rem; }
.collection-header__desc { margin: 1rem auto 0; max-width: 52ch; color: var(--text-soft); font-family: var(--gh-font-read); font-size: 1.1rem; }
.collection-header__links { display: flex; gap: 1.2rem; justify-content: center; margin-top: 1rem; font-size: 0.84rem; color: var(--text-muted); }
.collection-header__links a { color: var(--text); text-decoration: underline; text-underline-offset: 0.15em; }
.collection-header__count { margin-top: 1.2rem; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }

/* ============================================================
   Membership page (custom-membership.hbs)
   ============================================================ */
.membership-hero { border-bottom: 1px solid var(--line); }
.membership-hero__inner { padding-block: clamp(3rem, 7vw, 5rem); text-align: center; max-width: 46rem; }
.membership-hero__title { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 500; margin-top: 0.8rem; letter-spacing: -0.02em; }
.membership-hero__intro { margin: 1.2rem auto 0; max-width: 40ch; color: var(--text-soft); font-family: var(--gh-font-read); font-size: 1.2rem; line-height: 1.5; }
.membership-copy { padding-block: clamp(2rem, 4vw, 3rem); }
.membership-copy ~ .pricing { border-top: 0; }

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
    padding: var(--space) 1.2rem;
    border-top: 1px solid var(--line);
    max-width: var(--wrap);
    margin-inline: auto;
}
.pagination__link {
    font-size: 0.82rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--text);
    transition: opacity 0.2s var(--ease);
}
.pagination__link:hover { opacity: 0.6; }
.pagination__link.is-disabled { color: var(--line-strong); }
.pagination__count { font-size: 0.78rem; letter-spacing: 0.1em; color: var(--text-muted); }
.pagination__count span { opacity: 0.6; }

/* ============================================================
   Site footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-sunken); }
.site-footer__inner {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.4fr;
    gap: 2rem;
    padding-block: clamp(2.8rem, 5vw, 4rem);
    align-items: start;
}
@media (max-width: 820px) { .site-footer__inner { grid-template-columns: 1fr; gap: 1.8rem; } }
.site-footer__title { font-family: var(--gh-font-heading); font-size: 1.5rem; font-weight: 600; }
.site-footer__desc { margin: 0.6rem 0 1rem; color: var(--text-muted); font-size: 0.92rem; max-width: 34ch; line-height: 1.55; }
.site-footer__cta { font-size: 0.78rem; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.site-footer__nav a { font-size: 0.9rem; color: var(--text-soft); }
.site-footer__nav a:hover { color: var(--text); }
.site-footer__meta { text-align: right; color: var(--text-muted); font-size: 0.8rem; }
@media (max-width: 820px) { .site-footer__meta { text-align: left; } }
.site-footer__meta p { margin: 0 0 0.4rem; }
.site-footer__colophon a { color: var(--text-soft); }
.site-footer__colophon a:hover { color: var(--text); }

/* ============================================================
   Error
   ============================================================ */
.error {
    min-height: 58vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.4rem;
    padding-block: var(--space);
}
.error__code { font-family: var(--gh-font-heading); font-size: clamp(4rem, 14vw, 9rem); line-height: 1; margin: 0; }
.error__title { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 500; }
.error__text { color: var(--text-muted); margin: 0.4rem 0 1.6rem; }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    .lead__link:hover .lead__image,
    .card__link:hover .card__image { transform: none; }
}

/* ===== Ghost editor cards =====
   Bespoke styling for all kg-* content cards.
   Reuses Dispatch tokens: --bg / --bg-raised / --bg-sunken / --text /
   --text-soft / --text-muted / --line / --line-strong / --cta-bg /
   --cta-text / --radius / --ease / --gh-font-heading / --gh-font-body /
   --gh-font-read / --wrap-text.
   .kg-width-wide and .kg-width-full already styled in the article-body
   section above — not duplicated here.
   ================================================================== */

/* -------------------------------------------------------
   Callout card
   ------------------------------------------------------- */
.kg-callout-card {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.1rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-sunken);
    font-family: var(--gh-font-read);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text);
}
.kg-callout-emoji {
    font-size: 1.3rem;
    line-height: 1.5;
    flex-shrink: 0;
    margin-top: 0.06rem;
}
.kg-callout-text { flex: 1; min-width: 0; }

/* Colour variants — restrained tints that preserve the warm-paper feel */
.kg-callout-card-grey   { background: var(--bg-sunken);  border-color: var(--line-strong); }
.kg-callout-card-white  { background: var(--bg-raised);  border-color: var(--line); }
.kg-callout-card-blue   { background: #EBF0F5;  border-color: #C8D5E2; }
.kg-callout-card-green  { background: #EBF2EA;  border-color: #C4D9C2; }
.kg-callout-card-yellow { background: #F5F0E3;  border-color: #DEDAD0; }
.kg-callout-card-red    { background: #F5ECEB;  border-color: #DEC9C8; }
.kg-callout-card-pink   { background: #F5ECF0;  border-color: #DEC9CF; }
.kg-callout-card-purple { background: #EEEAF5;  border-color: #CEC9DC; }
.kg-callout-card-accent { background: var(--cta-bg); border-color: var(--cta-bg); color: var(--cta-text); }

/* Dark-mode tints */
.scheme-Dark .kg-callout-card-blue   { background: #191F26; border-color: #293340; }
.scheme-Dark .kg-callout-card-green  { background: #181E17; border-color: #253526; }
.scheme-Dark .kg-callout-card-yellow { background: #1D1B13; border-color: #332D1D; }
.scheme-Dark .kg-callout-card-red    { background: #1D1515; border-color: #332728; }
.scheme-Dark .kg-callout-card-pink   { background: #1D1519; border-color: #33272D; }
.scheme-Dark .kg-callout-card-purple { background: #19152A; border-color: #2C273F; }

@media (prefers-color-scheme: dark) {
    .scheme-Auto .kg-callout-card-blue   { background: #191F26; border-color: #293340; }
    .scheme-Auto .kg-callout-card-green  { background: #181E17; border-color: #253526; }
    .scheme-Auto .kg-callout-card-yellow { background: #1D1B13; border-color: #332D1D; }
    .scheme-Auto .kg-callout-card-red    { background: #1D1515; border-color: #332728; }
    .scheme-Auto .kg-callout-card-pink   { background: #1D1519; border-color: #33272D; }
    .scheme-Auto .kg-callout-card-purple { background: #19152A; border-color: #2C273F; }
}

/* -------------------------------------------------------
   Toggle card
   ------------------------------------------------------- */
.kg-toggle-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
    overflow: hidden;
}
.kg-toggle-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.kg-toggle-heading-text {
    font-family: var(--gh-font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.35;
}
.kg-toggle-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0.2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s var(--ease), transform 0.25s var(--ease);
}
.kg-toggle-card-icon svg { width: 1rem; height: 1rem; }
.kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon {
    transform: rotate(180deg);
    color: var(--text);
}
.kg-toggle-content {
    padding: 0.9rem 1.2rem 1.1rem;
    font-family: var(--gh-font-read);
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--text-soft);
    border-top: 1px solid var(--line);
}
.kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-content { display: none; }

/* -------------------------------------------------------
   Button card
   ------------------------------------------------------- */
.kg-button-card {
    display: flex;
    margin-block: 1.8rem;
}
.kg-button-card.kg-align-center { justify-content: center; }
.kg-button-card.kg-align-left   { justify-content: flex-start; }
.kg-btn {
    display: inline-flex;
    align-items: center;
    font-family: var(--gh-font-body);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.7em 1.4em;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    color: var(--text);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.kg-btn:hover { border-color: var(--text); }
.kg-btn-accent {
    background: var(--cta-bg);
    border-color: var(--cta-bg);
    color: var(--cta-text);
}
.kg-btn-accent:hover { opacity: 0.85; border-color: var(--cta-bg); }

/* -------------------------------------------------------
   Bookmark card
   ------------------------------------------------------- */
.kg-bookmark-container {
    display: flex;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-raised);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s var(--ease);
}
.kg-bookmark-container:hover { border-color: var(--text); }
.kg-bookmark-content {
    flex: 1;
    min-width: 0;
    padding: 1.1rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.kg-bookmark-title {
    font-family: var(--gh-font-body);
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kg-bookmark-description {
    font-family: var(--gh-font-read);
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0.3rem;
}
.kg-bookmark-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}
.kg-bookmark-author,
.kg-bookmark-publisher {
    font-family: var(--gh-font-body);
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}
.kg-bookmark-author::after { content: " ·"; margin-right: 0.2rem; }
.kg-bookmark-thumbnail {
    width: 160px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg-sunken);
}
.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (max-width: 640px) { .kg-bookmark-thumbnail { display: none; } }

/* -------------------------------------------------------
   Product card
   ------------------------------------------------------- */
.kg-product-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
    overflow: hidden;
}
.kg-product-card-container {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.kg-product-card-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
}
.kg-product-card-title-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.kg-product-card-title {
    font-family: var(--gh-font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text);
    margin: 0;
    line-height: 1.25;
}
.kg-product-card-rating {
    display: flex;
    gap: 0.1rem;
    align-items: center;
    flex-shrink: 0;
}
.kg-product-card-rating-star { color: var(--line-strong); line-height: 1; }
.kg-product-card-rating-active { color: var(--text); }
.kg-product-card-description {
    font-family: var(--gh-font-read);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-soft);
    margin: 0;
}
.kg-product-card-button,
.kg-product-card-btn-accent {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    font-family: var(--gh-font-body);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.7em 1.4em;
    border-radius: var(--radius);
    background: var(--cta-bg);
    color: var(--cta-text);
    border: 1px solid var(--cta-bg);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s var(--ease);
}
.kg-product-card-button:hover,
.kg-product-card-btn-accent:hover { opacity: 0.85; }

/* -------------------------------------------------------
   File card
   ------------------------------------------------------- */
.kg-file-card-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s var(--ease);
}
.kg-file-card-container:hover { border-color: var(--text); }
.kg-file-card-contents {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.kg-file-card-title {
    font-family: var(--gh-font-body);
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kg-file-card-caption {
    font-size: 0.84rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kg-file-card-metadata {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
}
.kg-file-card-filename {
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kg-file-card-filesize {
    font-size: 0.76rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.kg-file-card-filesize::before { content: "·"; margin-right: 0.3rem; }
.kg-file-card-icon {
    flex-shrink: 0;
    width: 2.4rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-sunken);
    border-radius: var(--radius);
    color: var(--text-muted);
}
.kg-file-card-icon svg { width: 1.1rem; height: 1.1rem; }

/* -------------------------------------------------------
   Audio card
   ------------------------------------------------------- */
.kg-audio-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
}
.kg-audio-thumbnail {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-sunken);
}
.kg-audio-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.kg-audio-thumbnail-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.32);
    color: #fff;
}
.kg-audio-thumbnail-overlay svg { width: 1.1rem; height: 1.1rem; }
.kg-audio-player-container {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.kg-audio-title {
    font-family: var(--gh-font-body);
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kg-audio-player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.kg-audio-play-icon,
.kg-audio-unmute-icon,
.kg-audio-playback-rate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem;
    font-family: var(--gh-font-body);
    font-size: 0.8rem;
    font-weight: 600;
    transition: color 0.2s var(--ease);
}
.kg-audio-play-icon:hover,
.kg-audio-unmute-icon:hover,
.kg-audio-playback-rate:hover { color: var(--text); }
.kg-audio-play-icon svg,
.kg-audio-unmute-icon svg { width: 1rem; height: 1rem; }
.kg-audio-current-time,
.kg-audio-time {
    font-size: 0.78rem;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.kg-audio-seek-slider,
.kg-audio-volume-slider {
    flex: 1;
    min-width: 2.5rem;
    height: 3px;
    accent-color: var(--text);
    cursor: pointer;
}

/* -------------------------------------------------------
   Video card
   ------------------------------------------------------- */
.kg-video-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    margin: 0;
}
.kg-video-container { position: relative; width: 100%; }
.kg-video-card video { width: 100%; display: block; }
.kg-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.22);
    transition: background 0.2s var(--ease);
    cursor: pointer;
}
.kg-video-overlay:hover { background: rgba(0,0,0,0.14); }
.kg-video-large-play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    background: rgba(247,245,240,0.92);
    border: none;
    cursor: pointer;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.kg-video-large-play-icon:hover { transform: scale(1.08); background: #F7F5F0; }
.kg-video-large-play-icon svg { width: 1.25rem; height: 1.25rem; color: #1B1B1A; margin-left: 0.14rem; }
.kg-video-player-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.2rem 0.9rem 0.65rem;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s var(--ease);
}
.kg-video-container:hover .kg-video-player-container { opacity: 1; }
.kg-video-player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.kg-video-play-icon,
.kg-video-mute-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.15rem;
}
.kg-video-play-icon svg,
.kg-video-mute-icon svg { width: 1rem; height: 1rem; }
.kg-video-seek-slider,
.kg-video-volume-slider {
    flex: 1;
    min-width: 2.5rem;
    height: 3px;
    accent-color: #fff;
    cursor: pointer;
}
.kg-video-playback-rate {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-family: var(--gh-font-body);
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.kg-video-current-time,
.kg-video-time {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
}

/* -------------------------------------------------------
   Header card
   ------------------------------------------------------- */
.kg-header-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-sunken);
    border: 1px solid var(--line);
}
/* Full-bleed header cards lose the radius */
.kg-header-card.kg-width-full {
    border-radius: 0;
    border-left: none;
    border-right: none;
}
.kg-header-card-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.kg-header-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    max-width: 44rem;
}
.kg-header-card-header {
    font-family: var(--gh-font-heading);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0;
    color: inherit;
}
.kg-size-small  .kg-header-card-header { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.kg-size-medium .kg-header-card-header { font-size: clamp(2.4rem, 5.5vw, 3.6rem); }
.kg-size-large  .kg-header-card-header { font-size: clamp(3rem, 7vw, 5rem); }
.kg-header-card-subheader {
    font-family: var(--gh-font-read);
    font-size: clamp(0.95rem, 1.7vw, 1.2rem);
    font-style: italic;
    line-height: 1.55;
    margin: 0;
    color: inherit;
    opacity: 0.78;
}
.kg-header-card-button-container { margin-top: 0.4rem; }
.kg-header-card-button {
    display: inline-flex;
    align-items: center;
    font-family: var(--gh-font-body);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.7em 1.4em;
    border-radius: var(--radius);
    border: 1px solid currentColor;
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
/* Style variants — fixed hex so they never flip with scheme */
.kg-header-card.kg-style-dark {
    background: #1b1b1a;   /* ink — always near-black */
    color: #f7f5f0;        /* paper — always light */
    border-color: transparent;
}
.kg-header-card.kg-style-dark .kg-header-card-button:hover {
    background: rgba(247,245,240,0.14);
}
.kg-header-card.kg-style-light {
    background: #efece4;   /* paper-deep — always light */
    color: #1b1b1a;        /* ink — always dark */
}
.kg-header-card.kg-style-light .kg-header-card-button:hover {
    background: #1b1b1a;
    color: #f7f5f0;
    border-color: #1b1b1a;
}
.kg-header-card.kg-style-image { background: var(--bg-sunken); }
.kg-header-card.kg-style-image .kg-header-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.42);
}
.kg-header-card.kg-style-image .kg-header-card-content { color: #fff; }
.kg-header-card.kg-style-image .kg-header-card-button {
    border-color: rgba(255,255,255,0.65);
    color: #fff;
}
.kg-header-card.kg-style-image .kg-header-card-button:hover {
    background: rgba(255,255,255,0.14);
    border-color: #fff;
}

/* -------------------------------------------------------
   Signup card
   ------------------------------------------------------- */
.kg-signup-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-sunken);
    overflow: hidden;
}
.kg-signup-card-container {
    padding: clamp(2rem, 5vw, 3rem) clamp(1.4rem, 4vw, 2.4rem);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
}
.kg-signup-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-width: 36ch;
}
.kg-signup-card-heading {
    font-family: var(--gh-font-heading);
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.15;
    color: var(--text);
    margin: 0;
}
.kg-signup-card-subheading {
    font-family: var(--gh-font-read);
    font-size: 1rem;
    font-style: italic;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0;
}
.kg-signup-card-fields {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 26rem;
    flex-wrap: wrap;
    justify-content: center;
}
.kg-signup-card-input {
    flex: 1;
    min-width: 12rem;
    font-family: var(--gh-font-body);
    font-size: 0.95rem;
    padding: 0.7em 1em;
    color: var(--text);
    background: var(--bg-raised);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
}
.kg-signup-card-input:focus { outline: none; border-color: var(--text); }
.kg-signup-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--gh-font-body);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.7em 1.4em;
    background: var(--cta-bg);
    color: var(--cta-text);
    border: 1px solid var(--cta-bg);
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s var(--ease);
}
.kg-signup-card-button:hover { opacity: 0.85; }
.kg-signup-card-disclaimer {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
    max-width: 34ch;
}
.kg-signup-card-disclaimer a {
    color: var(--text-soft);
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

/* -------------------------------------------------------
   Post-body tables
   ------------------------------------------------------- */
.gh-content table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--gh-font-body);
    font-size: 0.94rem;
    line-height: 1.5;
}
.gh-content th,
.gh-content td {
    padding: 0.6em 1em;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    color: var(--text);
}
.gh-content th {
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-sunken);
}
.gh-content tr:nth-child(even) td { background: var(--bg-sunken); }

/* -------------------------------------------------------
   Dark-mode overrides: card inner containers
   Ghost's base card CSS can hard-code white on these;
   override here so they sit on the dark surface correctly.
   LIGHT default is left untouched — only adding dark rules.
   ------------------------------------------------------- */
.scheme-Dark .kg-product-card-container,
.scheme-Dark .kg-file-card-container,
.scheme-Dark .kg-audio-card,
.scheme-Dark .kg-bookmark-container { background: var(--bg-raised) !important; }
/* Ghost's bundled file-card CSS hard-codes the container white at high specificity; out-specify it. */
html.scheme-Dark .kg-card.kg-file-card .kg-file-card-container { background: var(--bg-raised) !important; }

.scheme-Dark .kg-product-card-title,
.scheme-Dark .kg-file-card-title,
.scheme-Dark .kg-audio-title,
.scheme-Dark .kg-bookmark-title { color: var(--text) !important; }

.scheme-Dark .kg-product-card-description,
.scheme-Dark .kg-bookmark-description { color: var(--text-soft) !important; }

.scheme-Dark .kg-bookmark-author,
.scheme-Dark .kg-bookmark-publisher,
.scheme-Dark .kg-bookmark-metadata,
.scheme-Dark .kg-audio-current-time,
.scheme-Dark .kg-audio-time { color: var(--text-muted) !important; }

@media (prefers-color-scheme: dark) {
    .scheme-Auto .kg-product-card-container,
    .scheme-Auto .kg-file-card-container,
    .scheme-Auto .kg-audio-card,
    .scheme-Auto .kg-bookmark-container { background: var(--bg-raised) !important; }
    html.scheme-Auto .kg-card.kg-file-card .kg-file-card-container { background: var(--bg-raised) !important; }

    .scheme-Auto .kg-product-card-title,
    .scheme-Auto .kg-file-card-title,
    .scheme-Auto .kg-audio-title,
    .scheme-Auto .kg-bookmark-title { color: var(--text) !important; }

    .scheme-Auto .kg-product-card-description,
    .scheme-Auto .kg-bookmark-description { color: var(--text-soft) !important; }

    .scheme-Auto .kg-bookmark-author,
    .scheme-Auto .kg-bookmark-publisher,
    .scheme-Auto .kg-bookmark-metadata,
    .scheme-Auto .kg-audio-current-time,
    .scheme-Auto .kg-audio-time { color: var(--text-muted) !important; }
}

/* ===== end Ghost editor cards ===== */
