/* ==========================================================================
   LWIL Ghost Theme — screen.css
   Last Week in Law brand theme for Ghost CMS
   Plain CSS, no build step required
   ========================================================================== */


/* 1. Reset
   ========================================================================== */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    font-size: 100%;
    vertical-align: baseline;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
img {
    max-width: 100%;
}

/* NOTE: Ghost card_assets CSS assumes html { font-size: 62.5% } (1rem = 10px).
   We MUST keep this convention for Ghost's injected card styles to render correctly. */
html {
    font-size: 62.5%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    /* Override rem-based sizing for body text back to normal */
    font-size: 1.6rem; /* 16px */
    line-height: 1.6;
}

::selection {
    background: #e0b636;
    color: #2c2c2c;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.15;
}

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


/* 2. Custom Properties
   ========================================================================== */

:root {
    /* Brand colors */
    --color-bg: #f4eedf;
    --color-fg: #2c2c2c;
    --color-primary: #e0b636;
    --color-primary-fg: #2c2c2c;
    --color-card: #ffffff;
    --color-card-fg: #0a0a0a;
    --color-muted: #f5f5f5;
    --color-muted-fg: #737373;
    --color-neutral: #2c2c2c;
    --color-neutral-fg: #f4eedf;
    --color-border: #d5cfc0;
    --color-destructive: #e7000b;

    /* Typography */
    --font-sans: "gamay-variable", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "Abridge", sans-serif;

    /* Layout */
    --content-width: 720px;
    --container-width: 1200px;
}


/* 3. @font-face — Abridge
   ========================================================================== */

@font-face {
    font-family: 'Abridge';
    src: url('../fonts/abridge-thin-webfont.woff2') format('woff2'),
         url('../fonts/abridge-thin-webfont.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Abridge';
    src: url('../fonts/abridge-extralight-webfont.woff2') format('woff2'),
         url('../fonts/abridge-extralight-webfont.woff') format('woff');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Abridge';
    src: url('../fonts/abridge-light-webfont.woff2') format('woff2'),
         url('../fonts/abridge-light-webfont.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Abridge';
    src: url('../fonts/abridge-regular-webfont.woff2') format('woff2'),
         url('../fonts/abridge-regular-webfont.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Abridge';
    src: url('../fonts/abridge-medium-webfont.woff2') format('woff2'),
         url('../fonts/abridge-medium-webfont.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Abridge';
    src: url('../fonts/abridge-bold-webfont.woff2') format('woff2'),
         url('../fonts/abridge-bold-webfont.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}


/* 4. Base Typography
   ========================================================================== */

body {
    background-color: var(--color-bg);
    color: var(--color-fg);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* 5. Layout
   ========================================================================== */

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

.site-content {
    flex-grow: 1;
}

.outer {
    position: relative;
    padding: 0 max(4vmin, 20px);
}

.inner {
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
}


/* 6. Site Header
   ========================================================================== */

.gh-head {
    padding-top: 12px;
    padding-bottom: 12px;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.gh-head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.gh-head-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.gh-head-logo {
    display: flex;
    align-items: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 2.2rem;
    letter-spacing: 0.02em;
    color: var(--color-fg);
    text-transform: uppercase;
}

.gh-head-logo img {
    max-height: 40px;
}

.gh-head-logo.no-image {
    font-family: var(--font-display);
}

/* Actions area — nav + search + member buttons, all on the right */
.gh-head-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.gh-head-menu {
    display: flex;
    align-items: center;
}

.gh-head-menu .nav {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gh-head-menu .nav li a {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--color-fg);
    transition: opacity 0.2s;
}

.gh-head-menu .nav li a:hover {
    opacity: 0.7;
}

.gh-head-link {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--color-fg);
    transition: opacity 0.2s;
}

.gh-head-link:hover {
    opacity: 0.7;
}

.gh-head-button {
    display: inline-block;
    padding: 8px 16px;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--color-neutral-fg);
    background: var(--color-neutral);
    border: 0;
    border-radius: 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gh-head-button:hover {
    opacity: 0.9;
}

.gh-head-members {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Burger (mobile) */
.gh-burger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
}

.gh-burger::before,
.gh-burger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--color-fg);
    transition: 0.2s;
}

.gh-burger::before {
    top: 8px;
}

.gh-burger::after {
    bottom: 8px;
}

/* Mobile Navigation */
@media (max-width: 767px) {
    .gh-head-actions {
        gap: 12px;
    }

    .gh-head-menu,
    .gh-head-members {
        display: none;
    }

    .gh-burger {
        display: block;
    }

    body.gh-head-open .gh-head {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body.gh-head-open .gh-head-inner {
        flex-direction: column;
        gap: 32px;
    }

    body.gh-head-open .gh-head-menu {
        display: flex;
    }

    body.gh-head-open .gh-head-menu .nav {
        flex-direction: column;
        gap: 16px;
    }

    body.gh-head-open .gh-head-menu .nav li a {
        font-size: 2.4rem;
    }

    body.gh-head-open .gh-head-members {
        display: flex;
    }

}


/* 7. Site Description / Homepage Hero
   ========================================================================== */

.site-header-content {
    padding-top: max(5vmin, 40px);
    padding-bottom: max(5vmin, 40px);
    border-bottom: 1px solid var(--color-border);
}

.site-header-content .inner {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
}

.site-header-content .inner > * {
    grid-column: 1;
}

@media (max-width: 1023px) {
    .site-header-content .inner {
        grid-template-columns: 1fr;
    }
}

.site-description {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-fg);
    max-width: 720px;
    margin: 0 0 16px;
    font-family: var(--font-sans);
}

.site-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    color: var(--color-muted-fg);
}

.site-byline-author {
    font-weight: 600;
    color: var(--color-fg);
}

.site-byline-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-fg);
    background: rgba(224, 182, 54, 0.15);
    border: 1px solid rgba(224, 182, 54, 0.3);
}


/* 8. Post Feed & Post Cards
   ========================================================================== */

.posts {
    padding-top: max(4vmin, 32px);
}

.post-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Card container */
.post-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 0;
}

.post-card + .post-card {
    margin-top: -1px; /* collapse borders */
}

/* Card header — tag pill left, date right */
.post-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}

