/* ==========================================================================
   Business Lifers Ghost Theme — screen.css
   Medium-style: clean, fast, content-first
   Mobile-first — base styles target 375px, desktop via min-width queries
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

::selection {
    background: var(--color-accent);
    color: #fff;
}

:root {
    /* Colours */
    --color-bg:              #fafafa;
    --color-white:           #ffffff;
    --color-text:            #1a1a1a;
    --color-text-secondary:  #6b7280;
    --color-border:          #e5e7eb;
    --color-surface:         #f3f4f6;

    /* Accent — wired to Ghost site accent colour with safe fallback */
    --accent:                #0f62fe;
    --color-accent:          var(--accent, #0f62fe);

    /* Typography */
    --font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Georgia, serif;
    --font-serif: Georgia, "Times New Roman", serif;
    --font-mono:  "SFMono-Regular", Consolas, "Liberation Mono", monospace;

    /* Layout */
    --max-width:      680px;
    --max-width-wide: 1200px;

    /* Spacing scale */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  1.5rem;
    --space-lg:  2.5rem;
    --space-xl:  4rem;
    --gutter:    1.25rem;
}

/* --- Document --- */
html {
    font-size: 17px;   /* mobile base — ~18px on desktop */
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Layout shell --- */
#site-main {
    min-height: 60vh;
}

/* =========================================================================
   HEADER / NAV
   ========================================================================= */

.site-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    position: relative;
}

/* Logo */
.site-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 1;
}

.site-logo img {
    max-height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
}

.site-name {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    color: var(--color-text);
    text-decoration: none;
}

.site-logo:hover {
    text-decoration: none;
}

.site-logo:hover .site-name {
    color: var(--color-accent);
}

/* Desktop logo sizes */
@media (min-width: 700px) {
    .site-logo img {
        max-height: 40px;
    }
}

/* Hamburger toggle — visible on mobile */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover {
    background: var(--color-surface);
}

.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animated X when open */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav — hidden by default, shown when open */
.site-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-sm) var(--gutter);
    z-index: 99;
}

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

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

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.nav-list li {
    border-bottom: 1px solid var(--color-border);
}

.nav-list li:last-child {
    border-bottom: none;
}

.nav-list a {
    display: block;
    padding: 0.6rem 0;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-list a:hover {
    color: var(--color-accent);
    text-decoration: none;
}

/* Desktop nav */
@media (min-width: 700px) {
    .nav-toggle {
        display: none;
    }

    .site-nav {
        display: block;
        position: static;
        background: none;
        border: none;
        padding: 0;
    }

    .nav-list {
        display: flex;
        flex-direction: row;
        list-style: none;
        padding: 0;
        margin: 0;
        gap: var(--space-md);
        align-items: center;
    }

    .nav-list li {
        border: none;
    }

    .nav-list a {
        padding: 0;
        font-size: 0.875rem;
    }

    /* Ghost {{navigation}} helper outputs <ul class="nav"> — ensure it inherits flex row */
    .site-nav .nav {
        display: flex;
        flex-direction: row;
        gap: 1.5rem;
        align-items: center;
    }
}

/* =========================================================================
   FEED — Index / Tag / Author listing pages
   ========================================================================= */

.site-feed,
.tag-feed,
.author-feed {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: var(--space-lg) var(--gutter);
}

.feed-header {
    text-align: left;
    max-width: 960px;
    margin: 0 auto var(--space-lg);
    padding: var(--space-xl) 0 var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

/* Accent rule above the masthead */
.feed-header::before {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    background: var(--color-accent);
    margin-bottom: var(--space-md);
    border-radius: 2px;
}

/* Cover image — shown only when one is deliberately set */
.feed-cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: var(--space-md);
}

.feed-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--color-text);
}

.feed-description {
    color: var(--color-text-secondary);
    margin-top: 0.6rem;
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 520px;
}

/* Post list — wider than reading column so cards have room to breathe */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 960px;
    margin: 0 auto;
}

/* Individual feed item */
.feed-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-border);
}

.feed-item:last-child {
    border-bottom: none;
}

.feed-item-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
}

