/* ==========================================================================
   THE CLINIC — A Premium Editorial Theme for Ghost
   ==========================================================================
   Design: Editorial finance publication
   Display: Fraunces (variable serif)
   Body: IBM Plex Sans
   Mono: IBM Plex Mono
   ========================================================================== */

/* ========================================================================
   1. RESET
   ======================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { height: 100%; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ========================================================================
   2. DESIGN TOKENS
   ======================================================================== */

:root {
    /* Color — deeply considered palette */
    --ink:       #0a1a2a;  /* Deep navy — authority, headlines */
    --ink-80:    #2a3a4a;
    --ink-60:    #5a6a7a;
    --gold:      #a8833d;  /* Restrained gold — accents only */
    --gold-dark: #8a6a2e;
    --gold-soft: #d9c289;
    --cream:     #f6f1e4;  /* Warm paper — sections */
    --paper:     #fdfbf4;  /* Page background */
    --paper-pure:#ffffff;
    --sage:      #1a3d2e;  /* Deep forest — member badges */
    --stone:     #6e685e;  /* Muted text */
    --line:      #d9d0be;  /* Hairline dividers */
    --line-soft: #ece4d2;

    /* Typography */
    --font-display: 'Fraunces', 'Times New Roman', serif;
    --font-body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

    /* Type scale — modular 1.25 */
    --text-2xs: 0.6875rem; /* 11px */
    --text-xs:  0.8125rem; /* 13px */
    --text-sm:  0.9375rem; /* 15px */
    --text-base:1.0625rem; /* 17px */
    --text-lg:  1.1875rem; /* 19px */
    --text-xl:  1.375rem;  /* 22px */
    --text-2xl: 1.75rem;   /* 28px */
    --text-3xl: 2.25rem;   /* 36px */
    --text-4xl: 2.875rem;  /* 46px */
    --text-5xl: 3.75rem;   /* 60px */
    --text-6xl: 4.75rem;   /* 76px */

    /* Spacing */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.5rem;
    --sp-6: 2rem;
    --sp-7: 3rem;
    --sp-8: 4rem;
    --sp-9: 6rem;
    --sp-10: 8rem;

    /* Layout */
    --container: 1280px;
    --container-wide: 1440px;
    --article: 680px;
    --article-wide: 860px;

    /* Motion */
    --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
    --duration: 0.25s;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(10, 26, 42, 0.04);
    --shadow-md: 0 4px 20px -8px rgba(10, 26, 42, 0.12);
    --shadow-lg: 0 20px 50px -20px rgba(10, 26, 42, 0.22);
}

/* ========================================================================
   3. BASE
   ======================================================================== */

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

@media (min-width: 900px) {
    html { font-size: 17px; }
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    font-feature-settings: "ss01", "cv11", "tnum" 0;
    letter-spacing: -0.003em;
}

.viewport {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
}

/* Typography base */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.022em;
    line-height: 1.1;
    font-variation-settings: "opsz" 144, "SOFT" 30;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); font-weight: 500; }

a {
    color: var(--ink);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--duration) var(--ease);
}

a:hover { color: var(--gold-dark); }

::selection {
    background: var(--gold-soft);
    color: var(--ink);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================================================
   4. LAYOUT PRIMITIVES
   ======================================================================== */

.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: var(--sp-4);
}

.section-header {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--sp-5) var(--sp-6);
    text-align: center;
}

.section-title {
    font-size: clamp(var(--text-3xl), 4.5vw, var(--text-4xl));
    font-variation-settings: "opsz" 144, "SOFT" 50;
    font-weight: 400;
}

/* ========================================================================
   5. BUTTONS
   ======================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 14px 28px;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid var(--ink);
    border-radius: 2px;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
}

.btn-primary {
    background: var(--ink);
    color: var(--paper);
}

.btn-primary:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--paper);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
}

.btn-ghost:hover {
    background: var(--ink);
    color: var(--paper);
}

.btn-sm {
    padding: 9px 18px;
    font-size: var(--text-2xs);
}

/* ========================================================================
   6. SITE HEADER & NAVIGATION
   ======================================================================== */

.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line-soft);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(8px);
    background: rgba(253, 251, 244, 0.92);
}