.post-card-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.post-card-primary-tag {
    display: inline-block;
    padding: 3px 8px;
    color: var(--color-primary-fg);
    background: var(--color-primary);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.post-card-featured {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-primary);
}

.post-card-featured svg {
    width: 14px;
    height: 14px;
}

.post-card-meta-date {
    font-size: 1.3rem;
    color: var(--color-muted-fg);
    white-space: nowrap;
}

/* Card content — title + excerpt */
.post-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-content-link {
    display: block;
    color: inherit;
}

.post-card-content-link:hover {
    opacity: 1;
}

.post-card-title {
    font-family: var(--font-sans);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-fg);
    margin-bottom: 8px;
}

.post-card-title svg {
    width: 18px;
    height: 18px;
    margin-right: 4px;
}

.post-card-content-link:hover .post-card-title {
    opacity: 0.85;
}

.post-card-excerpt {
    font-size: 1.5rem;
    line-height: 1.55;
    color: var(--color-muted-fg);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card image (optional, shown beside content on wide screens) */
.post-card-image-wrap {
    margin-top: 16px;
}

.post-card-image-link {
    display: block;
    overflow: hidden;
}

.post-card-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 0;
}

.post-card-access {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--color-neutral);
    color: var(--color-neutral-fg);
    font-size: 1.2rem;
    font-weight: 600;
}

.post-card-access svg {
    width: 14px;
    height: 14px;
}

/* Card footer — read more link + share */
.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.post-card-readmore {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-fg);
    transition: color 0.2s;
}

.post-card-readmore:hover {
    color: var(--color-primary);
}

/* Share links (used in cards and post pages) */
.post-card-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--color-muted-fg);
    transition: color 0.2s;
}

.share-link:hover {
    color: var(--color-fg);
}

.share-link svg {
    flex-shrink: 0;
}

/* Grid card variant */
.post-feed-grid .post-card {
    margin-top: 0;
}


/* 9. Single Post — Layout with Sidebar
   ========================================================================== */

.post-layout {
    padding-top: 0;
}

.post-layout-inner {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}

@media (max-width: 1023px) {
    .post-layout-inner {
        grid-template-columns: 1fr;
    }
}


/* 10. Single Post — Article
   ========================================================================== */

.article {
    padding: max(8vmin, 40px) 0;
    min-width: 0; /* prevent grid blowout */
}

