/* ─────────────────────────────────────────────────────────────
   pethealth · Editorial Veterinary theme
   Direction: Direction A (deep teal + warm cream + coral, Lora + Inter)
   Built from plan: docs/plans/2026-05-02-pethealth-cornerstone-content-plan.md

   Entry point for postcss-easy-import. All real styles live in
   modules/. Build output: assets/built/screen.css
   ───────────────────────────────────────────────────────────── */

/* 1. Foundations */
/* ── modules/tokens.css ── */
/* ─────────────────────────────────────────────────────────────
   cybersec · Design tokens
   Direction: Theme A "Authoritative Editorial"
   KrebsOnSecurity meets The Markup. Editorial-not-corporate.
   Spec: ../../../../docs/plans/2026-05-04-cybersec-cornerstone-content-plan.md
   ───────────────────────────────────────────────────────────── */

:root {
    /* ── Color (Authoritative Editorial palette) ─────── */
    --color-text-primary: #0d1117;        /* ink black — headings, primary text */
    --color-text-body:    #1c2733;        /* near-ink — body text */
    --color-text-muted:   #5a6776;        /* slate — bylines, metadata, dates */
    --color-text-inverse: #fafaf5;        /* warm cream on dark surfaces */

    --color-bg-page:      #fafaf5;        /* warm cream — page background */
    --color-bg-card:      #ffffff;        /* white — card backgrounds */
    --color-bg-dark:      #0d1117;        /* ink black — header, dark surfaces */
    --color-bg-darker:    #050810;        /* darker ink — utility bars */
    --color-bg-subtle:    #f1efe8;        /* warm cream-tint — subtle blocks (callouts, code) */

    --color-accent:       #f59e0b;        /* safety amber — CTAs, links, kickers */
    --color-accent-dark:  #b45309;        /* darker amber — hover */
    --color-secondary:    #1c2733;        /* near-ink — semantic accents (vs amber) */
    --color-secondary-dark: #0d1117;

    --color-divider:      rgba(13, 17, 23, 0.10);
    --color-divider-strong: rgba(13, 17, 23, 0.20);
    --color-overlay-dark: rgba(13, 17, 23, 0.88);   /* hero photo overlay */

    /* ── Typography ─────────────────────────────────── */
    /* Headlines: Source Serif 4 (humanist serif, journalistic — KrebsOnSecurity vibe).
       Body: Inter (clean modern sans, max readability for long-form).
       Mono: JetBrains Mono (inline technical terms, IPs, domain names, code). */
    --font-headline: var(--gh-font-heading, "Source Serif 4", "Source Serif Pro", "Georgia", Cambria, "Times New Roman", Times, serif);
    --font-body:     var(--gh-font-body, "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif);
    --font-mono:     "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --fs-xs:   12px;     /* kickers, metadata */
    --fs-sm:   14px;     /* small caption */
    --fs-base: 17px;     /* body — slightly larger than ATG/pethealth for editorial readability */
    --fs-md:   19px;     /* lead paragraph */
    --fs-lg:   24px;     /* h3, large UI */
    --fs-xl:   34px;     /* h2 / section heads */
    --fs-2xl:  46px;     /* post hero title */
    --fs-3xl:  56px;     /* homepage hero */

    --lh-tight: 1.15;    /* serif headlines — tighter than pethealth */
    --lh-snug:  1.32;
    --lh-body:  1.65;    /* looser body lh — long-form readability */
    --lh-loose: 1.75;

    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold:    700;
    --fw-extrabold: 800;

    --tracking-tight:   -0.015em;
    --tracking-normal:  0;
    --tracking-kicker:  0.16em;
    --tracking-utility: 0.06em;

    /* ── Spacing (8pt scale) ────────────────────────── */
    --sp-1:  4px;
    --sp-2:  8px;
    --sp-3:  12px;
    --sp-4:  16px;
    --sp-6:  24px;
    --sp-8:  32px;
    --sp-12: 48px;
    --sp-16: 64px;
    --sp-24: 96px;

    /* ── Layout widths — narrower for editorial single-column ── */
    --container-max: 1140px;
    --container-narrow: 680px;        /* article body — narrower than pethealth */
    --container-wide: 1320px;
    --container-pad: var(--sp-6);

    /* ── Radius — sharp, journalistic ────────────────── */
    --r-sm: 2px;
    --r-md: 3px;
    --r-lg: 6px;

    /* ── Shadow ──────────────────────────────────────── */
    --shadow-card:  0 1px 2px rgba(13, 17, 23, 0.06);
    --shadow-hover: 0 4px 12px rgba(13, 17, 23, 0.10);

    /* ── Transition ─────────────────────────────────── */
    --t-fast: 120ms ease;
    --t-base: 180ms ease;
    --t-slow: 280ms ease;

    --bp-mobile: 480px;
    --bp-tablet: 768px;
    --bp-desktop: 1100px;
    --bp-wide:    1440px;
}

/* Dark surfaces (header, footer, hero overlays) */
.surface-dark {
    --color-text-primary: var(--color-text-inverse);
    --color-text-body:    rgba(250, 250, 245, 0.88);
    --color-text-muted:   rgba(250, 250, 245, 0.62);
    --color-divider:      rgba(250, 250, 245, 0.14);
}

/* ── modules/fonts.css ── */
/* ─────────────────────────────────────────────────────────────
   Fonts · self-hosted .woff2, font-display:swap
   Theme A "Authoritative Editorial": Source Serif 4 headlines,
   Inter body, JetBrains Mono inline (technical terms / code).
   ───────────────────────────────────────────────────────────── */

/* Source Serif 4 (headlines) — variable, latin subset */
@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/source-serif-roman.woff2") format("woff2-variations"),
         url("../fonts/source-serif-roman.woff2") format("woff2");
}

/* Inter (body) — variable, latin subset, full weight range */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-roman.woff2") format("woff2-variations"),
         url("../fonts/inter-roman.woff2") format("woff2");
}

/* JetBrains Mono (inline code / technical terms) */
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/jetbrains-mono-roman.woff2") format("woff2");
}

/* ── modules/reset.css ── */
/* ─────────────────────────────────────────────────────────────
   Reset · modern, minimal. Adapted from Josh Comeau's CSS reset.
   ───────────────────────────────────────────────────────────── */

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

* { margin: 0; }

html, body { height: 100%; }

body {
    line-height: var(--lh-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background: var(--color-bg-page);
    color: var(--color-text-body);
    font-family: var(--font-body);
    font-size: var(--fs-base);
}

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

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

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    color: var(--color-text-primary);
}

#root, #__next { isolation: isolate; }

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--t-fast);
}
a:hover { color: var(--color-accent); }

button {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 0;
}

ul, ol { padding: 0; list-style: none; }

table { border-collapse: collapse; }