.site-header-inner {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: var(--sp-5) var(--sp-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-5);
}

.site-logo {
    display: inline-flex;
    align-items: baseline;
    gap: var(--sp-3);
    text-decoration: none;
}

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

.logo-wordmark {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 400;
    font-variation-settings: "opsz" 144, "SOFT" 50;
    letter-spacing: -0.025em;
    color: var(--ink);
}

.logo-mark {
    color: var(--gold-dark);
    font-size: 0.9em;
    font-weight: 300;
}

/* Nav */
.site-nav {
    display: flex;
    align-items: center;
    gap: var(--sp-7);
}

.nav-list {
    display: flex;
    gap: var(--sp-6);
    align-items: center;
}

.nav-list a {
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    color: var(--ink);
    position: relative;
    padding: var(--sp-2) 0;
    transition: color var(--duration) var(--ease);
}

.nav-list a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--gold-dark);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration) var(--ease);
}

.nav-list a:hover::after { transform: scaleX(1); }
.nav-list a:hover { color: var(--gold-dark); }

.site-actions {
    display: flex;
    gap: var(--sp-3);
    align-items: center;
}

/* Mobile nav toggle */
.nav-toggle { display: none; }
.nav-toggle-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    height: 24px;
    cursor: pointer;
    padding: 2px 0;
    z-index: 101;
}
.nav-toggle-btn span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--ink);
    transition: transform var(--duration) var(--ease), opacity var(--duration);
}

@media (max-width: 899px) {
    .nav-toggle-btn { display: flex; }
    .site-nav {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: var(--paper);
        flex-direction: column;
        justify-content: center;
        gap: var(--sp-7);
        padding: var(--sp-8) var(--sp-5);
        transform: translateY(-100%);
        transition: transform 0.4s var(--ease);
    }
    .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
    .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(2) { opacity: 0; }
    .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
    .nav-toggle:checked ~ .site-nav { transform: translateY(0); }
    .nav-list {
        flex-direction: column;
        gap: var(--sp-5);
    }
    .nav-list a { font-size: var(--text-2xl); font-family: var(--font-display); font-weight: 400; }
    .site-actions { flex-direction: column; gap: var(--sp-3); }
    .site-actions .btn { min-width: 200px; }
}

/* ========================================================================
   7. HOME HERO
   ======================================================================== */

.home-hero {
    padding: clamp(var(--sp-8), 12vw, var(--sp-10)) var(--sp-5) var(--sp-8);
    text-align: center;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(168, 131, 61, 0.06), transparent 60%),
        var(--paper);
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.hero-inner {
    max-width: 920px;
    margin: 0 auto;
    position: relative;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-4xl), 7vw, var(--text-6xl));
    font-weight: 300;
    line-height: 1.02;
    letter-spacing: -0.028em;
    font-variation-settings: "opsz" 144, "SOFT" 30;
    color: var(--ink);
    margin-bottom: var(--sp-6);
    max-width: 14ch;
    margin-left: auto;
    margin-right: auto;
}

.hero-title em {
    font-style: italic;
    color: var(--gold-dark);
    font-weight: 300;
    font-variation-settings: "opsz" 144, "SOFT" 80;
}

.hero-subtitle {
    font-size: var(--text-lg);
    color: var(--ink-80);
    max-width: 52ch;
    margin: 0 auto var(--sp-7);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: var(--sp-3);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-rule {
    margin-top: var(--sp-9);
    display: flex;
    justify-content: center;
}

.hero-rule span {
    display: block;
    width: 60px;
    height: 1px;
    background: var(--gold);
    position: relative;
}

.hero-rule span::before,
.hero-rule span::after {
    content: "";
    position: absolute;
    top: -2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
}
.hero-rule span::before { left: -10px; }
.hero-rule span::after  { right: -10px; }

/* ========================================================================
   8. FEATURED POST
   ======================================================================== */

.featured-section {
    padding: var(--sp-8) var(--sp-5) var(--sp-7);
    max-width: var(--container);
    margin: 0 auto;
}

.featured-post {
    background: var(--paper-pure);
    border: 1px solid var(--line-soft);
    overflow: hidden;
    transition: all 0.4s var(--ease);
    position: relative;
}

.featured-post::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--gold);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.5s var(--ease);
    z-index: 2;
}