.article-header {
    padding: 0 0 max(6.4vmin, 40px);
}

.article-tag {
    margin-bottom: 16px;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.article-tag a {
    color: var(--color-primary);
    font-weight: 500;
}

.article-tag a:hover {
    opacity: 0.8;
}

.article-title {
    margin-bottom: 0;
    font-family: var(--font-sans);
    font-size: clamp(3.2rem, 5vw, 4.8rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-fg);
}

.article-excerpt {
    margin-top: 20px;
    max-width: 720px;
    font-size: 2rem;
    line-height: 1.45;
    color: var(--color-muted-fg);
}

/* Byline */
.article-byline {
    display: flex;
    align-items: center;
    margin-top: max(4vmin, 24px);
    padding-top: max(4vmin, 24px);
    border-top: 1px solid var(--color-border);
}

.article-byline-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.author-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.author-list-item {
    margin-right: -8px;
}

.author-avatar {
    display: block;
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid var(--color-bg);
}

.author-profile-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--color-muted);
}

/* SVG avatar fallback */
a.author-profile-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-muted);
}

a.author-profile-image svg {
    width: 20px;
    height: 20px;
    color: var(--color-muted-fg);
}

.article-byline-meta {
    display: flex;
    flex-direction: column;
}

.article-byline-meta .author-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-fg);
    margin: 0;
}

.article-byline-meta .author-name a {
    color: inherit;
}

.byline-meta-content {
    font-size: 1.3rem;
    color: var(--color-muted-fg);
    display: flex;
    align-items: center;
    gap: 4px;
}

.bull {
    margin: 0 2px;
}

/* Feature image */
.gh-canvas .article-image {
    grid-column: wide-start / wide-end;
    width: 100%;
    margin: max(6.4vmin, 40px) 0 0;
}

.gh-canvas .article-image img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    border-radius: 0;
}

.gh-canvas .article-image figcaption {
    padding-top: 10px;
    font-size: 1.3rem;
    text-align: center;
    color: var(--color-muted-fg);
}

/* Share section at bottom of article */
.article-share {
    margin-top: max(4vmin, 24px);
    padding-top: max(4vmin, 24px);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.article-share-label {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-fg);
}

.article-share-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.article-share-links .share-link {
    font-size: 1.4rem;
}

@media (max-width: 767px) {
    .article-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .article-share-links {
        display: flex;
        gap: 16px;
    }

    .article-share-links .share-link span {
        display: none;
    }

    .article-excerpt {
        margin-top: 14px;
        font-size: 1.7rem;
    }
}


/* 11. Post Sidebar — Signup Card
   ========================================================================== */

.post-sidebar {
    position: sticky;
    top: 32px;
    padding-top: max(4vmin, 32px); /* matches .posts on homepage */
}

.post-layout .post-sidebar {
    padding-top: max(8vmin, 40px); /* matches .article on post pages */
}

.sidebar-signup {
    position: relative;
    padding: 32px 24px 28px;
    background: var(--color-bg);
    box-shadow: 0 1px 2px rgba(44, 44, 44, 0.06), 0 12px 32px rgba(44, 44, 44, 0.08);
}

.sidebar-signup::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--color-primary);
}

.sidebar-signup-title {
    font-family: var(--font-sans);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--color-fg);
    margin: 0 0 0.8rem;
}

.sidebar-signup-desc {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    line-height: 1.45;
    color: var(--color-fg);
    margin: 0 0 0.6rem;
}

.sidebar-signup-proof {
    font-family: var(--font-sans);
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--color-muted-fg);
    margin: 0 0 1.8rem;
}

.sidebar-signup-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.sidebar-signup-input {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background: var(--color-card);
    font-size: 1.4rem;
    font-family: var(--font-sans);
    color: var(--color-fg);
    outline: none;
    transition: border-color 0.2s;
}

.sidebar-signup-input::placeholder {
    color: var(--color-muted-fg);
}

.sidebar-signup-input:focus {
    border-color: var(--color-primary);
}

.sidebar-signup-btn {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--color-primary);
    color: var(--color-primary-fg);
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-sans);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid var(--color-primary);
    border-radius: 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.sidebar-signup-btn:hover {
    opacity: 0.9;
}

@media (max-width: 1023px) {
    .post-sidebar {
        position: static;
        padding-top: 0;
        padding-bottom: max(4vmin, 32px);
    }

    .sidebar-signup {
        max-width: 480px;
        margin: 0 auto;
    }
}


