/*
 * VC20 for johncowan.io
 * A research-led Ghost theme for Venture Capital 2.0.
 */

:root {
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

    --bg: #f5efe3;
    --bg-alt: #ede3d2;
    --surface: #fffaf1;
    --surface-strong: #151512;
    --ink: #12120f;
    --ink-soft: #3e3a32;
    --muted: #6f6658;
    --line: rgba(18, 18, 15, 0.14);
    --line-strong: rgba(18, 18, 15, 0.28);
    /* Cover-sampled palette from Venture Capital 2.0 jacket art. */
    --accent: #f2520f;
    --accent-rgb: 242, 82, 15;
    --accent-hot: #f68e10;
    --accent-deep: #8f3c22;
    --accent-ink: #11130b;
    --warning: #b14421;
    --members: #8f3c22;
    --page-bg: radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.2), transparent 24rem), linear-gradient(180deg, #f9f3e8 0%, var(--bg) 42%, #efe6d6 100%);
    --header-bg: rgba(245, 239, 227, 0.84);
    --control-bg: rgba(255, 250, 241, 0.75);
    --kbd-bg: #efe5d3;
    --card-bg: rgba(255, 250, 241, 0.84);
    --card-bg-soft: rgba(255, 250, 241, 0.72);
    --chip-bg: rgba(255, 250, 241, 0.68);
    --hero-grid-line: rgba(18, 18, 15, 0.045);
    --soft-shadow: rgba(18, 18, 15, 0.13);
    --shadow: 0 22px 70px rgba(18, 18, 15, 0.12);
    --radius: 24px;
    --radius-sm: 14px;
    --max-width: 1180px;
    --content-width: 760px;
    --wide-width: 1040px;
}


html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #11110f;
    --bg-alt: #191713;
    --surface: #1d1a16;
    --surface-strong: #0a0a09;
    --ink: #fff7ea;
    --ink-soft: #e1d4c1;
    --muted: #ac9d89;
    --line: rgba(255, 250, 241, 0.14);
    --line-strong: rgba(255, 250, 241, 0.3);
    --page-bg: radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.24), transparent 26rem), linear-gradient(180deg, #11110f 0%, #14120f 46%, #0d0d0b 100%);
    --header-bg: rgba(17, 17, 15, 0.86);
    --control-bg: rgba(29, 26, 22, 0.75);
    --kbd-bg: rgba(255, 250, 241, 0.08);
    --card-bg: rgba(29, 26, 22, 0.86);
    --card-bg-soft: rgba(29, 26, 22, 0.72);
    --chip-bg: rgba(29, 26, 22, 0.78);
    --hero-grid-line: rgba(255, 250, 241, 0.055);
    --soft-shadow: rgba(0, 0, 0, 0.28);
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--page-bg);
    font-family: var(--font-sans);
    font-size: 1.7rem;
    line-height: 1.62;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.nav-open {
    overflow: hidden;
}

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--ink-soft);
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    color: inherit;
}

.container {
    width: min(calc(100% - 4rem), var(--max-width));
    margin-inline: auto;
}

.container.narrow {
    width: min(calc(100% - 4rem), 880px);
}

.visually-hidden,
.skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link:focus {
    position: fixed;
    top: 1.6rem;
    left: 1.6rem;
    z-index: 999;
    padding: 1rem 1.4rem;
    color: #fff;
    background: var(--ink);
    border-radius: 999px;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    width: 100%;
    height: 4px;
    background: transparent;
}

.reading-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.55);
}

.site-frame {
    min-height: 100vh;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: var(--header-bg);
    backdrop-filter: blur(22px);
}

.header-inner {
    display: grid;
    grid-template-columns: minmax(18rem, auto) 1fr auto;
    gap: 2rem;
    align-items: center;
    min-height: 7.8rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 1.1rem;
    color: var(--ink);
    text-decoration: none;
}