.featured-post:hover { box-shadow: var(--shadow-lg); }
.featured-post:hover::before { transform: scaleY(1); }

.featured-post-link {
    display: grid;
    text-decoration: none;
    color: inherit;
}

@media (min-width: 900px) {
    .featured-post-link {
        grid-template-columns: 1.2fr 1fr;
        align-items: stretch;
    }
}

.featured-post-image {
    overflow: hidden;
    background: var(--cream);
    aspect-ratio: 16/10;
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.featured-post:hover .featured-post-image img { transform: scale(1.03); }

.featured-post-meta {
    padding: clamp(var(--sp-5), 4vw, var(--sp-7));
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--sp-3);
}

.post-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: var(--sp-2);
}

.featured-post-title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-2xl), 3.4vw, var(--text-4xl));
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.022em;
    font-variation-settings: "opsz" 144, "SOFT" 30;
    color: var(--ink);
}

.featured-post-excerpt {
    font-size: var(--text-base);
    color: var(--ink-80);
    line-height: 1.6;
    margin-top: var(--sp-2);
}

/* ========================================================================
   9. POST GRID
   ======================================================================== */

.post-grid-section {
    padding: var(--sp-8) var(--sp-5);
    max-width: var(--container);
    margin: 0 auto;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--sp-6);
}

.post-card {
    background: var(--paper-pure);
    border: 1px solid var(--line-soft);
    overflow: hidden;
    transition: all 0.3s var(--ease);
    position: relative;
}

.post-card::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--line);
}

.post-card:hover::after { transform: scaleX(1); }

.post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.post-card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--cream);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-content {
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.post-card-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.015em;
    font-variation-settings: "opsz" 36, "SOFT" 30;
    color: var(--ink);
    margin: var(--sp-1) 0;
}

.post-card-excerpt {
    font-size: var(--text-sm);
    color: var(--ink-80);
    line-height: 1.55;
    margin-bottom: var(--sp-3);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-wrap: wrap;
    font-size: var(--text-2xs);
    color: var(--stone);
    font-family: var(--font-body);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: auto;
}

.dot-separator {
    opacity: 0.6;
}

.member-badge {
    color: var(--sage);
    font-weight: 600;
}

/* ========================================================================
   10. SINGLE POST
   ======================================================================== */

.post-page {
    background: var(--paper);
}

.post-header {
    padding: var(--sp-9) var(--sp-5) var(--sp-7);
    text-align: center;
    background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
    border-bottom: 1px solid var(--line-soft);
}

.post-header-inner {
    max-width: var(--article-wide);
    margin: 0 auto;
}

.post-eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-dark);
    text-decoration: none;
    margin-bottom: var(--sp-4);
    padding: var(--sp-2) var(--sp-4);
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--paper-pure);
    transition: all var(--duration) var(--ease);
}

.post-eyebrow:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.post-title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 5.5vw, var(--text-6xl));
    font-weight: 300;
    line-height: 1.04;
    letter-spacing: -0.028em;
    font-variation-settings: "opsz" 144, "SOFT" 30;
    color: var(--ink);
    margin: var(--sp-4) 0 var(--sp-5);
    max-width: 22ch;
    margin-left: auto;
    margin-right: auto;
}

.post-subtitle {
    font-family: var(--font-display);
    font-style: italic;
    font-size: var(--text-xl);
    color: var(--ink-80);
    max-width: 60ch;
    margin: 0 auto var(--sp-6);
    line-height: 1.4;
    font-weight: 300;
}

.post-byline {
    display: flex;
    justify-content: center;
    margin-top: var(--sp-5);
}

.author-info {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-3);
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line);
}

.author-details {
    text-align: left;
}

.author-name {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink);
}

.post-meta-inline {
    display: block;
    font-size: var(--text-xs);
    color: var(--stone);
    margin-top: 2px;
}

.post-feature-image {
    max-width: var(--container);
    margin: var(--sp-7) auto 0;
    padding: 0 var(--sp-5);
}

.post-feature-image img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: cover;
}

.post-feature-image figcaption {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--stone);
    text-align: center;
    margin-top: var(--sp-3);
    font-style: italic;
}