/* 12. Ghost Content Grid (gh-canvas)
   ========================================================================== */

.gh-canvas,
.kg-width-full.kg-content-wide {
    --gap: max(4vmin, 20px);
    --main: min(var(--content-width, 720px), 100% - var(--gap) * 2);
    --wide: minmax(0, calc((var(--container-width, 1200px) - var(--content-width, 720px)) / 2));
    --full: minmax(var(--gap), 1fr);

    display: grid;
    grid-template-columns:
        [full-start] var(--full)
        [wide-start] var(--wide)
        [main-start] var(--main) [main-end]
        var(--wide) [wide-end]
        var(--full) [full-end];
}

.gh-canvas > * {
    grid-column: main-start / main-end;
}

.kg-width-wide,
.kg-content-wide > div {
    grid-column: wide-start / wide-end;
}

.kg-width-full {
    grid-column: full-start / full-end;
}

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


/* 13. Ghost Content Styling
   ========================================================================== */

.gh-content > * + * {
    margin-top: max(3.2vmin, 24px);
    margin-bottom: 0;
}

.gh-content > .kg-width-full + .kg-width-full:not(.kg-width-full.kg-card-hascaption + .kg-width-full) {
    margin-top: 0;
}

/* Headings */
.gh-content > [id] {
    margin: 0;
    color: var(--color-fg);
    font-family: var(--font-sans);
}

.gh-content > [id]:not(:first-child) {
    margin: 2em 0 0;
}

.gh-content > [id] + * {
    margin-top: 1.5rem !important;
}

/* Horizontal rules & blockquotes spacing */
.gh-content > hr,
.gh-content > blockquote {
    position: relative;
    margin-top: max(4.8vmin, 32px);
}

.gh-content > hr + *,
.gh-content > blockquote + * {
    margin-top: max(4.8vmin, 32px) !important;
}

/* Links */
.gh-content a {
    color: var(--ghost-accent-color, var(--color-primary));
    text-decoration: underline;
    word-break: break-word;
}

/* Body text */
.gh-content > blockquote:not([class]),
.gh-content > ol,
.gh-content > ul,
.gh-content > dl,
.gh-content > p {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 1.8rem;
    line-height: 1.65;
}

.gh-content > p img {
    margin: 0 auto;
}

/* Lists */
.gh-content > ul,
.gh-content > ol,
.gh-content > dl,
.gh-content .kg-toggle-card .kg-toggle-content > ol,
.gh-content .kg-toggle-card .kg-toggle-content > ul,
.gh-content .kg-product-card .kg-product-card-description > ol,
.gh-content .kg-product-card .kg-product-card-description > ul {
    padding-left: 1.9em;
}

/* Blockquotes — gold left border, cream wash background */
.gh-content > blockquote:not([class]) {
    position: relative;
    font-style: italic;
    padding: 12px 0 12px 24px;
    border-left: 3px solid var(--ghost-accent-color, var(--color-primary));
    background: rgba(244, 238, 223, 0.4);
}

/* Code */
.gh-content :not(pre) > code {
    vertical-align: middle;
    padding: 0.15em 0.4em 0.15em;
    border: 1px solid var(--color-border);
    font-weight: 400 !important;
    font-size: 0.9em;
    line-height: 1em;
    color: var(--color-fg);
    background: var(--color-muted);
    border-radius: 0;
}

.gh-content pre {
    overflow: auto;
    padding: 16px 20px;
    font-size: 1.5rem;
    line-height: 1.5em;
    background: var(--color-neutral);
    color: var(--color-neutral-fg);
    border-radius: 0;
}

/* Tables */
.gh-content table:not(.gist table) {
    width: 100%;
    border-collapse: collapse;
}

.gh-content table:not(.gist table) th {
    font-weight: 600;
    text-align: left;
    background: var(--color-muted);
}

.gh-content table:not(.gist table) th,
.gh-content table:not(.gist table) td {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    font-size: 1.5rem;
}

/* HR */
.gh-content hr {
    border: 0;
    border-top: 1px solid var(--color-border);
}

/* Figures / captions */
.gh-content figcaption {
    padding-top: 8px;
    font-size: 1.3rem;
    text-align: center;
    color: var(--color-muted-fg);
}