/* ── modules/type.css ── */
/* ─────────────────────────────────────────────────────────────
   Typography · headlines + body + utility classes
   ───────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    letter-spacing: var(--tracking-normal);
    color: var(--color-text-primary);
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
h5 { font-size: var(--fs-base); }
h6 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: var(--tracking-kicker); }

p { margin-block-end: var(--sp-4); line-height: var(--lh-body); }
p:last-child { margin-block-end: 0; }

strong, b { font-weight: var(--fw-bold); }
em, i { font-style: italic; }
small { font-size: var(--fs-sm); }

blockquote {
    border-left: 4px solid var(--color-accent);
    padding: var(--sp-2) var(--sp-6);
    margin: var(--sp-6) 0;
    font-family: var(--font-headline);
    font-weight: var(--fw-medium);
    font-size: var(--fs-md);
    color: var(--color-text-primary);
    font-style: italic;
}

code, pre {
    font-family: var(--font-mono);
    font-size: 0.92em;
}

pre {
    background: var(--color-bg-dark);
    color: var(--color-text-inverse);
    padding: var(--sp-4) var(--sp-6);
    border-radius: var(--r-md);
    overflow-x: auto;
    line-height: var(--lh-snug);
    margin: var(--sp-6) 0;
}

code {
    background: rgba(193, 73, 38, 0.08);
    color: var(--color-accent-dark);
    padding: 1px 5px;
    border-radius: 2px;
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* ─── Utility type classes ───────────────────────────────── */
.kicker {
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-kicker);
    text-transform: uppercase;
    color: var(--color-accent);
    line-height: 1;
}
.kicker--secondary { color: var(--color-secondary-dark); }
.kicker--muted    { color: var(--color-text-muted); }

.byline {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    letter-spacing: var(--tracking-utility);
}
.byline a { color: var(--color-text-primary); }

.lead {
    font-size: var(--fs-md);
    line-height: var(--lh-body);
    color: var(--color-text-primary);
    font-weight: var(--fw-normal);
}

.label {
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    font-size: 11px;
    letter-spacing: var(--tracking-kicker);
    text-transform: uppercase;
    color: var(--color-accent);
}

/* ─── Headline scale tweaks for hero contexts ──────────── */
.title-hero {
    font-size: var(--fs-3xl);
    font-weight: var(--fw-extrabold);
    letter-spacing: var(--tracking-tight);
    line-height: 1.05;
}

.title-post {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    letter-spacing: var(--tracking-tight);
    line-height: var(--lh-tight);
}

.title-card {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    letter-spacing: var(--tracking-normal);
    line-height: var(--lh-tight);
}

.title-card-sm {
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
}

@media (max-width: 768px) {
    h1 { font-size: 28px; }
    .title-hero { font-size: 36px; }
    .title-post { font-size: 28px; }
    .title-card { font-size: 20px; }
}


/* 2. Layout primitives */
/* ── modules/container.css ── */
/* ─────────────────────────────────────────────────────────────
   Container · width-constrained content wrappers
   ───────────────────────────────────────────────────────────── */

.container {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
    width: 100%;
}

.container--narrow {
    max-width: var(--container-narrow);
}

.container--wide {
    max-width: var(--container-wide);
}

.container--bleed {
    max-width: 100%;
    padding-inline: 0;
}

@media (min-width: 768px) {
    .container { padding-inline: var(--sp-8); }
}

@media (min-width: 1100px) {
    .container { padding-inline: var(--sp-12); }
}

/* Section spacing — vertical rhythm between page sections */
.section {
    padding-block: var(--sp-12);
}
.section--tight { padding-block: var(--sp-8); }
.section--loose { padding-block: var(--sp-16); }

@media (min-width: 1100px) {
    .section { padding-block: var(--sp-16); }
    .section--loose { padding-block: var(--sp-24); }
}

.section-title {
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-kicker);
    text-transform: uppercase;
    color: var(--color-accent);
    line-height: 1;
    padding-left: var(--sp-3);
    border-left: 3px solid var(--color-accent);
    margin-block-end: var(--sp-6);
}

/* ── modules/grid.css ── */
/* ─────────────────────────────────────────────────────────────
   Grid · simple responsive grid utility
   ───────────────────────────────────────────────────────────── */

.grid {
    display: grid;
    gap: var(--sp-4);
}

.grid--3col {
    grid-template-columns: 1fr;
}

.grid--2col {
    grid-template-columns: 1fr;
}

.grid--gap-sm  { gap: var(--sp-2); }
.grid--gap-md  { gap: var(--sp-4); }
.grid--gap-lg  { gap: var(--sp-6); }
.grid--gap-xl  { gap: var(--sp-8); }

@media (min-width: 768px) {
    .grid--2col { grid-template-columns: 1fr 1fr; }
    .grid--3col { grid-template-columns: 1fr 1fr 1fr; }
}

/* Flex helpers */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }


/* 3. Components */
/* ── modules/header.css ── */
/* ─────────────────────────────────────────────────────────────
   Site header · top horizontal nav, hides-on-scroll behavior,
   mobile off-canvas drawer.

   Behavior (assets/js/main.js):
   - 0   – 80vh  : header fixed + visible
   - 80vh – 200vh: header hides on scroll-down
   - >80vh + scroll-up: header reappears
   ───────────────────────────────────────────────────────────── */

.site-header {
    background: var(--color-bg-dark);
    color: var(--color-text-inverse);
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    transition: transform var(--t-base);
    will-change: transform;
    border-bottom: 1px solid rgba(245, 232, 211, 0.08);
}

.site-header[data-hide="true"] {
    transform: translateY(-100%);
}

.site-header[data-pinned="false"] {
    /* Below initial 80vh, when not at top, we hide aggressively. JS sets data-hide. */
    background: var(--color-bg-darker);
}

/* Spacer so content doesn't slide under the fixed header */
body { padding-top: 56px; }
@media (min-width: 1100px) { body { padding-top: 64px; } }

.site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding-block: var(--sp-3);
    min-height: 56px;
}
@media (min-width: 1100px) {
    .site-header__inner { min-height: 64px; }
}

.site-header__logo {
    font-family: var(--font-headline);
    font-weight: var(--fw-extrabold);
    font-size: var(--fs-md);
    color: var(--color-text-inverse);
    letter-spacing: var(--tracking-tight);
    margin-right: auto;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
}

.site-header__logo-accent {
    color: var(--color-accent);
}

.site-header__logo-img {
    max-height: 32px;
    width: auto;
}

/* The `{{navigation}}` helper outputs a <ul class="nav">…</ul> structure */
.site-header__nav {
    display: none;
}

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

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

@media (min-width: 1024px) {
    .site-header__nav { display: flex; }
}

.site-header__nav .nav li a,
.site-header__link {
    font-family: var(--font-body);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-utility);
    text-transform: uppercase;
    color: rgba(245, 232, 211, 0.85);
    transition: color var(--t-fast);
}
.site-header__nav .nav li a:hover,
.site-header__nav .nav li.nav-current a {
    color: var(--color-accent);
}