.brand-logo {
    max-width: 18rem;
    max-height: 4.8rem;
    object-fit: contain;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 4.2rem;
    height: 4.2rem;
    color: var(--accent-ink);
    background: var(--accent);
    border: 1px solid var(--ink);
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-copy {
    display: grid;
    gap: 0.1rem;
}

.brand-title {
    font-family: var(--font-serif);
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.035em;
}

.brand-subtitle {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-nav {
    justify-self: center;
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list a {
    display: inline-flex;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.nav-list a:hover,
.nav-current a {
    color: var(--ink);
    background: var(--chip-bg);
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: end;
}

.search-trigger {
    display: inline-flex;
    gap: 0.7rem;
    align-items: center;
    height: 3.8rem;
    padding: 0 1rem;
    color: var(--muted);
    background: var(--control-bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
}

.search-trigger:hover {
    color: var(--ink);
    border-color: var(--line-strong);
}

.theme-toggle {
    display: inline-flex;
    gap: 0.7rem;
    align-items: center;
    height: 3.8rem;
    padding: 0 1rem 0 0.7rem;
    color: var(--muted);
    background: var(--control-bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
}

.theme-toggle:hover {
    color: var(--ink);
    border-color: var(--line-strong);
}

.theme-toggle-track {
    position: relative;
    display: inline-flex;
    width: 3.4rem;
    height: 2rem;
    padding: 0.2rem;
    background: var(--ink);
    border-radius: 999px;
}

.theme-toggle-thumb {
    width: 1.6rem;
    height: 1.6rem;
    background: var(--accent);
    border: 1px solid var(--accent-ink);
    border-radius: 50%;
    box-shadow: 0 2px 8px var(--soft-shadow);
    transition: transform 180ms ease;
}

html[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(1.4rem);
}

.theme-toggle-label {
    font-size: 1.25rem;
    font-weight: 800;
}

.search-icon {
    width: 1.3rem;
    height: 1.3rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
}

.search-icon::after {
    content: "";
    position: absolute;
    right: -0.55rem;
    bottom: -0.55rem;
    width: 0.65rem;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
}

.search-label,
.search-trigger kbd,
.signin-link {
    font-size: 1.25rem;
    font-weight: 800;
}

.search-trigger kbd {
    padding: 0.15rem 0.45rem;
    color: var(--ink-soft);
    background: var(--kbd-bg);
    border: 1px solid var(--line);
    border-radius: 0.6rem;
    font-family: var(--font-mono);
}

.signin-link {
    color: var(--ink-soft);
    text-decoration: none;
}

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

.nav-toggle {
    display: none;
    width: 4.3rem;
    height: 4.3rem;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
}

.nav-toggle-line {
    display: block;
    width: 1.8rem;
    height: 2px;
    margin: 0.35rem auto;
    background: currentColor;
}

/* Buttons and labels */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 4.6rem;
    padding: 0 1.6rem;
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-size: 1.35rem;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

.button-primary {
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hot) 100%);
    box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.25);
}

.button-primary:hover {
    color: var(--accent-ink);
    box-shadow: 0 14px 34px rgba(var(--accent-rgb), 0.32);
}

.button-secondary {
    color: var(--ink);
    background: var(--surface);
}

.button-small {
    min-height: 3.8rem;
    padding: 0 1.2rem;
    font-size: 1.25rem;
}

.button-block {
    width: 100%;
}

.text-link {
    display: inline-flex;
    color: var(--ink);
    font-size: 1.45rem;
    font-weight: 850;
    text-decoration: none;
}

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

.section-kicker,
.post-card-meta,
.eyebrow-row,
.metric,
.tag-pill,
.access-pill {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.115em;
    text-transform: uppercase;
}

.section-kicker {
    margin: 0 0 1.2rem;
    color: var(--muted);
}

.tag-pill,
.access-pill {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    text-decoration: none;
}

.tag-pill {
    color: var(--ink);
    background: var(--chip-bg);
}

.access-pill {
    color: #fffaf1;
    border-color: transparent;
}

.access-paid {
    background: var(--warning);
}

.access-members {
    background: var(--members);
}

/* Home */

.home-hero {
    position: relative;
    overflow: clip;
    padding: clamp(6.5rem, 10vw, 14rem) 0 5rem;
    border-bottom: 1px solid var(--line);
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--hero-grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--hero-grid-line) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
    pointer-events: none;
}

.home-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(34rem, 0.8fr);
    gap: clamp(3rem, 6vw, 7rem);
    align-items: end;
}

.home-hero h1 {
    max-width: 92rem;
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(5rem, 10.5vw, 13.4rem);
    font-weight: 700;
    line-height: 0.88;
    letter-spacing: -0.075em;
}

.hero-deck {
    max-width: 74rem;
    margin: 2.4rem 0 0;
    color: var(--ink-soft);
    font-size: clamp(1.9rem, 2.3vw, 2.7rem);
    line-height: 1.34;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 3.2rem;
}

.hero-brief {
    padding: 2.2rem;
    color: #fff7ea;
    background: var(--surface-strong);
    border: 1px solid rgba(255, 250, 241, 0.15);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-brief-topline {
    padding-bottom: 1.2rem;
    margin-bottom: 1.4rem;
    color: var(--accent);
    border-bottom: 1px solid rgba(255, 250, 241, 0.16);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-brief ul {
    display: grid;
    gap: 1.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-brief li {
    display: grid;
    gap: 0.2rem;
}

.hero-brief strong {
    font-family: var(--font-serif);
    font-size: 2rem;
    line-height: 1.1;
}

.hero-brief span {
    color: rgba(255, 250, 241, 0.72);
    font-size: 1.35rem;
    line-height: 1.45;
}

.insight-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 2.2rem;
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.insight-strip > div {
    min-height: 19rem;
    padding: 2.2rem;
    background: var(--card-bg-soft);
}

.metric {
    color: var(--warning);
}

.insight-strip h2 {
    margin: 2.6rem 0 0.7rem;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.insight-strip p {
    margin: 0;
    color: var(--muted);
    font-size: 1.45rem;
}

.section-block {
    padding: clamp(5rem, 7vw, 8rem) 0;
}

.section-heading {
    display: flex;
    gap: 2rem;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 2.4rem;
    padding-bottom: 1.6rem;
    border-bottom: 1px solid var(--line);
}

.section-heading h2,
.topic-panel h2,
.subscribe-cta h2 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(3rem, 5vw, 5.6rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.featured-stack {
    display: grid;
    gap: 1.6rem;
}

.featured-card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(31rem, 0.95fr);
    gap: 1px;
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.featured-card-copy,
.featured-card-media {
    background: var(--card-bg);
}

.featured-card-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 36rem;
    padding: clamp(2.2rem, 4vw, 4.2rem);
}

.eyebrow-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    color: var(--muted);
}

.featured-card h2 {
    max-width: 73rem;
    margin: 2rem 0 1.2rem;
    font-family: var(--font-serif);
    font-size: clamp(3.2rem, 5vw, 6.4rem);
    line-height: 0.95;
    letter-spacing: -0.065em;
}

.featured-card h2 a,
.post-card-title a,
.footer-title,
.author-box a {
    text-decoration: none;
}

.featured-card p {
    max-width: 62rem;
    margin: 0 0 2rem;
    color: var(--ink-soft);
    font-size: 1.78rem;
}

.featured-card-media {
    min-height: 34rem;
}

.featured-card-media img,
.post-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.9) contrast(1.04);
}

.topic-panel {
    display: grid;
    grid-template-columns: minmax(24rem, 0.9fr) minmax(0, 1.1fr);
    gap: 3rem;
    align-items: start;
    padding: clamp(3rem, 5vw, 5rem);
    background: var(--surface-strong);
    border-radius: var(--radius);
    color: #fff7ea;
    box-shadow: var(--shadow);
}

.topic-panel .section-kicker {
    color: var(--accent);
}

.topic-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.topic-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.5rem;
    color: #fff7ea;
    background: rgba(255, 250, 241, 0.08);
    border: 1px solid rgba(255, 250, 241, 0.14);
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.topic-chip:hover {
    color: var(--accent);
    background: rgba(255, 250, 241, 0.12);
}

.topic-chip span {
    font-weight: 850;
}

.topic-chip small {
    color: rgba(255, 250, 241, 0.56);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    text-transform: uppercase;
}

.post-feed {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.post-feed-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.post-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: 0 18px 42px var(--soft-shadow);
}

.post-card-media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-alt);
}