/* Card-specific styling */
.gh-content .kg-callout-card .kg-callout-text,
.gh-content .kg-toggle-card .kg-toggle-content > ol,
.gh-content .kg-toggle-card .kg-toggle-content > ul,
.gh-content .kg-toggle-card .kg-toggle-content > p {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 1.7rem;
    line-height: 1.6em;
}

.gh-content .kg-product-card .kg-product-card-description > p,
.gh-content .kg-product-card .kg-product-card-description > ol,
.gh-content .kg-product-card .kg-product-card-description > ul {
    font-size: 1.5rem;
    line-height: 1.6em;
}

/* Bookmark cards — zero radius */
.gh-content .kg-bookmark-card a.kg-bookmark-container {
    border-radius: 0;
    border-color: var(--color-border);
}

/* Page template spacing */
.page-template .article-header {
    padding: max(12vmin, 64px) 0 max(3.2vmin, 28px);
}

.page-template .gh-content:only-child > *:first-child:not(.kg-width-full) {
    margin-top: max(12vmin, 64px);
}

.page-template .gh-content > *:last-child:not(.kg-width-full) {
    margin-bottom: max(12vmin, 64px);
}


/* 14. Subscribe CTA
   ========================================================================== */

.footer-cta {
    position: relative;
    text-align: center;
    padding-top: max(8vmin, 48px);
    padding-bottom: max(8vmin, 48px);
}

.footer-cta-title {
    margin: 0 0 min(24px, 6.4vmin);
    font-family: var(--font-sans);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 800;
    color: var(--color-fg);
}

.footer-cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 500px;
    padding: 5px 5px 5px 15px;
    font-size: 1.6rem;
    color: var(--color-muted-fg);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 0;
    transition: border-color 0.2s;
}

.footer-cta-button:hover {
    border-color: #ccc;
}

.footer-cta-button span {
    display: inline-block;
    padding: 10px 18px;
    color: var(--color-neutral-fg);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--ghost-accent-color, var(--color-primary));
    border-radius: 0;
}


/* 15. Read More / Related Posts
   ========================================================================== */

.read-more-wrap {
    margin-top: max(8vmin, 48px);
    padding-bottom: max(8vmin, 48px);
}

.read-more {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.read-more .post-card {
    margin-top: 0;
}

@media (max-width: 767px) {
    .read-more {
        grid-template-columns: 1fr;
    }
}


/* 16. Tag Template
   ========================================================================== */

.tag-header {
    padding: max(4vmin, 24px) 0 max(6vmin, 40px);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 48px;
}

.tag-header-title {
    font-family: var(--font-sans);
    font-size: clamp(3.2rem, 5vw, 4.8rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-fg);
}

.tag-header-description {
    margin-top: 12px;
    font-size: 1.8rem;
    line-height: 1.5;
    color: var(--color-muted-fg);
    max-width: 720px;
}


/* 17. Author Template
   ========================================================================== */

.author-header {
    padding: max(4vmin, 24px) 0 max(6vmin, 40px);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 48px;
}

.author-header-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.author-header-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-header-name {
    font-family: var(--font-sans);
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-fg);
}

.author-header-bio {
    margin-top: 8px;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--color-muted-fg);
}

.author-header-location {
    font-size: 1.3rem;
    color: var(--color-muted-fg);
    margin-top: 4px;
}


/* 18. Error Pages
   ========================================================================== */

.error-content {
    padding: max(16vmin, 100px) 0;
}

.error-message {
    text-align: center;
}

.error-code {
    font-family: var(--font-display);
    font-size: 12rem;
    font-weight: 200;
    line-height: 1;
    color: var(--color-border);
    margin: 0;
}

.error-description {
    margin: 16px 0 0;
    font-size: 2rem;
    color: var(--color-muted-fg);
}

.error-link {
    display: inline-block;
    margin-top: 24px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-fg);
    text-decoration: underline;
}


/* 19. Site Footer
   ========================================================================== */

.site-footer {
    position: relative;
    margin: max(12vmin, 64px) 0 0 0;
    padding-top: 40px;
    padding-bottom: 40px;
    color: var(--color-neutral-fg);
    background: var(--color-neutral);
}

.site-footer .inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-top {
    display: flex;
    align-items: center;
}

.footer-logo {
    display: block;
}