.site-header__actions {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    margin-left: auto;
}

.site-header__search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: rgba(245, 232, 211, 0.85);
    border-radius: var(--r-sm);
    transition: color var(--t-fast), background var(--t-fast);
}
.site-header__search:hover { color: var(--color-accent); background: rgba(245, 232, 211, 0.06); }
.site-header__search svg { width: 18px; height: 18px; }

/* ── Mobile: burger + drawer ─────────────────────────── */
.site-header__burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    cursor: pointer;
    padding: 0;
    border: 0;
}
.site-header__burger > span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--color-text-inverse);
    border-radius: 1px;
    transition: transform var(--t-fast), opacity var(--t-fast);
}

@media (min-width: 1024px) {
    .site-header__burger { display: none; }
}

.site-drawer {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(86vw, 360px);
    background: var(--color-bg-dark);
    color: var(--color-text-inverse);
    z-index: 100;
    transform: translateX(100%);
    transition: transform var(--t-base);
    padding: var(--sp-8) var(--sp-6);
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
    overflow-y: auto;
    visibility: hidden;
}

.site-drawer[data-open="true"] {
    transform: translateX(0);
    visibility: visible;
}

.site-drawer__close {
    align-self: flex-end;
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    color: var(--color-text-inverse);
    border-radius: var(--r-sm);
    line-height: 1;
}
.site-drawer__close:hover { background: rgba(245, 232, 211, 0.08); }
.site-drawer__close svg { width: 20px; height: 20px; }

.site-drawer__nav .nav {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}
.site-drawer__nav .nav li a {
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    font-size: var(--fs-lg);
    color: var(--color-text-inverse);
    letter-spacing: var(--tracking-normal);
    text-transform: none;
    display: block;
    padding-block: var(--sp-2);
    border-bottom: 1px solid rgba(245, 232, 211, 0.08);
}
.site-drawer__nav .nav li a:hover {
    color: var(--color-accent);
}

.site-drawer__footer {
    margin-top: auto;
    padding-top: var(--sp-6);
    border-top: 1px solid rgba(245, 232, 211, 0.08);
}
.site-drawer__search {
    width: 100%;
    color: var(--color-text-inverse);
    border-color: rgba(245, 232, 211, 0.2);
}
.site-drawer__search:hover {
    background: var(--color-text-inverse);
    color: var(--color-bg-dark);
    border-color: var(--color-text-inverse);
}

.site-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base);
}
.site-drawer-backdrop[data-open="true"] {
    opacity: 1;
    pointer-events: auto;
}

/* Stop body scroll when drawer is open */
body.is-drawer-open {
    overflow: hidden;
}

/* ── modules/footer.css ── */
/* ─────────────────────────────────────────────────────────────
   Site footer · dark surface, multi-column nav, FTC disclosure mirror
   ───────────────────────────────────────────────────────────── */

.site-footer {
    background: var(--color-bg-darker);
    color: var(--color-text-inverse);
    padding-block: var(--sp-12);
    margin-top: var(--sp-16);
    border-top: 4px solid var(--color-accent);
}
@media (min-width: 1024px) {
    .site-footer { padding-block: var(--sp-16); }
}

.site-footer__top {
    display: grid;
    gap: var(--sp-8);
    grid-template-columns: 1fr;
    padding-bottom: var(--sp-8);
    border-bottom: 1px solid rgba(245, 232, 211, 0.12);
}
@media (min-width: 768px) {
    .site-footer__top {
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-12);
    }
}

.site-footer__brand .site-footer__logo {
    font-family: var(--font-headline);
    font-weight: var(--fw-extrabold);
    font-size: var(--fs-lg);
    color: var(--color-text-inverse);
    letter-spacing: var(--tracking-tight);
    text-transform: uppercase;
    line-height: 1;
    display: inline-block;
    margin-bottom: var(--sp-3);
}
.site-footer__brand .site-footer__logo:hover { color: var(--color-text-inverse); }
.site-footer__logo-accent { color: var(--color-accent); }
.site-footer__logo img { max-height: 36px; width: auto; }

.site-footer__tagline {
    font-size: var(--fs-sm);
    color: rgba(245, 232, 211, 0.65);
    line-height: var(--lh-body);
    max-width: 40ch;
}

.site-footer__nav .nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
@media (min-width: 768px) {
    .site-footer__nav .nav {
        align-items: flex-end;
    }
}
.site-footer__nav .nav a {
    color: rgba(245, 232, 211, 0.85);
    font-family: var(--font-body);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-sm);
    letter-spacing: var(--tracking-utility);
    text-transform: uppercase;
    transition: color var(--t-fast);
}
.site-footer__nav .nav a:hover {
    color: var(--color-accent);
}