.feed-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.feed-item-image:hover img {
    transform: scale(1.02);
}

.feed-item-content {
    flex: 1;
}

.feed-item-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.feed-item-tag {
    color: var(--color-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.75rem;
}

.feed-item-date {
    color: var(--color-text-secondary);
}

.feed-item-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.feed-item-title a {
    color: var(--color-text);
}

.feed-item-title a:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.feed-item-excerpt {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.feed-item-readmore {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent);
}

/* Desktop: thumbnail layout for feed items */
@media (min-width: 600px) {
    .feed-item {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .feed-item-image {
        flex-shrink: 0;
        width: 200px;
        aspect-ratio: auto;
        height: 130px;
    }
}

@media (min-width: 900px) {
    .feed-header {
        padding-top: var(--space-xl);
    }

    .feed-title {
        font-size: 2.75rem;
    }

    .feed-cover {
        height: 300px;
    }
}

/* =========================================================================
   POST — Single article
   ========================================================================= */

.post-full {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter) var(--space-xl);
}

/* Hero feature image — full width, above header, breaks out of content column */
.post-feature-image--hero {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: var(--space-lg);
    overflow: hidden;
}

.post-feature-image--hero img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
}

.post-feature-image--hero figcaption {
    max-width: var(--max-width);
    margin: 0.5rem auto 0;
    padding: 0 var(--gutter);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    text-align: center;
    font-family: var(--font-sans);
}

/* Post header — slightly wider than reading column for visual hierarchy */
.post-header {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    padding-top: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.post-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.post-tag:hover {
    text-decoration: none;
    opacity: 0.8;
}

.post-title {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.post-meta {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.post-meta time {
    font-weight: 500;
}

.post-read-time::before {
    content: "·";
    margin-right: var(--space-xs);
}

/* Post body content */
.post-content {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--color-text);
}

.post-content h2 {
    font-family: var(--font-sans);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.015em;
    margin: 2.75rem 0 1rem;
    color: var(--color-text);
}

.post-content h3 {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 2.25rem 0 0.75rem;
    color: var(--color-text);
}

.post-content h4 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    margin: 2rem 0 0.5rem;
}

.post-content p {
    margin-bottom: 1.6rem;
}

.post-content ul,
.post-content ol {
    margin: 0.5rem 0 1.6rem 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.post-content blockquote {
    border-left: 3px solid var(--color-accent);
    padding: 0.25rem 0 0.25rem 1.25rem;
    color: var(--color-text-secondary);
    font-style: italic;
    margin: 2rem 0;
    font-size: 1.05rem;
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--color-surface);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: var(--color-text);
}

.post-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: var(--space-md);
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.75rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

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

.post-content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.post-content a:hover {
    opacity: 0.8;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 3rem 0;
}

.post-content figure {
    margin: 2.25rem 0;
}

.post-content figcaption {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    text-align: center;
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* Post footer — tag chips */
.post-footer {
    padding: var(--space-md) 0;
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-lg);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-footer-tag {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    transition: border-color 0.15s, color 0.15s;
}

.post-footer-tag:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    text-decoration: none;
}

/* Desktop post typography */
@media (min-width: 700px) {
    html {
        font-size: 18px;
    }

    .post-title {
        font-size: 2.4rem;
    }

    .post-content {
        font-size: 1.1rem;
    }

    .post-feature-image--hero img {
        max-height: 600px;
    }
}

/* =========================================================================
   EMAIL CAPTURE
   ========================================================================= */

.email-capture {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-lg) var(--space-md);
    margin: var(--space-xl) 0;
    text-align: center;
}

.email-capture-inner {
    max-width: 480px;
    margin: 0 auto;
}

.email-capture-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    font-family: var(--font-sans);
}

.email-capture-desc {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
    font-family: var(--font-sans);
    line-height: 1.5;
}

.email-capture-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.email-capture-input {
    flex: 1;
    min-width: 200px;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color 0.15s;
}

.email-capture-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.email-capture-btn {
    padding: 0.65rem 1.4rem;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}

.email-capture-btn:hover {
    opacity: 0.88;
}

.email-capture-success {
    display: none;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-top: var(--space-sm);
    font-family: var(--font-sans);
}