/* ========================================================================
   11. POST CONTENT (gh-content — Ghost's rich content)
   ======================================================================== */

.post-content,
.page-body {
    max-width: var(--article);
    margin: 0 auto;
    padding: var(--sp-8) var(--sp-5);
    font-size: var(--text-lg);
    line-height: 1.75;
    color: var(--ink);
}

.post-content > * + *,
.page-body > * + * {
    margin-top: var(--sp-5);
}

.gh-content p {
    font-size: var(--text-lg);
    line-height: 1.75;
    color: var(--ink);
}

/* Drop cap — editorial flair */
.has-drop-cap > p:first-of-type::first-letter,
.gh-content > p:first-of-type:not(.has-no-dropcap)::first-letter {
    font-family: var(--font-display);
    font-size: 5.5em;
    font-weight: 300;
    font-variation-settings: "opsz" 144, "SOFT" 30;
    float: left;
    line-height: 0.82;
    margin: 0.08em 0.1em 0 -0.04em;
    color: var(--gold-dark);
    font-style: normal;
}

.gh-content h2 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-top: var(--sp-7);
    font-variation-settings: "opsz" 144, "SOFT" 30;
}

.gh-content h3 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin-top: var(--sp-6);
}

.gh-content h4 {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-top: var(--sp-5);
    color: var(--ink);
}

.gh-content a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: all var(--duration) var(--ease);
}

.gh-content a:hover {
    color: var(--gold-dark);
    text-decoration-color: var(--gold-dark);
}

.gh-content strong {
    font-weight: 600;
    color: var(--ink);
}

.gh-content em {
    font-style: italic;
}

.gh-content blockquote {
    margin: var(--sp-7) 0;
    padding: var(--sp-3) 0 var(--sp-3) var(--sp-5);
    border-left: 3px solid var(--gold);
    font-family: var(--font-display);
    font-style: italic;
    font-size: var(--text-xl);
    font-weight: 300;
    line-height: 1.5;
    color: var(--ink);
    font-variation-settings: "opsz" 144, "SOFT" 80;
}

.gh-content blockquote p { font-size: inherit; }

/* Pull quote — Koenig card "kg-card kg-callout-card" or blockquote.kg-blockquote-alt */
.gh-content .kg-callout-card,
.gh-content blockquote.kg-blockquote-alt {
    max-width: none;
    background: var(--cream);
    border-left: none;
    padding: var(--sp-6);
    margin: var(--sp-7) 0;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 300;
    line-height: 1.35;
    text-align: center;
    font-style: italic;
    color: var(--ink);
    position: relative;
}

.gh-content .kg-callout-card::before {
    content: "\201C";
    display: block;
    font-size: 4em;
    line-height: 0.5;
    color: var(--gold);
    margin-bottom: var(--sp-3);
    font-style: normal;
}

.gh-content ul,
.gh-content ol {
    padding-left: var(--sp-6);
}

.gh-content ul { list-style: none; }
.gh-content ul li {
    position: relative;
    padding-left: var(--sp-4);
    margin-bottom: var(--sp-3);
}
.gh-content ul li::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 0.85em;
    width: 6px;
    height: 1.5px;
    background: var(--gold-dark);
}

.gh-content ol {
    list-style: none;
    counter-reset: clinic-list;
}
.gh-content ol li {
    counter-increment: clinic-list;
    position: relative;
    padding-left: var(--sp-4);
    margin-bottom: var(--sp-3);
}
.gh-content ol li::before {
    content: counter(clinic-list, decimal-leading-zero);
    position: absolute;
    left: -36px;
    top: 0.15em;
    font-family: var(--font-mono);
    font-size: 0.75em;
    color: var(--gold-dark);
    font-weight: 500;
    letter-spacing: 0.05em;
}

.gh-content code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--cream);
    padding: 2px 6px;
    border-radius: 2px;
    color: var(--ink);
    border: 1px solid var(--line-soft);
}

.gh-content pre {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    background: var(--ink);
    color: var(--cream);
    padding: var(--sp-5);
    border-radius: 4px;
    overflow-x: auto;
    margin: var(--sp-6) 0;
    line-height: 1.55;
}