.site-footer__bottom {
    padding-top: var(--sp-6);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.site-footer__copy {
    color: rgba(245, 232, 211, 0.55);
    font-size: var(--fs-xs);
    margin: 0;
}
.site-footer__copy a {
    color: rgba(245, 232, 211, 0.85);
}
.site-footer__copy a:hover { color: var(--color-accent); }

/* ── modules/cards.css ── */
/* ─────────────────────────────────────────────────────────────
   Cards · 3 variants (image-top / image-bg / image-left)
   Spec: docs/specs/2026-05-01-atg-theme-design.md § Card system
   ───────────────────────────────────────────────────────────── */

.card {
    position: relative;
    background: var(--color-bg-card);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--t-base), box-shadow var(--t-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.card__link {
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card__link:hover { color: inherit; }

.card__kicker {
    margin-block-end: var(--sp-2);
}

.card__title {
    margin-block-end: var(--sp-2);
    color: var(--color-text-primary);
}
.card:hover .card__title { color: var(--color-accent); }

.card__dek {
    color: var(--color-text-body);
    font-size: var(--fs-sm);
    line-height: var(--lh-body);
    margin-block-end: var(--sp-3);
    /* clamp dek to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card__meta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}
.card__sep { opacity: 0.6; }

/* ── Variant A: image-top ─────────────────────────────── */
.card--image-top .card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-divider);
}
.card--image-top .card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}
.card--image-top:hover .card__image img { transform: scale(1.03); }
.card--image-top .card__body {
    padding: var(--sp-4) var(--sp-6) var(--sp-6);
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Variant B: image-bg cinematic ────────────────────── */
.card--image-bg {
    min-height: 220px;
    color: var(--color-text-inverse);
    background: var(--color-bg-dark);
}
.card--image-bg .card__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.card--image-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(61,40,23,0.05) 0%, rgba(61,40,23,0.55) 60%, rgba(42,26,16,0.92) 100%);
    z-index: 1;
}
.card--image-bg .card__overlay {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding: var(--sp-6);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
.card--image-bg .card__title {
    color: var(--color-text-inverse);
}
.card--image-bg:hover .card__title { color: var(--color-text-inverse); text-decoration-color: var(--color-accent); }
.card--image-bg .card__dek {
    color: rgba(245, 232, 211, 0.85);
    -webkit-line-clamp: 3;
    margin-block-end: var(--sp-3);
}
.card--image-bg .card__meta {
    color: rgba(245, 232, 211, 0.75);
}

.card--image-bg--hero {
    min-height: 380px;
}
@media (min-width: 1024px) {
    .card--image-bg--hero { min-height: 560px; }
}

/* River-context image-bg cards on homepage are shorter */
.river--cinematic .card--image-bg {
    min-height: 280px;
}
@media (min-width: 1024px) {
    .river--cinematic .card--image-bg { min-height: 340px; }
}

/* ── Variant C: image-left horizontal ─────────────────── */
.card--image-left {
    flex-direction: row;
    overflow: hidden;
}
.card--image-left .card__link {
    flex-direction: row;
    width: 100%;
}
.card--image-left .card__image {
    flex: 0 0 120px;
    background: var(--color-divider);
    overflow: hidden;
}
@media (min-width: 768px) {
    .card--image-left .card__image { flex-basis: 200px; }
}
@media (min-width: 1100px) {
    .card--image-left .card__image { flex-basis: 240px; }
}
.card--image-left .card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}
.card--image-left:hover .card__image img { transform: scale(1.03); }
.card--image-left .card__body {
    padding: var(--sp-4) var(--sp-6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

/* Empty-state card — used when a homepage river has no posts */
.card--empty {
    min-height: 220px;
    background: rgba(193, 73, 38, 0.04);
    border: 1px dashed var(--color-divider-strong);
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--sp-8);
}
.card--empty:hover { transform: none; box-shadow: none; }
.card--empty p {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
}
.card--empty p strong {
    display: block;
    color: var(--color-text-primary);
    font-family: var(--font-headline);
    font-size: var(--fs-md);
    margin-block-end: var(--sp-1);
}

/* ── modules/buttons.css ── */
/* ─────────────────────────────────────────────────────────────
   Buttons · primary CTA, secondary, ghost
   ───────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-6);
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-utility);
    text-transform: uppercase;
    border-radius: var(--r-sm);
    transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
    cursor: pointer;
    line-height: 1;
    text-align: center;
}

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

.btn--primary {
    background: var(--color-accent);
    color: var(--color-text-inverse);
}
.btn--primary:hover {
    background: var(--color-accent-dark);
    color: var(--color-text-inverse);
    box-shadow: 0 4px 12px rgba(193, 73, 38, 0.25);
}

.btn--secondary {
    background: var(--color-bg-dark);
    color: var(--color-text-inverse);
}
.btn--secondary:hover {
    background: var(--color-bg-darker);
    color: var(--color-text-inverse);
}

.btn--ghost {
    background: transparent;
    color: var(--color-text-primary);
    border: 1.5px solid var(--color-divider-strong);
}
.btn--ghost:hover {
    background: var(--color-text-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-text-primary);
}

.btn--sm {
    padding: var(--sp-2) var(--sp-3);
    font-size: 11px;
}

.btn--lg {
    padding: var(--sp-4) var(--sp-8);
    font-size: var(--fs-sm);
}


/* 4. Templates */
/* ── modules/home.css ── */
/* ─────────────────────────────────────────────────────────────
   Homepage · hero + 3 secondary + 3 rivers
   Spec: docs/specs/2026-05-01-atg-theme-design.md § Homepage
   ───────────────────────────────────────────────────────────── */

/* ── Cinematic hero ───────────────────────────────────── */
.home-hero {
    margin-block-start: 0;
    margin-block-end: var(--sp-12);
}
@media (min-width: 1024px) {
    .home-hero { margin-block-end: var(--sp-16); }
}
.home-hero .card {
    border-radius: 0;
    box-shadow: none;
}
.home-hero .card:hover { transform: none; }

/* ── Secondary features (3 cards in a row) ────────────── */
.home-secondary {
    margin-block-end: var(--sp-12);
}
@media (min-width: 1024px) {
    .home-secondary { margin-block-end: var(--sp-16); }
}
.home-secondary__grid {
    display: grid;
    gap: var(--sp-6);
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .home-secondary__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .home-secondary__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--sp-8);
    }
}

/* ── Rivers ────────────────────────────────────────────── */
.river {
    padding-block: var(--sp-12);
}
.river:nth-child(odd) {
    background: rgba(193, 73, 38, 0.03);
}
@media (min-width: 1024px) {
    .river { padding-block: var(--sp-16); }
}

.river__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-block-end: var(--sp-6);
}

.river__title {
    margin-block-end: 0;
}

.river__more {
    font-family: var(--font-body);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-utility);
    text-transform: uppercase;
    color: var(--color-text-primary);
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
}
.river__more:hover { color: var(--color-accent); }
.river__more svg {
    width: 14px;
    height: 14px;
    transition: transform var(--t-fast);
}
.river__more:hover svg { transform: translateX(2px); }

.river__feed {
    display: grid;
    gap: var(--sp-6);
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .river--cinematic .river__feed { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .river--cinematic .river__feed { grid-template-columns: repeat(3, 1fr); }
}

/* image-left cards stack on a list river — single column with comfortable spacing */
.river--list .river__feed {
    gap: var(--sp-4);
}
@media (min-width: 1024px) {
    .river--list .river__feed { gap: var(--sp-6); }
}

.river__feed--empty {
    grid-template-columns: 1fr;
}

/* ── Archive (index.hbs) ───────────────────────────────── */
.archive {
    padding-block: var(--sp-12);
}
.archive__header {
    margin-block-end: var(--sp-8);
}
.archive__title {
    margin-block-end: var(--sp-3);
}
.archive__lead {
    color: var(--color-text-body);
    max-width: 60ch;
}
.archive__feed {
    display: grid;
    gap: var(--sp-6);
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .archive__feed { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .archive__feed { grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
}

/* Pagination (Ghost helper output) */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--sp-4);
    margin-block-start: var(--sp-12);
    font-size: var(--fs-sm);
}
.pagination a {
    color: var(--color-text-primary);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-utility);
}
.pagination a:hover { color: var(--color-accent); }
.pagination .page-number {
    color: var(--color-text-muted);
}

/* ── modules/post.css ── */
/* ─────────────────────────────────────────────────────────────
   Post page · full-bleed hero, body, sticky sidebar, related
   Spec: docs/specs/2026-05-01-atg-theme-design.md § Post page
   ───────────────────────────────────────────────────────────── */

.post {
    color: var(--color-text-body);
}

/* ── Hero ──────────────────────────────────────────────── */
.post__hero {
    position: relative;
    height: 50vh;
    min-height: 360px;
    overflow: hidden;
    background: var(--color-bg-dark);
    margin-block-end: var(--sp-12);
}
@media (min-width: 1024px) {
    .post__hero {
        height: 70vh;
        min-height: 520px;
    }
}

.post__hero--no-image {
    height: auto;
    min-height: 0;
    padding-block: var(--sp-12) var(--sp-8);
    background: var(--color-bg-dark);
}