/* =========================================================================
   AUTHOR BIO
   ========================================================================= */

.author-bio-card {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-md);
}

/* New .author-bio wrapper (Sprint 1 partial) */
.author-bio {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-md);
    font-family: var(--font-sans);
}

.author-bio-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-bio-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-bio-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    font-family: var(--font-sans);
    display: block;
}

/* Legacy — name was wrapped in <a> in old partial */
.author-bio-name a {
    color: var(--color-text);
    text-decoration: none;
}

.author-bio-name a:hover {
    color: var(--color-accent);
}

.author-bio-text {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-style: italic;
    font-family: var(--font-sans);
    margin: 0;
}

.author-bio-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
    margin-top: 0.15rem;
    display: inline-block;
}

.author-bio-link:hover {
    text-decoration: underline;
}

/* Desktop: larger avatar */
@media (min-width: 700px) {
    .author-bio-avatar {
        width: 80px;
        height: 80px;
    }
}

/* =========================================================================
   AFFILIATE CARD — editorial callout, not an ad banner
   ========================================================================= */

.affiliate-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    border-left: 3px solid var(--color-accent);
    background: var(--color-white);
    border-radius: 0 6px 6px 0;
    padding: var(--space-md);
    margin: var(--space-lg) 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.affiliate-card-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 4px;
}

.affiliate-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.affiliate-card-content {
    flex: 1;
}

.affiliate-card-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-accent);
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.3rem;
    font-family: var(--font-sans);
}

.affiliate-card-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.35rem;
    font-family: var(--font-sans);
    color: var(--color-text);
}

.affiliate-card-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.55;
    font-family: var(--font-sans);
}

.affiliate-card-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--color-accent);
    color: var(--color-white);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-sans);
    transition: opacity 0.15s;
}

.affiliate-card-btn:hover {
    opacity: 0.88;
    text-decoration: none;
}

/* Desktop: horizontal layout */
@media (min-width: 500px) {
    .affiliate-card {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* =========================================================================
   DIGITAL PRODUCT — editorial, similar treatment to affiliate card
   ========================================================================= */

.digital-product {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    border-left: 3px solid var(--color-accent);
    background: var(--color-white);
    border-radius: 0 6px 6px 0;
    padding: var(--space-md);
    margin: var(--space-lg) 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.digital-product-image {
    flex-shrink: 0;
    width: 90px;
}

.digital-product-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.digital-product-content {
    flex: 1;
}

.digital-product-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-accent);
    letter-spacing: 0.08em;
    font-family: var(--font-sans);
    display: block;
    margin-bottom: 0.3rem;
}

.digital-product-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 0.4rem;
    font-family: var(--font-sans);
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.digital-product-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.55;
    font-family: var(--font-sans);
}

.digital-product-footer {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.digital-product-price {
    font-size: 1.05rem;
    font-weight: 800;
    font-family: var(--font-sans);
    color: var(--color-text);
}

.digital-product-btn {
    display: inline-block;
    padding: 0.45rem 1.1rem;
    background: var(--color-accent);
    color: var(--color-white);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    transition: opacity 0.15s;
}

.digital-product-btn:hover {
    opacity: 0.88;
    text-decoration: none;
}

@media (min-width: 500px) {
    .digital-product {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* =========================================================================
   TAG PAGE
   ========================================================================= */

.tag-header {
    max-width: var(--max-width);
    margin: 0 auto var(--space-lg);
    padding: var(--space-lg) 0 var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.tag-cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: var(--space-md);
}

.tag-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.tag-description {
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
    line-height: 1.6;
}

.tag-count {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
    display: block;
}

/* =========================================================================
   AUTHOR PAGE
   ========================================================================= */

.author-header {
    text-align: center;
    padding: var(--space-xl) var(--gutter) var(--space-lg);
}

.author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto var(--space-sm);
}

.author-name {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.015em;
}

.author-bio {
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* =========================================================================
   ERROR PAGE
   ========================================================================= */

.error-page {
    max-width: var(--max-width);
    margin: var(--space-xl) auto;
    padding: 0 var(--gutter);
    text-align: center;
}

.error-code {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-border);
    letter-spacing: -0.05em;
}

.error-message {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin: var(--space-sm) 0 var(--space-lg);
    line-height: 1.6;
}

/* =========================================================================
   PAGINATION
   ========================================================================= */

.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg) 0;
}