.post-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.7rem;
}

.post-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    min-height: 2.5rem;
    color: var(--muted);
}

.post-card-title {
    margin: 1.4rem 0 0.8rem;
    font-family: var(--font-serif);
    font-size: clamp(2.3rem, 3vw, 3.3rem);
    line-height: 1;
    letter-spacing: -0.052em;
}

.post-card-excerpt {
    margin: 0;
    color: var(--ink-soft);
    font-size: 1.5rem;
    line-height: 1.5;
}

.post-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 1.8rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.post-card-no-image .post-card-body {
    min-height: 30rem;
}

/* Archives */

.archive-hero {
    padding: clamp(5rem, 8vw, 9rem) 0;
    border-bottom: 1px solid var(--line);
}

.archive-hero h1 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(5rem, 8vw, 10rem);
    line-height: 0.88;
    letter-spacing: -0.075em;
}

.archive-hero p {
    max-width: 78rem;
    margin: 1.8rem 0 0;
    color: var(--ink-soft);
    font-size: clamp(1.8rem, 2vw, 2.3rem);
    line-height: 1.35;
}

.archive-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(24rem, 36rem);
    gap: 4rem;
    align-items: center;
}

.archive-image {
    width: 100%;
    aspect-ratio: 1 / 0.8;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.archive-avatar {
    aspect-ratio: 1;
    border-radius: 50%;
}

.archive-count {
    color: var(--muted) !important;
    font-family: var(--font-mono);
    font-size: 1.2rem !important;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Article */

.article-header {
    padding: clamp(5rem, 8vw, 10rem) 0 3rem;
    border-bottom: 1px solid var(--line);
}

.article-header-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(28rem, 36rem);
    gap: 4rem;
    align-items: end;
}

.article-header h1 {
    max-width: 96rem;
    margin: 2rem 0 0;
    font-family: var(--font-serif);
    font-size: clamp(4.4rem, 8vw, 10rem);
    line-height: 0.92;
    letter-spacing: -0.075em;
}

.article-excerpt {
    max-width: 76rem;
    margin: 2rem 0 0;
    color: var(--ink-soft);
    font-size: clamp(1.9rem, 2.2vw, 2.6rem);
    line-height: 1.34;
}

.article-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 2rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.article-byline a {
    text-decoration: none;
}

.article-brief-card {
    padding: 2rem;
    color: #fff7ea;
    background: var(--surface-strong);
    border-radius: var(--radius);
}

.article-brief-card .section-kicker {
    color: var(--accent);
}

.article-brief-card p:not(.section-kicker) {
    margin: 0 0 1.6rem;
    color: rgba(255, 250, 241, 0.76);
    font-size: 1.45rem;
}

.article-feature-image {
    margin-top: 3rem;
}

.article-feature-image img {
    width: 100%;
    max-height: 72rem;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.article-feature-image figcaption {
    max-width: var(--content-width);
    margin: 1rem auto 0;
    color: var(--muted);
    font-size: 1.3rem;
    text-align: center;
}

.article-body-wrap {
    display: grid;
    grid-template-columns: minmax(16rem, 22rem) minmax(0, var(--content-width)) minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
    padding: clamp(4rem, 6vw, 7rem) 0;
}

.has-wide-content .article-body-wrap {
    grid-template-columns: minmax(16rem, 22rem) minmax(0, var(--wide-width)) minmax(0, 1fr);
}

.page-body-wrap {
    display: block;
}

.toc {
    position: sticky;
    top: 10rem;
    grid-column: 1;
    max-height: calc(100vh - 12rem);
    padding: 1.4rem 0;
    overflow: auto;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.toc:empty,
.toc.is-empty {
    display: none;
}

.toc nav {
    display: grid;
    gap: 0.7rem;
}

.toc a {
    display: block;
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1.3;
    text-decoration: none;
}

.toc a:hover,
.toc a.is-active {
    color: var(--ink);
}

.toc a[data-level="3"] {
    padding-left: 1.3rem;
}

.gh-content {
    grid-column: 2;
    min-width: 0;
    font-family: var(--font-serif);
    font-size: clamp(1.9rem, 2.2vw, 2.15rem);
    line-height: 1.72;
}

.gh-content > *:first-child {
    margin-top: 0;
}

.gh-content > *:last-child {
    margin-bottom: 0;
}

.gh-content p,
.gh-content ul,
.gh-content ol,
.gh-content blockquote,
.gh-content pre,
.gh-content table,
.gh-content figure,
.gh-content hr,
.gh-content .kg-card {
    margin-top: 0;
    margin-bottom: 3rem;
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
    margin: 5.4rem 0 1.6rem;
    color: var(--ink);
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.05em;
}

.gh-content h2 {
    font-size: clamp(3.5rem, 5vw, 5.6rem);
}

.gh-content h3 {
    font-size: clamp(2.7rem, 3.8vw, 3.8rem);
}

.gh-content h4 {
    font-size: 2.4rem;
}

.gh-content a {
    text-decoration-color: rgba(199, 89, 47, 0.55);
}

.gh-content a:hover {
    text-decoration-color: currentColor;
}

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

.gh-content blockquote {
    margin-left: 0;
    padding: 0.3rem 0 0.3rem 2rem;
    color: var(--ink-soft);
    border-left: 5px solid var(--accent);
    font-size: 2.35rem;
    line-height: 1.45;
}

.gh-content ul,
.gh-content ol {
    padding-left: 2.4rem;
}

.gh-content li + li {
    margin-top: 0.8rem;
}

.gh-content code {
    padding: 0.16em 0.38em;
    background: var(--chip-bg);
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.78em;
}

.gh-content pre {
    overflow-x: auto;
    padding: 1.8rem;
    color: #fff7ea;
    background: #151512;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 1.35rem;
    line-height: 1.6;
}

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

.gh-content hr {
    border: 0;
    border-top: 1px solid var(--line-strong);
}

.gh-content table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: 1.45rem;
}

.gh-content th,
.gh-content td {
    padding: 1rem;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.gh-content th {
    background: var(--chip-bg);
    font-weight: 850;
}

.gh-content figcaption {
    margin-top: 0.8rem;
    color: var(--muted);
    font-family: var(--font-sans);
    font-size: 1.3rem;
    line-height: 1.4;
    text-align: center;
}

/* Koenig / Ghost editor cards */

.kg-card img {
    margin-inline: auto;
    border-radius: var(--radius-sm);
}

.kg-width-wide {
    width: min(var(--wide-width), calc(100vw - 4rem));
    margin-left: 50%;
    transform: translateX(-50%);
}

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

.kg-width-full img {
    width: 100%;
    border-radius: 0;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kg-gallery-row {
    display: flex;
    gap: 1rem;
}

.kg-gallery-image {
    flex: 1;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-bookmark-card a.kg-bookmark-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: 1px;
    overflow: hidden;
    color: inherit;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    text-decoration: none;
}

.kg-bookmark-content {
    padding: 1.6rem;
    background: var(--card-bg);
}

.kg-bookmark-title {
    font-weight: 850;
    line-height: 1.25;
}

.kg-bookmark-description,
.kg-bookmark-metadata {
    margin-top: 0.7rem;
    color: var(--muted);
    font-size: 1.35rem;
    line-height: 1.35;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.kg-button-card .kg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 4.8rem;
    padding: 0 1.7rem;
    color: var(--accent-ink) !important;
    background: var(--accent) !important;
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 1.35rem;
    font-weight: 850;
    text-decoration: none;
}

.kg-callout-card {
    padding: 1.8rem;
    background: rgba(var(--accent-rgb), 0.16);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
}

.kg-toggle-card,
.kg-product-card,
.kg-file-card {
    padding: 1.8rem;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
}

.kg-toggle-heading-text,
.kg-product-card-title,
.kg-file-card-title {
    font-weight: 850;
}

.kg-header-card {
    border-radius: var(--radius);
    overflow: hidden;
}

.kg-signup-card,
.kg-audio-card,
.kg-video-card {
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.article-footer {
    display: grid;
    gap: 2rem;
    padding-bottom: 4rem;
}

.article-tags,
.share-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
}

.article-tags span,
.share-box span {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.article-tags a,
.share-box a,
.copy-link {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    padding: 0 0.9rem;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
}

.copy-link {
    cursor: pointer;
}

.author-box {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: 1.7rem;
    align-items: center;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.author-avatar {
    display: grid;
    place-items: center;
    width: 8rem;
    height: 8rem;
    overflow: hidden;
    color: var(--accent-ink);
    background: var(--accent);
    border: 1px solid var(--ink);
    border-radius: 50%;
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 700;
    text-decoration: none;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-box h2 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 3rem;
    line-height: 1;
    letter-spacing: -0.045em;
}

.author-box p:not(.section-kicker) {
    margin: 0.7rem 0 0;
    color: var(--ink-soft);
    font-size: 1.45rem;
}

.comments-wrap {
    max-width: var(--content-width);
    padding-bottom: 4rem;
}

.subscribe-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
    margin: 2rem 0 clamp(5rem, 8vw, 8rem);
    padding: clamp(2.4rem, 4.5vw, 4rem);
    color: #fff7ea;
    background: var(--surface-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.subscribe-cta .section-kicker {
    color: var(--accent);
}

.subscribe-cta p:not(.section-kicker) {
    max-width: 68rem;
    margin: 1.2rem 0 0;
    color: rgba(255, 250, 241, 0.74);
}

.subscribe-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: end;
}

/* Pagination */

.pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.pagination div:last-child {
    text-align: right;
}

.pagination-link,
.pagination-status {
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.pagination-link.is-disabled {
    color: rgba(111, 102, 88, 0.5);
}

/* Footer */

.site-footer {
    color: #fff7ea;
    background: #11110f;
    border-top: 1px solid rgba(255, 250, 241, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(26rem, 1.3fr) repeat(3, minmax(16rem, 0.75fr));
    gap: 3rem;
    padding: clamp(4rem, 7vw, 7rem) 0 3rem;
}

.footer-title {
    display: inline-flex;
    color: #fff7ea;
    font-family: var(--font-serif);
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.055em;
}

.footer-brand p,
.footer-subscribe p {
    max-width: 36rem;
    color: rgba(255, 250, 241, 0.68);
    font-size: 1.45rem;
}

.footer-rebel {
    color: var(--accent) !important;
    font-family: var(--font-mono);
    font-size: 1.1rem !important;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-footer h2 {
    margin: 0 0 1.2rem;
    color: rgba(255, 250, 241, 0.52);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 0.7rem;
}

.site-footer a {
    color: #fff7ea;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent);
}

.nav-list-footer {
    display: grid;
    gap: 0.4rem;
    justify-content: start;
}

.nav-list-footer a {
    padding: 0;
    color: #fff7ea;
    background: transparent !important;
    border-radius: 0;
}

.footer-bottom {
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    padding: 1.8rem 0;
    border-top: 1px solid rgba(255, 250, 241, 0.12);
    color: rgba(255, 250, 241, 0.55);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-bottom p {
    margin: 0;
}

/* Error */

.error-page {
    min-height: 62vh;
    display: grid;
    place-items: center;
    padding: 8rem 0;
    text-align: center;
}

.error-page h1 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(5rem, 8vw, 9rem);
    line-height: 0.9;
    letter-spacing: -0.075em;
}

.error-page p {
    margin: 2rem auto;
    max-width: 62rem;
    color: var(--ink-soft);
    font-size: 1.9rem;
}

/* Portal refinements */

.gh-portal-triggerbtn-iframe {
    z-index: 95 !important;
}

/* Responsive */

@media (max-width: 1080px) {
    .header-inner {
        grid-template-columns: auto auto;
    }

    .site-nav {
        order: 3;
        grid-column: 1 / -1;
        justify-self: stretch;
        padding-bottom: 1.2rem;
    }

    .nav-list {
        justify-content: start;
    }

    .home-hero-grid,
    .featured-card,
    .topic-panel,
    .article-header-grid,
    .archive-grid,
    .subscribe-cta {
        grid-template-columns: 1fr;
    }

    .article-body-wrap,
    .has-wide-content .article-body-wrap {
        grid-template-columns: 1fr;
    }

    .toc {
        position: static;
        max-height: none;
        grid-column: 1;
    }

    .gh-content {
        grid-column: 1;
        max-width: var(--content-width);
    }

    .has-wide-content .gh-content {
        max-width: var(--wide-width);
    }

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

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

@media (max-width: 760px) {
    body {
        font-size: 1.6rem;
    }

    .container,
    .container.narrow {
        width: min(calc(100% - 2.8rem), var(--max-width));
    }

    .site-header {
        position: sticky;
    }

    .header-inner {
        min-height: 7rem;
        grid-template-columns: 1fr auto;
        gap: 1rem;
    }

    .brand-subtitle,
    .search-label,
    .search-trigger kbd,
    .theme-toggle-label,
    .signin-link {
        display: none;
    }

    .nav-toggle {
        display: block;
        order: 2;
    }

    .header-actions {
        grid-column: 1 / -1;
        justify-content: start;
        order: 4;
        display: none;
    }

    .site-nav {
        display: none;
        order: 3;
        padding: 1rem 0 1.8rem;
    }

    body.nav-open .site-nav,
    body.nav-open .header-actions {
        display: flex;
    }

    body.nav-open .site-nav {
        display: block;
    }

    .nav-list {
        display: grid;
        justify-content: stretch;
    }

    .nav-list a {
        justify-content: space-between;
        padding: 1.1rem 0;
        border-bottom: 1px solid var(--line);
        border-radius: 0;
        font-size: 1.6rem;
    }

    .home-hero {
        padding-top: 5.2rem;
    }

    .home-hero h1,
    .article-header h1,
    .archive-hero h1 {
        letter-spacing: -0.06em;
    }

    .hero-actions,
    .subscribe-cta-actions {
        display: grid;
        justify-content: stretch;
    }

    .hero-actions .button,
    .subscribe-cta-actions .button {
        width: 100%;
    }

    .insight-strip,
    .post-feed,
    .post-feed-three,
    .topic-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: block;
    }

    .section-heading .text-link {
        margin-top: 1.5rem;
    }

    .featured-card-copy {
        min-height: auto;
    }

    .featured-card-media {
        min-height: 24rem;
        order: -1;
    }

    .article-brief-card {
        display: none;
    }

    .gh-content {
        max-width: 100%;
    }

    .kg-bookmark-card a.kg-bookmark-container {
        grid-template-columns: 1fr;
    }

    .kg-bookmark-thumbnail {
        min-height: 18rem;
    }

    .kg-width-wide,
    .kg-width-full {
        width: calc(100vw - 2.8rem);
    }

    .author-box {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        display: grid;
    }

    .pagination {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .pagination div:last-child {
        text-align: center;
    }
}

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