.post__hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.post__hero-overlay {
    position: relative;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding-block: var(--sp-12);
    background: linear-gradient(
        180deg,
        rgba(61,40,23,0.10) 0%,
        rgba(61,40,23,0.40) 40%,
        rgba(61,40,23,0.85) 100%
    );
}
.post__hero--no-image .post__hero-overlay {
    background: none;
    align-items: flex-start;
    padding-block: 0;
}

.post__kicker {
    display: inline-block;
    margin-block-end: var(--sp-3);
}
.post__title {
    color: var(--color-text-inverse);
    margin-block-end: var(--sp-3);
    max-width: 24ch;
}
.post__dek {
    color: rgba(245, 232, 211, 0.92);
    max-width: 60ch;
    margin-block-end: var(--sp-4);
}
.post__meta {
    color: rgba(245, 232, 211, 0.75);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-wrap: wrap;
}
.post__sep { opacity: 0.5; }

@media (min-width: 1024px) {
    .post__title { font-size: var(--fs-2xl); }
}

/* ── Body ──────────────────────────────────────────────── */
.post__body {
    margin-bottom: var(--sp-16);
}

.post__content {
    max-width: 680px;
    margin-inline: auto;
    padding-inline: var(--sp-6);
    font-size: var(--fs-md);
    line-height: var(--lh-body);
    color: var(--color-text-body);
}
.post__content > p,
.post__content > ul,
.post__content > ol,
.post__content > blockquote,
.post__content > pre,
.post__content > h2,
.post__content > h3,
.post__content > h4,
.post__content > figure,
.post__content > .kg-card {
    margin-block: var(--sp-6);
}
.post__content > p:first-child {
    font-size: var(--fs-md);
    color: var(--color-text-primary);
}
.post__content h2 {
    font-size: var(--fs-xl);
    margin-block: var(--sp-12) var(--sp-4);
    color: var(--color-text-primary);
}
.post__content h3 {
    font-size: var(--fs-lg);
    margin-block: var(--sp-8) var(--sp-3);
    color: var(--color-text-primary);
}
.post__content a:not(.btn) {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.post__content a:not(.btn):hover {
    color: var(--color-accent-dark);
}
.post__content ul,
.post__content ol {
    padding-left: var(--sp-6);
    list-style: revert;
}
.post__content ul li,
.post__content ol li {
    margin-block: var(--sp-2);
}
.post__content figure img,
.post__content img {
    border-radius: var(--r-md);
}
.post__content figcaption {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--sp-2);
    line-height: var(--lh-snug);
}
.post__content hr {
    border: 0;
    border-top: 1px solid var(--color-divider);
    margin-block: var(--sp-12);
}

/* ── AdSense placeholder ──────────────────────────────── */
.ad-slot {
    background: rgba(193, 73, 38, 0.04);
    border: 1px dashed var(--color-divider-strong);
    border-radius: var(--r-sm);
    padding: var(--sp-6);
    text-align: center;
    margin-block: var(--sp-8);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-slot__label {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    letter-spacing: var(--tracking-utility);
    text-transform: uppercase;
}

/* ── Sticky sidebar (desktop ≥ 1100px only) ──────────── */
@media (min-width: 1100px) {
    .post--has-sidebar .post__body--with-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 680px) 320px;
        gap: var(--sp-12);
        max-width: 1100px;
        margin-inline: auto;
        padding-inline: var(--sp-6);
    }
    .post--has-sidebar .post__content {
        margin-inline: 0;
        padding-inline: 0;
        max-width: 680px;
    }
    .post__sidebar {
        position: relative;
    }
    .post__sidebar-inner {
        position: sticky;
        top: 96px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        background: var(--color-bg-card);
        border: 1px solid var(--color-divider);
        border-radius: var(--r-md);
        padding: var(--sp-6);
        box-shadow: var(--shadow-card);
    }
    .post__sidebar-kicker {
        margin-block-end: var(--sp-3);
        padding-bottom: var(--sp-2);
        border-bottom: 1px solid var(--color-divider);
    }
}

/* Hide sidebar entirely below 1100px */
@media (max-width: 1099px) {
    .post__sidebar { display: none; }
}

/* ── Related posts ─────────────────────────────────────── */
.post__related {
    background: rgba(193, 73, 38, 0.04);
    padding-block: var(--sp-12);
    border-top: 1px solid var(--color-divider);
}
@media (min-width: 1024px) {
    .post__related { padding-block: var(--sp-16); }
}
.post__related-title {
    margin-block-end: var(--sp-6);
}
.post__related-feed {
    display: grid;
    gap: var(--sp-6);
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .post__related-feed { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .post__related-feed { grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
}

/* ── Comments wrapper ──────────────────────────────────── */
.post__comments {
    margin-block-end: var(--sp-16);
}

/* ── modules/page.css ── */
/* ─────────────────────────────────────────────────────────────
   Static page · About / Privacy / Contact / Sitemap
   Spec: docs/specs/2026-05-01-atg-theme-design.md § Static pages
   ───────────────────────────────────────────────────────────── */

.page-static {
    color: var(--color-text-body);
}

.page-static__header {
    padding-block: var(--sp-12) var(--sp-8);
    border-bottom: 1px solid var(--color-divider);
    margin-block-end: var(--sp-12);
}
@media (min-width: 1024px) {
    .page-static__header { padding-block: var(--sp-16) var(--sp-12); }
}

.page-static__title {
    margin-block-end: var(--sp-3);
}
.page-static__lead {
    color: var(--color-text-body);
    max-width: 60ch;
}

.page-static__content {
    max-width: 680px;
    margin-inline: auto;
    padding-inline: var(--sp-6);
    margin-block-end: var(--sp-16);
    font-size: var(--fs-md);
    line-height: var(--lh-body);
    color: var(--color-text-body);
}
.page-static__content > p,
.page-static__content > ul,
.page-static__content > ol,
.page-static__content > h2,
.page-static__content > h3 {
    margin-block: var(--sp-6);
}
.page-static__content h2 {
    font-size: var(--fs-xl);
    margin-block: var(--sp-12) var(--sp-4);
    color: var(--color-text-primary);
}
.page-static__content h3 {
    font-size: var(--fs-lg);
    margin-block: var(--sp-8) var(--sp-3);
    color: var(--color-text-primary);
}
.page-static__content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.page-static__content a:hover { color: var(--color-accent-dark); }

/* ── modules/tag.css ── */
/* ─────────────────────────────────────────────────────────────
   Tag / category page · per-category card style + hero
   Spec: docs/specs/2026-05-01-atg-theme-design.md § Category pages
   ───────────────────────────────────────────────────────────── */

.archive-hero {
    position: relative;
    background: var(--color-bg-dark);
    color: var(--color-text-inverse);
    overflow: hidden;
    padding-block: var(--sp-12) var(--sp-12);
    margin-block-end: var(--sp-12);
    min-height: 220px;
    display: flex;
    align-items: center;
}
@media (min-width: 1024px) {
    .archive-hero {
        padding-block: var(--sp-16) var(--sp-16);
        min-height: 320px;
        margin-block-end: var(--sp-16);
    }
}

.archive-hero--has-image .archive-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.archive-hero--has-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(61,40,23,0.45) 0%, rgba(61,40,23,0.85) 100%);
    z-index: 1;
}