.gh-content pre code {
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

.gh-content hr {
    border: none;
    height: 1px;
    background: var(--line);
    margin: var(--sp-7) auto;
    max-width: 80px;
    position: relative;
}

.gh-content hr::before {
    content: "✚";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--paper);
    padding: 0 var(--sp-3);
    color: var(--gold);
    font-size: var(--text-sm);
}

/* Images / Koenig cards — break out of content width */
.gh-content .kg-card,
.gh-content figure {
    margin: var(--sp-7) 0;
}

.gh-content .kg-width-wide,
.gh-content .kg-image-card.kg-width-wide {
    max-width: min(var(--article-wide), calc(100vw - var(--sp-5) * 2));
    margin-left: 50%;
    transform: translateX(-50%);
}

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

.gh-content figcaption,
.gh-content .kg-card figcaption {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--stone);
    text-align: center;
    margin-top: var(--sp-3);
    font-style: italic;
    line-height: 1.5;
}

/* Tables */
.gh-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--sp-6) 0;
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
}

.gh-content th,
.gh-content td {
    padding: var(--sp-3) var(--sp-4);
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
}

.gh-content th {
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--text-2xs);
    letter-spacing: 0.1em;
    color: var(--gold-dark);
    border-bottom: 2px solid var(--gold);
}

/* Bookmark card */
.gh-content .kg-bookmark-card {
    border: 1px solid var(--line-soft);
    border-radius: 2px;
    overflow: hidden;
    transition: all var(--duration) var(--ease);
}

.gh-content .kg-bookmark-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-sm);
}

.gh-content .kg-bookmark-container {
    display: flex;
    color: inherit;
    text-decoration: none;
}

/* ========================================================================
   12. POST FOOTER
   ======================================================================== */

.post-footer {
    max-width: var(--article);
    margin: 0 auto;
    padding: var(--sp-6) var(--sp-5) var(--sp-8);
    border-top: 1px solid var(--line-soft);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    align-items: center;
    margin-bottom: var(--sp-6);
    font-size: var(--text-xs);
}

.post-tags-label {
    font-family: var(--font-body);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stone);
}

.post-tag-link {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 2px;
    font-size: var(--text-xs);
    color: var(--ink);
    text-decoration: none;
    transition: all var(--duration) var(--ease);
}

.post-tag-link:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.author-bio {
    display: flex;
    gap: var(--sp-5);
    padding: var(--sp-6);
    background: var(--cream);
    border-radius: 2px;
    margin-bottom: var(--sp-6);
    align-items: flex-start;
}

.author-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--paper);
    flex-shrink: 0;
}

.author-bio-text h4 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 500;
    margin-bottom: var(--sp-2);
}

.author-bio-label {
    display: block;
    font-family: var(--font-body);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: var(--sp-1);
}

.author-bio p {
    font-size: var(--text-sm);
    color: var(--ink-80);
    line-height: 1.6;
}

.post-compliance-note {
    padding: var(--sp-4) var(--sp-5);
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--gold);
    font-size: var(--text-xs);
    color: var(--stone);
    line-height: 1.6;
}

.post-compliance-note strong { color: var(--ink); }
.post-compliance-note a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); }

/* ========================================================================
   13. PAGE CONTENT
   ======================================================================== */

.page-content {
    padding-top: var(--sp-8);
}

.page-header {
    max-width: var(--article-wide);
    margin: 0 auto;
    padding: var(--sp-7) var(--sp-5) var(--sp-6);
    text-align: center;
    border-bottom: 1px solid var(--line-soft);
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.025em;
    font-variation-settings: "opsz" 144, "SOFT" 30;
    color: var(--ink);
}

.page-subtitle {
    font-family: var(--font-display);
    font-style: italic;
    font-size: var(--text-xl);
    color: var(--ink-80);
    max-width: 60ch;
    margin: var(--sp-4) auto 0;
    line-height: 1.4;
    font-weight: 300;
}

.page-feature-image {
    max-width: var(--container);
    margin: var(--sp-6) auto 0;
    padding: 0 var(--sp-5);
}

/* ========================================================================
   14. ARCHIVE (Tag / Author pages)
   ======================================================================== */

.archive-header {
    padding: var(--sp-9) var(--sp-5) var(--sp-7);
    text-align: center;
    background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
    border-bottom: 1px solid var(--line-soft);
}