.footer-logo img {
    height: 28px;
    width: auto;
    opacity: 0.9;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid rgba(244, 238, 223, 0.15);
}

.site-footer .copyright {
    color: rgba(244, 238, 223, 0.6);
    font-size: 1.3rem;
}

.site-footer a {
    color: rgba(244, 238, 223, 0.7);
    transition: color 0.2s;
}

.site-footer a:hover {
    color: var(--color-neutral-fg);
    text-decoration: none;
}

.site-footer-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-nav a {
    font-size: 1.3rem;
}

@media (max-width: 767px) {
    .site-footer .inner {
        text-align: center;
    }

    .footer-top {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .site-footer-nav {
        justify-content: center;
        flex-wrap: wrap;
    }
}


/* 20. Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: max(8vmin, 48px);
    padding-bottom: max(8vmin, 48px);
    font-size: 1.4rem;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-weight: 600;
    color: var(--color-neutral-fg);
    background: var(--color-neutral);
    border-radius: 0;
    transition: opacity 0.2s;
}

.pagination a:hover {
    opacity: 0.9;
}

.page-number {
    color: var(--color-muted-fg);
}


/* 21. Comments
   ========================================================================== */

.article-comments {
    margin-top: max(6.4vmin, 40px);
    padding-top: max(6.4vmin, 40px);
    border-top: 1px solid var(--color-border);
}


/* 22. Lightbox (inherited from Casper)
   ========================================================================== */

.pswp {
    --pswp-bg: var(--color-neutral);
}


/* 23. Utilities
   ========================================================================== */

.page-template .site-footer {
    margin-top: 0;
}

/* Override any border-radius that Ghost card assets might inject */
.kg-bookmark-container,
.kg-bookmark-thumbnail,
.kg-gallery-image img,
.kg-image-card img,
.kg-header-card,
.kg-callout-card,
.kg-toggle-card,
.kg-product-card,
.kg-file-card,
.kg-audio-card,
.kg-video-card,
.kg-nft-card {
    border-radius: 0 !important;
}

/* Force zero radius on buttons injected by Ghost */
.kg-header-card-button,
.kg-product-card-button,
.kg-signup-card-button {
    border-radius: 0 !important;
}

/* Hide Ghost-injected widgets we don't use.
   Sodo-search is loaded by {{ghost_head}} but we have no search triggers.
   Portal's trigger iframe is hidden, but the root container stays so
   data-portal click handlers on .footer-cta-button still open the popup. */
#sodo-search-root {
    display: none !important;
}

#ghost-portal-root > iframe[title="Portal Trigger"],
#ghost-portal-root > iframe[title="portal-trigger"] {
    display: none !important;
}


/* 24. Content Gate
   ========================================================================== */

.content-fade-out {
    position: relative;
}

.content-fade-out::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(244, 238, 223, 0), rgba(244, 238, 223, 1));
    pointer-events: none;
}

.content-hidden {
    display: none;
}

.content-gate {
    text-align: center;
    padding: 4rem 2rem;
    margin: 0 auto;
    max-width: 500px;
}

.content-gate-title {
    font-family: var(--font-sans);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-fg);
    margin: 0 0 0.8rem;
}

.content-gate-desc {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--color-muted-fg);
    margin: 0 0 2rem;
}

.content-gate-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
}

.content-gate-input {
    flex: 1;
    padding: 1rem 1.2rem;
    border: 1px solid var(--color-border);
    border-right: 0;
    border-radius: 0;
    background: var(--color-card);
    font-size: 1.5rem;
    font-family: var(--font-sans);
    color: var(--color-fg);
    outline: none;
}

.content-gate-input::placeholder {
    color: var(--color-muted-fg);
}

.content-gate-input:focus {
    border-color: var(--color-primary);
}

.content-gate-btn {
    padding: 1rem 2rem;
    background: var(--color-primary);
    color: var(--color-primary-fg);
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--font-sans);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: 1px solid var(--color-primary);
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
}

.content-gate-btn:hover {
    opacity: 0.9;
}

@media (max-width: 600px) {
    .content-gate-form {
        flex-direction: column;
    }

    .content-gate-input {
        border-right: 1px solid var(--color-border);
        border-bottom: 0;
    }

    .content-gate-btn {
        width: 100%;
        padding: 1.2rem 2rem;
    }
}