.archive-hero__overlay {
    position: relative;
    z-index: 2;
    width: 100%;
}

.archive-hero__kicker {
    margin-block-end: var(--sp-2);
}
.archive-hero__title {
    color: var(--color-text-inverse);
    margin-block-end: var(--sp-3);
}
.archive-hero__lead {
    color: rgba(245, 232, 211, 0.92);
    max-width: 60ch;
}
.archive-hero__location {
    margin-top: var(--sp-2);
    color: rgba(245, 232, 211, 0.65);
}

/* Gear-specific intro */
.archive-intro {
    margin-block-end: var(--sp-8);
}
.archive-intro .lead {
    color: var(--color-text-body);
}

/* Per-feed grid layouts */
.archive__feed--cinematic {
    display: grid;
    gap: var(--sp-6);
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .archive__feed--cinematic { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .archive__feed--cinematic { grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
}

.archive__feed--list {
    display: grid;
    gap: var(--sp-4);
    grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
    .archive__feed--list { gap: var(--sp-6); }
}

.archive__feed--default {
    display: grid;
    gap: var(--sp-6);
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .archive__feed--default { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .archive__feed--default { grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
}


/* 5. Ghost editor cards (.kg-*) inside .gh-content */
/* ── modules/gh-content.css ── */
/* ─────────────────────────────────────────────────────────────
   Ghost editor cards · .kg-* classes inside .gh-content
   Styled with cybersec tokens. Covers the cards Ghost editors
   actually use: image, gallery, callout, button, bookmark,
   embed, file, header, toggle, blockquote-alt, signup.
   ───────────────────────────────────────────────────────────── */

.gh-content {
    --ghost-accent-color: var(--color-accent);
}

/* Width helpers */
.gh-content > .kg-width-wide {
    max-width: 920px;
    width: calc(100% + 240px);
    margin-inline: -120px;
}
.gh-content > .kg-width-full {
    max-width: none;
    width: 100vw;
    margin-inline: calc(50% - 50vw);
}
@media (max-width: 1100px) {
    .gh-content > .kg-width-wide {
        width: 100%;
        margin-inline: 0;
    }
}

/* Image card */
.kg-image-card {
    margin-block: var(--sp-8);
}
.kg-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--r-md);
    background: var(--color-divider);
}
.kg-image-card.kg-width-full .kg-image {
    border-radius: 0;
}
.kg-image-card figcaption {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--sp-2);
    line-height: var(--lh-snug);
}

/* Gallery card */
.kg-gallery-card {
    margin-block: var(--sp-8);
}
.kg-gallery-container {
    display: grid;
    gap: var(--sp-2);
}
.kg-gallery-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: var(--sp-2);
}
.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--r-sm);
    background: var(--color-divider);
}

/* Callout card */
.kg-callout-card {
    margin-block: var(--sp-6);
    padding: var(--sp-4) var(--sp-6);
    border-radius: var(--r-md);
    display: flex;
    gap: var(--sp-3);
    align-items: flex-start;
    background: rgba(193, 73, 38, 0.08);
}
.kg-callout-card.kg-callout-card-grey  { background: rgba(61, 40, 23, 0.06); }
.kg-callout-card.kg-callout-card-blue  { background: rgba(46, 102, 145, 0.10); }
.kg-callout-card.kg-callout-card-green { background: rgba(91, 121, 70, 0.10); }
.kg-callout-card.kg-callout-card-pink  { background: rgba(193, 73, 38, 0.10); }
.kg-callout-card.kg-callout-card-yellow{ background: rgba(193, 152, 38, 0.12); }
.kg-callout-card.kg-callout-card-red   { background: rgba(193, 73, 38, 0.12); }
.kg-callout-card-accent { background: var(--color-accent); color: var(--color-text-inverse); }
.kg-callout-card-accent .kg-callout-text { color: var(--color-text-inverse); }
.kg-callout-emoji {
    font-size: 1.2em;
    line-height: 1.4;
}
.kg-callout-text {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--color-text-primary);
    line-height: var(--lh-body);
}

/* Button card */
.kg-button-card {
    margin-block: var(--sp-8);
    text-align: center;
}
.kg-button-card .kg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-3) var(--sp-8);
    background: var(--color-accent);
    color: var(--color-text-inverse);
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    font-size: var(--fs-sm);
    letter-spacing: var(--tracking-utility);
    text-transform: uppercase;
    border-radius: var(--r-sm);
    transition: background var(--t-fast), transform var(--t-fast);
    text-decoration: none !important;
}
.kg-button-card .kg-btn:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
    color: var(--color-text-inverse);
}
.kg-button-card.kg-align-left  { text-align: left; }
.kg-button-card.kg-align-right { text-align: right; }

/* Bookmark card */
.kg-bookmark-card {
    margin-block: var(--sp-6);
}
.kg-bookmark-container {
    display: flex;
    border: 1px solid var(--color-divider);
    border-radius: var(--r-md);
    background: var(--color-bg-card);
    color: var(--color-text-primary) !important;
    text-decoration: none;
    overflow: hidden;
    transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.kg-bookmark-container:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
    color: var(--color-text-primary) !important;
}
.kg-bookmark-content {
    padding: var(--sp-4) var(--sp-6);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
.kg-bookmark-title {
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    font-size: var(--fs-base);
    color: var(--color-text-primary);
    line-height: var(--lh-tight);
}
.kg-bookmark-description {
    font-size: var(--fs-sm);
    color: var(--color-text-body);
    line-height: var(--lh-snug);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kg-bookmark-metadata {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: auto;
}
.kg-bookmark-icon {
    width: 18px;
    height: 18px;
    border-radius: 2px;
}
.kg-bookmark-thumbnail {
    flex-basis: 240px;
    flex-shrink: 0;
    overflow: hidden;
}
.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 600px) {
    .kg-bookmark-container { flex-direction: column-reverse; }
    .kg-bookmark-thumbnail { flex-basis: auto; aspect-ratio: 16/9; }
}

/* Embed (video / iframe) */
.kg-embed-card {
    margin-block: var(--sp-8);
    display: flex;
    justify-content: center;
}
.kg-embed-card iframe {
    max-width: 100%;
    border-radius: var(--r-md);
}

/* Header card */
.kg-header-card {
    margin-block: var(--sp-12);
    padding: var(--sp-12) var(--sp-6);
    background: var(--color-bg-dark);
    color: var(--color-text-inverse);
    text-align: center;
    border-radius: var(--r-md);
}
.kg-header-card h2.kg-header-card-header {
    font-family: var(--font-headline);
    font-weight: var(--fw-extrabold);
    color: var(--color-text-inverse);
    font-size: var(--fs-xl);
    line-height: var(--lh-tight);
    margin-bottom: var(--sp-3);
}
.kg-header-card h3.kg-header-card-subheader {
    font-family: var(--font-body);
    font-weight: var(--fw-normal);
    color: rgba(245, 232, 211, 0.85);
    font-size: var(--fs-md);
}
.kg-header-card a.kg-header-card-button {
    display: inline-block;
    margin-top: var(--sp-4);
    padding: var(--sp-3) var(--sp-8);
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-utility);
    font-size: var(--fs-sm);
}