.archive-header-inner {
    max-width: 720px;
    margin: 0 auto;
}

.archive-title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.028em;
    font-variation-settings: "opsz" 144, "SOFT" 30;
    margin: var(--sp-2) 0 var(--sp-4);
}

.archive-description {
    font-family: var(--font-display);
    font-style: italic;
    font-size: var(--text-lg);
    color: var(--ink-80);
    line-height: 1.5;
    font-weight: 300;
}

.archive-meta {
    margin-top: var(--sp-4);
    display: flex;
    justify-content: center;
    gap: var(--sp-3);
    align-items: center;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--stone);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
}

.author-archive .author-avatar-xl {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto var(--sp-5);
    border: 3px solid var(--paper);
    box-shadow: var(--shadow-md);
}

.author-link {
    display: inline-block;
    margin-top: var(--sp-4);
    font-size: var(--text-sm);
    color: var(--gold-dark);
    text-decoration: none;
    font-weight: 500;
}

.author-link:hover { color: var(--ink); }

/* ========================================================================
   15. NEWSLETTER CTA
   ======================================================================== */

.newsletter-cta {
    margin: var(--sp-8) auto;
    padding: 0 var(--sp-5);
    max-width: var(--container);
}

.newsletter-inner {
    background: var(--ink);
    color: var(--paper);
    padding: clamp(var(--sp-7), 8vw, var(--sp-9)) var(--sp-5);
    border-radius: 2px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter-inner::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.newsletter-mark {
    font-size: var(--text-3xl);
    color: var(--gold);
    font-weight: 300;
    margin-bottom: var(--sp-4);
    line-height: 1;
}

.newsletter-cta .eyebrow {
    color: var(--gold-soft);
}

.newsletter-title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 4.5vw, var(--text-4xl));
    font-weight: 300;
    line-height: 1.1;
    font-variation-settings: "opsz" 144, "SOFT" 30;
    color: var(--paper);
    margin-bottom: var(--sp-3);
}

.newsletter-sub {
    font-size: var(--text-base);
    color: rgba(246, 241, 228, 0.75);
    max-width: 52ch;
    margin: 0 auto var(--sp-5);
    line-height: 1.55;
}

.newsletter-form {
    display: flex;
    gap: var(--sp-2);
    max-width: 440px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.newsletter-input {
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    font-size: var(--text-sm);
    font-family: var(--font-body);
    background: rgba(246, 241, 228, 0.06);
    border: 1px solid rgba(246, 241, 228, 0.18);
    border-radius: 2px;
    color: var(--paper);
    transition: border-color var(--duration) var(--ease);
}

.newsletter-input::placeholder { color: rgba(246, 241, 228, 0.4); }
.newsletter-input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(168, 131, 61, 0.08);
}

.newsletter-submit {
    background: var(--gold);
    color: var(--ink);
    border-color: var(--gold);
}
.newsletter-submit:hover {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--paper);
}

.newsletter-note {
    margin-top: var(--sp-4);
    font-size: var(--text-xs);
    color: rgba(246, 241, 228, 0.55);
}