.pagination a {
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--color-text);
    font-weight: 500;
    transition: border-color 0.15s, color 0.15s;
}

.pagination a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

.pagination .page-number {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* =========================================================================
   FOOTER
   ========================================================================= */

.site-footer {
    border-top: 1px solid var(--color-border);
    padding: var(--space-lg) var(--gutter);
    margin-top: var(--space-xl);
    background: var(--color-white);
}

.footer-inner {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    text-align: center;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

/* Footer nav — Ghost outputs <ul class="nav"> from {{navigation}} helper */
.footer-nav .nav-list,
.footer-nav .nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
}

.footer-nav .nav-list li,
.footer-nav .nav li {
    border: none;
}

.footer-nav .nav-list a,
.footer-nav .nav a {
    padding: 0;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.footer-nav .nav-list a:hover,
.footer-nav .nav a:hover {
    color: var(--color-accent);
}

@media (min-width: 700px) {
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* =========================================================================
   KOENIG EDITOR — card widths (required by Ghost)
   ========================================================================= */

.kg-width-wide {
    width: 85vw;
    max-width: 1100px;
    margin-left: calc(50% - 42.5vw);
    margin-right: calc(50% - 42.5vw);
}

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

.post-content .kg-image-card {
    margin: 2rem 0;
}

.post-content .kg-image-card img {
    width: 100%;
    border-radius: 4px;
}

.post-content .kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 2rem 0;
}

.post-content .kg-gallery-row {
    display: flex;
    gap: 4px;
}

.post-content .kg-gallery-image {
    flex: 1;
    overflow: hidden;
    border-radius: 3px;
}

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

/* Koenig bookmark card */
.post-content .kg-bookmark-card {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    margin: 2rem 0;
}

.post-content .kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: var(--color-text);
}

.post-content .kg-bookmark-content {
    flex: 1;
    padding: var(--space-sm);
}

.post-content .kg-bookmark-title {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.post-content .kg-bookmark-description {
    font-family: var(--font-sans);
    font-size: 0.825rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.post-content .kg-bookmark-thumbnail {
    flex-shrink: 0;
    width: 120px;
    overflow: hidden;
}

.post-content .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Koenig callout card — base */
.kg-callout-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    border-left: 4px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin: 2rem 0;
    font-family: var(--font-sans);
}

/* Colour variants */
.kg-callout-card-green {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

.kg-callout-card-blue {
    background: #eff6ff;
    border-left-color: #3b82f6;
}

.kg-callout-card-yellow {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.kg-callout-card-grey {
    background: #f9fafb;
    border-left-color: #9ca3af;
}

.kg-callout-emoji {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-right: 0.5rem;
    line-height: 1.6;
}

.kg-callout-text {
    font-size: 0.95rem;
    line-height: 1.6;
    font-family: var(--font-sans);
}

/* Legacy scoped selector — keep working for any existing content */
.post-content .kg-callout-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    border-left: 4px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin: 2rem 0;
}

.post-content .kg-callout-emoji {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.post-content .kg-callout-text {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Koenig toggle card */
.post-content .kg-toggle-card {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: var(--space-sm) var(--space-md);
    margin: 2rem 0;
}

.post-content .kg-toggle-heading {
    font-family: var(--font-sans);
    font-weight: 700;
    cursor: pointer;
}

/* =========================================================================
   DATA TABLES — responsive, zebra-striped
   ========================================================================= */

.gh-content table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 2rem 0;
    /* Mobile horizontal scroll */
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gh-content table thead {
    background: #f3f4f6;
}

.gh-content table thead th {
    font-weight: 600;
    color: var(--color-text);
    text-align: left;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
}

.gh-content table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.gh-content table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.gh-content table tbody td {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    vertical-align: top;
}

/* Restore table display on desktop so it fills the column normally */
@media (min-width: 700px) {
    .gh-content table {
        display: table;
        overflow-x: visible;
    }
}

/* =========================================================================
   GHOST PRODUCT CARD — editorial affiliate card
   ========================================================================= */

.kg-product-card {
    border-left: 4px solid var(--color-accent);
    background: #fafafa;
    border-radius: 8px;
    padding: var(--space-md);
    margin: var(--space-lg) 0;
    font-family: var(--font-sans);
}

.kg-product-card-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Product image — block above on mobile */
.kg-product-card-image {
    width: 100%;
    max-width: 120px;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

.kg-product-card-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text);
    margin: 0 0 0.35rem;
    line-height: 1.3;
}

.kg-product-card-description {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0 0 0.5rem;
}

/* Star rating */
.kg-product-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    margin-bottom: 0.5rem;
}

.kg-product-card-rating-star {
    color: var(--color-accent);
    font-size: 1rem;
    line-height: 1;
}

/* CTA button — full-width on mobile */
.kg-product-card-button {
    display: block;
    width: 100%;
    padding: 0.6rem 1.1rem;
    background: var(--color-accent);
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.15s;
    font-family: var(--font-sans);
    box-sizing: border-box;
}

.kg-product-card-button:hover {
    opacity: 0.88;
    text-decoration: none;
}

/* Desktop: image floated right, button inline */
@media (min-width: 600px) {
    .kg-product-card-container {
        flex-direction: row;
        align-items: flex-start;
    }

    .kg-product-card-image {
        float: right;
        margin: 0 0 var(--space-sm) var(--space-md);
        width: 120px;
        flex-shrink: 0;
    }

    .kg-product-card-button {
        display: inline-block;
        width: auto;
    }
}

/* =========================================================================
   UTILITY
   ========================================================================= */

.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;
}

/* =========================================================================
   FAQ SECTION
   ========================================================================= */

.faq-section {
    margin: 2.5rem 0;
}
.faq-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}
.faq-section p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin-top: 0;
}