/* Toggle card */
.kg-toggle-card {
    margin-block: var(--sp-6);
    border: 1px solid var(--color-divider);
    border-radius: var(--r-md);
    padding: var(--sp-4) var(--sp-6);
    background: var(--color-bg-card);
}
.kg-toggle-card .kg-toggle-heading {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-3);
}
.kg-toggle-card .kg-toggle-heading-text {
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    color: var(--color-text-primary);
    font-size: var(--fs-md);
    margin: 0;
}
.kg-toggle-card .kg-toggle-content {
    margin-top: var(--sp-3);
    color: var(--color-text-body);
}

/* File card */
.kg-file-card {
    margin-block: var(--sp-6);
    border: 1px solid var(--color-divider);
    border-radius: var(--r-md);
    background: var(--color-bg-card);
}
.kg-file-card .kg-file-card-container {
    padding: var(--sp-4);
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    color: var(--color-text-primary);
}
.kg-file-card-title {
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    color: var(--color-text-primary);
    font-size: var(--fs-base);
}
.kg-file-card-caption {
    font-size: var(--fs-sm);
    color: var(--color-text-body);
}
.kg-file-card-metadata {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin-top: var(--sp-1);
}

/* Blockquote variants */
.gh-content blockquote.kg-blockquote-alt {
    border-left: 0;
    padding: 0;
    text-align: center;
    font-family: var(--font-headline);
    font-size: var(--fs-lg);
    color: var(--color-text-primary);
    font-style: normal;
    margin: var(--sp-8) auto;
    max-width: 540px;
}

/* Email-only / signup reminder cards (Ghost native) */
.kg-signup-card {
    margin-block: var(--sp-12);
    padding: var(--sp-8);
    background: var(--color-bg-dark);
    color: var(--color-text-inverse);
    border-radius: var(--r-md);
    text-align: center;
}
.kg-signup-card h2 {
    font-family: var(--font-headline);
    color: var(--color-text-inverse);
    margin-bottom: var(--sp-3);
}
.kg-signup-card p { color: rgba(245, 232, 211, 0.85); }
.kg-signup-card button {
    margin-top: var(--sp-4);
    padding: var(--sp-3) var(--sp-8);
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-utility);
}

/* Responsive table wrapper added by main.js */
.gh-table {
    overflow-x: auto;
    margin-block: var(--sp-6);
}


/* 6. Gear / monetization modules */
/* ── modules/gear-callout.css ── */
/* ─────────────────────────────────────────────────────────────
   Module 1 · Inline gear callout (mid-paragraph aside)
   Editor inserts via Ghost HTML card:
   <aside class="gear-callout" data-product>
     <img src="..." alt="..."> (optional)
     <div class="gear-callout__body">
       <p class="gear-callout__name">Hyperlite Mountain Gear Junction 55</p>
       <p class="gear-callout__meta">$340 · 9/10</p>
       <a class="gear-callout__cta btn btn--primary btn--sm" href="#">View at REI</a>
     </div>
   </aside>
   Spec: docs/specs/2026-05-01-atg-theme-design.md § Monetization > Module 1
   ───────────────────────────────────────────────────────────── */

.gear-callout {
    display: flex;
    gap: var(--sp-4);
    align-items: flex-start;
    border-left: 4px solid var(--color-accent);
    background: rgba(193, 73, 38, 0.04);
    padding: var(--sp-4) var(--sp-6);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    margin-block: var(--sp-6);
}

.gear-callout > img,
.gear-callout__image {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--r-sm);
    flex-shrink: 0;
}
@media (max-width: 480px) {
    .gear-callout > img,
    .gear-callout__image { width: 72px; height: 72px; }
}

.gear-callout__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.gear-callout__kicker {
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-kicker);
    text-transform: uppercase;
    color: var(--color-accent);
    margin: 0;
    line-height: 1;
}

.gear-callout__name {
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    font-size: var(--fs-md);
    color: var(--color-text-primary);
    line-height: var(--lh-tight);
    margin: 0;
}

.gear-callout__meta {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin: 0;
}
.gear-callout__meta strong {
    color: var(--color-text-primary);
    font-weight: var(--fw-bold);
}

.gear-callout__cta {
    align-self: flex-start;
    margin-top: var(--sp-2);
}

/* ── modules/gear-shop.css ── */
/* ─────────────────────────────────────────────────────────────
   Module 2 · End-of-section "Shop This" block
   Editor inserts via Ghost HTML card:
   <div class="gear-shop">
     <p class="gear-shop__kicker">Shop this gear list</p>
     <div class="gear-shop__grid">
       <div class="gear-shop__item">
         <img src="..." alt="...">
         <p class="gear-shop__name">Hyperlite Mountain Gear Junction 55</p>
         <p class="gear-shop__price">$340</p>
         <a class="btn btn--primary btn--sm" href="#">View at REI</a>
       </div>
       …
     </div>
   </div>
   Spec: docs/specs/2026-05-01-atg-theme-design.md § Monetization > Module 2
   ───────────────────────────────────────────────────────────── */

.gear-shop {
    border: 2px solid var(--color-accent);
    border-radius: var(--r-md);
    padding: var(--sp-6);
    background: var(--color-bg-card);
    margin-block: var(--sp-12);
}

.gear-shop__kicker {
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-kicker);
    text-transform: uppercase;
    color: var(--color-accent);
    margin: 0 0 var(--sp-4);
    line-height: 1;
}

.gear-shop__grid {
    display: grid;
    gap: var(--sp-4);
    grid-template-columns: 1fr;
}
@media (min-width: 600px) {
    .gear-shop__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .gear-shop__grid { grid-template-columns: repeat(3, 1fr); }
}

.gear-shop__item {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    padding: var(--sp-4);
    border: 1px solid var(--color-divider);
    border-radius: var(--r-sm);
    background: var(--color-bg-page);
    text-align: left;
}

.gear-shop__item > img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--r-sm);
    margin-bottom: var(--sp-2);
    background: var(--color-divider);
}

.gear-shop__name {
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    font-size: var(--fs-base);
    color: var(--color-text-primary);
    line-height: var(--lh-tight);
    margin: 0;
}