.newsletter-note a {
    color: var(--gold-soft);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.member-note {
    color: var(--gold-soft);
    font-size: var(--text-base);
    font-family: var(--font-display);
    font-style: italic;
}

/* ========================================================================
   16. RELATED POSTS
   ======================================================================== */

.related-posts {
    padding: var(--sp-7) var(--sp-5);
    max-width: var(--container);
    margin: 0 auto;
    background: var(--cream);
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

.related-posts .section-header {
    padding-top: var(--sp-5);
}

.related-posts .post-card {
    background: var(--paper);
}

/* ========================================================================
   17. ERROR PAGE
   ======================================================================== */

.error-page {
    padding: var(--sp-10) var(--sp-5);
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-inner {
    max-width: 560px;
}

.error-title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin: var(--sp-4) 0 var(--sp-4);
}

.error-description {
    font-size: var(--text-base);
    color: var(--ink-80);
    margin-bottom: var(--sp-6);
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: var(--sp-3);
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================================================
   18. PAGINATION
   ======================================================================== */

.pagination {
    margin-top: var(--sp-7);
    padding-top: var(--sp-6);
    border-top: 1px solid var(--line-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-size: var(--text-sm);
}

.pagination a {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-4);
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 2px;
    font-weight: 500;
    transition: all var(--duration) var(--ease);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.pagination a:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.pagination .page-number {
    color: var(--stone);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ========================================================================
   19. SITE FOOTER
   ======================================================================== */

.site-footer {
    background: var(--ink);
    color: var(--paper);
    margin-top: var(--sp-9);
}

.footer-main {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--sp-8) var(--sp-5);
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: var(--sp-7);
}

@media (max-width: 900px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-6);
    }
    .footer-brand {
        grid-column: 1 / -1;
        margin-bottom: var(--sp-3);
    }
}

@media (max-width: 520px) {
    .footer-main { grid-template-columns: 1fr; }
}

.footer-wordmark {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 400;
    font-variation-settings: "opsz" 144, "SOFT" 50;
    letter-spacing: -0.02em;
    color: var(--paper);
    margin-bottom: var(--sp-3);
}

.footer-tagline {
    font-size: var(--text-sm);
    color: rgba(246, 241, 228, 0.7);
    line-height: 1.6;
    margin-bottom: var(--sp-4);
    max-width: 40ch;
}

.footer-mission {
    font-family: var(--font-display);
    font-style: italic;
    font-size: var(--text-sm);
    color: var(--gold-soft);
    padding-left: var(--sp-3);
    border-left: 2px solid var(--gold);
    line-height: 1.5;
    max-width: 36ch;
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-soft);
    margin-bottom: var(--sp-4);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.footer-col a {
    font-size: var(--text-sm);
    color: rgba(246, 241, 228, 0.85);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
}

.footer-col a:hover { color: var(--gold-soft); }

.footer-join p {
    font-size: var(--text-sm);
    color: rgba(246, 241, 228, 0.7);
    margin-bottom: var(--sp-4);
    line-height: 1.5;
}

.footer-join .btn-primary {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
}

.footer-join .btn-primary:hover {
    background: var(--paper);
    border-color: var(--paper);
    color: var(--ink);
}

/* Disclaimer strip */
.site-disclaimer {
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(246, 241, 228, 0.08);
}

.site-disclaimer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--sp-5);
    font-size: var(--text-xs);
    line-height: 1.6;
    color: rgba(246, 241, 228, 0.65);
}

.site-disclaimer-inner p + p { margin-top: var(--sp-3); }
.site-disclaimer strong { color: var(--gold-soft); }
.site-disclaimer a { color: var(--gold-soft); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

.footer-credit {
    padding-top: var(--sp-3);
    border-top: 1px solid rgba(246, 241, 228, 0.08);
    text-align: center;
    color: rgba(246, 241, 228, 0.45);
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ========================================================================
   20. GHOST PORTAL (member modal styling)
   ======================================================================== */

:root {
    --ghost-accent-color: var(--ink);
}

/* ========================================================================
   21. ANIMATIONS — subtle entrance effects
   ======================================================================== */

@media (prefers-reduced-motion: no-preference) {
    .hero-title,
    .hero-subtitle,
    .hero-actions {
        animation: clinicFadeUp 0.8s var(--ease) backwards;
    }
    .hero-subtitle { animation-delay: 0.1s; }
    .hero-actions  { animation-delay: 0.2s; }
    .hero-rule     { animation: clinicFadeUp 0.8s var(--ease) 0.35s backwards; }
}

@keyframes clinicFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========================================================================
   22. RESPONSIVE REFINEMENTS
   ======================================================================== */

@media (max-width: 720px) {
    .post-content,
    .page-body {
        font-size: var(--text-base);
        padding: var(--sp-6) var(--sp-5);
    }

    .gh-content p { font-size: var(--text-base); }

    .has-drop-cap > p:first-of-type::first-letter {
        font-size: 4.4em;
    }

    .featured-post-link {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .hero-actions .btn,
    .error-actions .btn {
        width: 100%;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-submit {
        width: 100%;
    }
}

/* Print styles — for investors who still print */
@media print {
    .site-header, .site-footer, .newsletter-cta, .related-posts, .post-footer { display: none; }
    .post-content { font-size: 11pt; max-width: 100%; }
    body { background: white; color: black; }
}