/* =========================================================================
   COMPARISON TABLE
   ========================================================================= */

.comparison-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2rem 0;
}
.comparison-table table {
    min-width: 500px;
    width: 100%;
}
.comparison-table thead th {
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--color-accent);
}
.comparison-table tbody td {
    padding: 0.7rem 1rem;
    border: 1px solid var(--color-border);
    font-size: 0.9rem;
}
.comparison-table tbody tr:last-child td {
    background: #f0fdf4;
    font-weight: 600;
    border-color: #22c55e;
}
.comparison-table tbody tr:nth-child(even) td {
    background: #f9fafb;
}
.comparison-table tbody tr:last-child:nth-child(even) td {
    background: #f0fdf4;
}

/* =========================================================================
   TL;DR LABEL — yellow callout eyebrow
   ========================================================================= */

.kg-callout-card-yellow::before {
    content: "TL;DR";
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #92400e;
    margin-bottom: 0.4rem;
}

/* =========================================================================
   PILLAR PAGE TABLE OF CONTENTS
   ========================================================================= */

.pillar-toc {
    background: #f9fafb;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
}
.pillar-toc-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}
.pillar-toc ol {
    margin: 0;
    padding-left: 1.25rem;
}
.pillar-toc li {
    margin: 0.35rem 0;
    font-size: 0.9rem;
}
.pillar-toc a {
    color: var(--color-accent);
    text-decoration: none;
}
.pillar-toc a:hover {
    text-decoration: underline;
}

/* =========================================================================
   ROUNDUP PICKS GRID
   ========================================================================= */

.picks-grid {
    margin: 2rem 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}
.picks-grid-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 2fr;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 1rem;
    align-items: start;
}
.picks-grid-row:last-child {
    border-bottom: none;
}
.picks-grid-row:nth-child(even) {
    background: #f9fafb;
}
.picks-grid-header {
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.picks-grid-usecase {
    font-weight: 600;
    font-size: 0.85rem;
}
.picks-grid-product {
    font-weight: 600;
    color: var(--color-accent);
    font-size: 0.9rem;
}
.picks-grid-reason {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}
@media (max-width: 600px) {
    .picks-grid-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}