.gear-shop__price {
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    font-size: var(--fs-sm);
    color: var(--color-text-body);
    margin: 0;
}

.gear-shop__item .btn {
    margin-top: auto;
    align-self: stretch;
}

/* ── modules/gear-sidebar.css ── */
/* ─────────────────────────────────────────────────────────────
   Module 3 · Sticky right sidebar (desktop ≥ 1100px only)
   Triggered by `gear-sidebar` tag; layout grid is set in post.css.
   This file only handles list-item styling inside .post__sidebar-list.
   Editor inserts <div class="post-sidebar-source">…</div> at top of
   the post body; that source data is what we render server-side via
   the Ghost HTML card.

   Markup pattern (editor inserts inside .post__sidebar-list):
     <div class="gear-sidebar-item">
       <img src="..." alt="..." class="gear-sidebar-item__img">
       <div class="gear-sidebar-item__body">
         <p class="gear-sidebar-item__name">Junction 55</p>
         <p class="gear-sidebar-item__meta">$340</p>
         <a class="gear-sidebar-item__cta" href="#">View at REI ↗</a>
       </div>
     </div>
   Spec: docs/specs/2026-05-01-atg-theme-design.md § Monetization > Module 3
   ───────────────────────────────────────────────────────────── */

.post__sidebar-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.gear-sidebar-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: var(--sp-3);
    align-items: flex-start;
    padding-bottom: var(--sp-3);
    border-bottom: 1px solid var(--color-divider);
}
.gear-sidebar-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.gear-sidebar-item__img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--r-sm);
    background: var(--color-divider);
}

.gear-sidebar-item__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gear-sidebar-item__name {
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    color: var(--color-text-primary);
    margin: 0;
}

.gear-sidebar-item__meta {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin: 0;
}

.gear-sidebar-item__cta {
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-utility);
    text-transform: uppercase;
    color: var(--color-accent);
    margin-top: var(--sp-1);
    display: inline-block;
}
.gear-sidebar-item__cta:hover { color: var(--color-accent-dark); }

/* ── modules/gear-table.css ── */
/* ─────────────────────────────────────────────────────────────
   Module 4 · Comparison table (default for best-of articles)
   Triggered by `comparison-table` tag or template post-comparison.hbs.
   Sticky header on scroll (vanilla JS IntersectionObserver in main.js).

   Editor inserts:
     <table class="gear-comparison-table">
       <thead>
         <tr>
           <th>Pack</th><th>Weight</th><th>Volume</th><th>Price</th><th></th>
         </tr>
       </thead>
       <tbody>
         <tr>
           <td>
             <img class="gear-comparison-table__img" src="..." alt="">
             <div>
               <p class="gear-comparison-table__name">Junction 55</p>
               <p class="gear-comparison-table__meta">Hyperlite Mountain Gear</p>
             </div>
           </td>
           <td>1.9 lb</td>
           <td>55 L</td>
           <td>$340</td>
           <td><a class="btn btn--primary btn--sm" href="#">View at REI</a></td>
         </tr>
         …
       </tbody>
     </table>
   Spec: docs/specs/2026-05-01-atg-theme-design.md § Monetization > Module 4
   ───────────────────────────────────────────────────────────── */

.gear-comparison-table-wrap {
    overflow-x: auto;
    margin-block: var(--sp-12);
    border: 1px solid var(--color-divider);
    border-radius: var(--r-md);
    background: var(--color-bg-card);
}

.gear-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    color: var(--color-text-body);
    margin: 0;
}

.gear-comparison-table thead th {
    background: var(--color-bg-dark);
    color: var(--color-text-inverse);
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-utility);
    text-transform: uppercase;
    text-align: left;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 2px solid var(--color-accent);
    position: sticky;
    top: 56px;
    z-index: 5;
}
@media (min-width: 1100px) {
    .gear-comparison-table thead th { top: 64px; }
}

.gear-comparison-table.is-stuck thead th {
    box-shadow: 0 4px 12px rgba(61, 40, 23, 0.18);
}

.gear-comparison-table tbody tr {
    border-bottom: 1px solid var(--color-divider);
    transition: background var(--t-fast);
}
.gear-comparison-table tbody tr:nth-child(even) {
    background: rgba(193, 73, 38, 0.025);
}
.gear-comparison-table tbody tr:hover {
    background: rgba(193, 73, 38, 0.06);
}

.gear-comparison-table tbody td {
    padding: var(--sp-3) var(--sp-4);
    vertical-align: middle;
}

.gear-comparison-table__img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--r-sm);
    background: var(--color-divider);
    display: inline-block;
    vertical-align: middle;
    margin-right: var(--sp-3);
}

.gear-comparison-table__name {
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    font-size: var(--fs-base);
    color: var(--color-text-primary);
    margin: 0;
    line-height: var(--lh-tight);
    display: inline-block;
    vertical-align: middle;
}

.gear-comparison-table__meta {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin: 0;
    display: inline-block;
    vertical-align: middle;
    margin-left: var(--sp-2);
}

.gear-comparison-table__sentinel {
    height: 1px;
}

@media (max-width: 767px) {
    .gear-comparison-table {
        min-width: 600px;
    }
    .gear-comparison-table-wrap {
        border-radius: 0;
        margin-inline: calc(var(--sp-6) * -1);
    }
}

/* ── modules/affiliate-disclosure.css ── */
/* ─────────────────────────────────────────────────────────────
   Affiliate disclosure · FTC-required line above body in any post
   tagged with a gear module, plus mirrored copy in footer.
   Spec: docs/specs/2026-05-01-atg-theme-design.md § Affiliate disclosure
   ───────────────────────────────────────────────────────────── */

.affiliate-disclosure {
    margin: var(--sp-4) 0 var(--sp-6);
    padding: var(--sp-3) var(--sp-4);
    background: rgba(193, 73, 38, 0.04);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.affiliate-disclosure p {
    font-family: var(--font-headline);
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    line-height: var(--lh-snug);
    margin: 0;
}

/* Footer-mirrored version (smaller, subdued) */
.site-footer .affiliate-disclosure {
    background: transparent;
    border-left: 0;
    padding: 0;
    margin: var(--sp-4) 0 0;
}
.site-footer .affiliate-disclosure p {
    color: rgba(245, 232, 211, 0.55);
}


/* 7. Utilities (last so they win) */
/* ── modules/utilities.css ── */
/* ─────────────────────────────────────────────────────────────
   Utilities · low-level helpers (last in import order to win)
   ───────────────────────────────────────────────────────────── */

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

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-accent  { color: var(--color-accent); }
.text-muted   { color: var(--color-text-muted); }
.text-inverse { color: var(--color-text-inverse); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }

.hidden { display: none; }

@media (max-width: 767px)  { .hidden-mobile { display: none !important; } }
@media (min-width: 768px)  { .hidden-desktop { display: none !important; } }

.divider {
    height: 1px;
    background: var(--color-divider);
    margin-block: var(--sp-8);
    border: 0;
}
