/* ================================================================
   GHOST THEME 51 INSIGHTS — screen.css
   Institutional-grade digital asset intelligence
   Dark mode default, light mode via [data-theme="light"]

   1.  CSS Variables & Reset
   2.  Light Mode Overrides
   3.  Typography & Layout
   4.  Buttons & Forms
   5.  Navigation
   6.  Homepage (Hero, Categories, Recent)
   7.  Featured Post
   8.  Post Card
   9.  Category Badge
   10. Single Post
   11. Static Page
   12. Tag & Author Archives
   13. Content Gate CTA
   14. Member CTA
   15. Pagination
   16. Error Pages
   17. Author Card & Related
   18. Post Navigation
   19. Footer
   20. Ghost Koenig Editor Cards
   21. Animations & Utilities
   22. Responsive
   23. Print Styles
   ================================================================ */


/* ================================================================
   1. CSS VARIABLES & RESET
   ================================================================ */

:root {
    --bg: #000000;
    --surface: #0a0a0a;
    --elevated: #111111;
    --elevated-2: #171717;
    --elevated-3: #1c1c1c;

    --border-faint: rgba(255,255,255,0.04);
    --border-subtle: rgba(255,255,255,0.07);
    --border-default: rgba(255,255,255,0.12);
    --border-strong: rgba(255,255,255,0.20);

    --text-primary: #ededed;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --text-faint: #444444;

    --brand: #0A06E5;
    --brand-light: #58C7F7;
    --brand-green: #98EA65;
    --brand-red: #ff6b6b;
    --brand-glow: rgba(10,6,229,0.15);

    --page-width: 1200px;
    --page-gutter: 24px;
    --content-width: 720px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-pill: 100px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-snappy: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Sora', sans-serif;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    line-height: 1.08;
    font-weight: 600;
}

.mono { font-family: 'IBM Plex Mono', monospace; }

::selection { background: rgba(10,6,229,0.3); color: #fff; }


/* ================================================================
   2. LIGHT MODE OVERRIDES
   ================================================================ */

[data-theme="light"] {
    --bg: #ffffff;
    --surface: #f7f7f9;
    --elevated: #efeff2;
    --elevated-2: #e6e6eb;
    --elevated-3: #dddde3;

    --border-faint: rgba(0,0,0,0.04);
    --border-subtle: rgba(0,0,0,0.07);
    --border-default: rgba(0,0,0,0.12);
    --border-strong: rgba(0,0,0,0.22);

    --text-primary: #111111;
    --text-secondary: #4a4a4a;
    --text-muted: #7a7a7a;
    --text-faint: #aaaaaa;

    --brand: #0A06E5;
    --brand-light: #2563eb;
    --brand-green: #16a34a;
    --brand-red: #dc2626;
    --brand-glow: rgba(10,6,229,0.08);
}

[data-theme="light"] ::selection { background: rgba(10,6,229,0.15); color: #111; }

/* Nav */
[data-theme="light"] .nav { background: rgba(255,255,255,0.85); border-bottom-color: rgba(0,0,0,0.06); }
[data-theme="light"] .nav-links li a:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .mobile-menu { background: rgba(255,255,255,0.97); }
[data-theme="light"] .mobile-menu a { color: var(--text-secondary); }
[data-theme="light"] .mobile-menu a:hover { background: rgba(0,0,0,0.04); color: var(--text-primary); }

/* Buttons */
[data-theme="light"] .btn-primary { background: #111; color: #fff; }
[data-theme="light"] .btn-primary:hover { background: #222; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
[data-theme="light"] .btn-brand { background: linear-gradient(135deg, #0A06E5, #3a35ff); color: #fff; }
[data-theme="light"] .btn-secondary { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); }
[data-theme="light"] .btn-secondary:hover { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25); background: rgba(0,0,0,0.02); }

/* Cards */
[data-theme="light"] .post-card { box-shadow: 0 1px 3px rgba(0,0,0,0.04), inset 0 0 0 1px rgba(0,0,0,0.06); }
[data-theme="light"] .post-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08), inset 0 0 0 1px rgba(0,0,0,0.1); }
[data-theme="light"] .post-nav-item { box-shadow: 0 1px 3px rgba(0,0,0,0.04), inset 0 0 0 1px rgba(0,0,0,0.06); }
[data-theme="light"] .post-nav-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06), inset 0 0 0 1px rgba(0,0,0,0.1); }
[data-theme="light"] .content-cta { box-shadow: 0 2px 8px rgba(0,0,0,0.06), inset 0 0 0 1px rgba(0,0,0,0.06); }
[data-theme="light"] .author-card { box-shadow: 0 1px 3px rgba(0,0,0,0.04), inset 0 0 0 1px rgba(0,0,0,0.06); }

/* Homepage — Hero & stream (light mode) */
[data-theme="light"] .hero-main { box-shadow: 0 1px 3px rgba(0,0,0,0.06), inset 0 0 0 1px rgba(0,0,0,0.06); }
[data-theme="light"] .hero-main-link:hover { background: rgba(0,0,0,0.015); }
[data-theme="light"] .stream-item:hover { background: rgba(0,0,0,0.015); }
[data-theme="light"] .deepdive-card { box-shadow: 0 1px 3px rgba(0,0,0,0.04), inset 0 0 0 1px rgba(0,0,0,0.06); }
[data-theme="light"] .deepdive-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08), inset 0 0 0 1px rgba(0,0,0,0.1); }
[data-theme="light"] .sidebar-block { box-shadow: 0 1px 3px rgba(0,0,0,0.04), inset 0 0 0 1px rgba(0,0,0,0.06); }
[data-theme="light"] .archive-pill { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); }
[data-theme="light"] .archive-pill:hover { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2); background: rgba(0,0,0,0.02); }

/* Badges */
[data-theme="light"] .post-card-premium,
[data-theme="light"] .post-meta-premium { background: rgba(10,6,229,0.08); color: #0A06E5; }
[data-theme="light"] .category-badge { background: rgba(10,6,229,0.08); color: #0A06E5; }
[data-theme="light"] .category-badge--briefing,
[data-theme="light"] .category-badge--hash-briefing { background: rgba(10,6,229,0.06); color: #0A06E5; }
[data-theme="light"] .category-badge--deep-dive,
[data-theme="light"] .category-badge--hash-deep-dive { background: rgba(37,99,235,0.06); color: #2563eb; }
[data-theme="light"] .category-badge--sector-report,
[data-theme="light"] .category-badge--hash-sector-report { background: rgba(22,163,74,0.06); color: #16a34a; }
[data-theme="light"] .category-badge--alert,
[data-theme="light"] .category-badge--hash-alert { background: rgba(220,38,38,0.06); color: #dc2626; }

/* Glows & CTA */
[data-theme="light"] .hero-glow { background: radial-gradient(ellipse, rgba(10,6,229,0.04) 0%, transparent 70%); }
[data-theme="light"] .member-cta-glow { background: radial-gradient(ellipse, rgba(10,6,229,0.03) 0%, transparent 70%); }
[data-theme="light"] .member-cta-badge { background: rgba(22,163,74,0.08); box-shadow: inset 0 0 0 1px rgba(22,163,74,0.15); }
[data-theme="light"] .member-cta-dot { background: #16a34a; }
[data-theme="light"] .member-cta-badge-text { color: #16a34a; }
[data-theme="light"] .member-cta-input { background: var(--surface); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
[data-theme="light"] .member-cta-input:focus { box-shadow: inset 0 0 0 1px #0A06E5, 0 0 0 3px rgba(10,6,229,0.1); }
[data-theme="light"] .content-cta-icon { background: rgba(10,6,229,0.08); color: #0A06E5; }
[data-theme="light"] .post-content--preview::after { background: linear-gradient(transparent, #ffffff); }
[data-theme="light"] .post-content a { color: #0A06E5; }
[data-theme="light"] .post-content a:hover { color: #111; }
[data-theme="light"] .content-cta-note a { color: #0A06E5; }
[data-theme="light"] .error-code { color: #ddd; }

/* Theme toggle */
.nav-search-btn {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; border: none;
    background: transparent; color: var(--text-muted); cursor: pointer;
    transition: all 0.2s var(--ease-out);
}
.nav-search-btn:hover { color: var(--text-primary); background: rgba(128,128,128,0.1); }
.nav-search-btn svg { width: 16px; height: 16px; }

.theme-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; border: none;
    background: transparent; color: var(--text-muted); cursor: pointer;
    transition: all 0.2s var(--ease-out); margin-right: 4px;
}
.theme-toggle:hover { color: var(--text-primary); background: rgba(128,128,128,0.1); }
.theme-toggle svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease-out); }
.theme-toggle:hover svg { transform: rotate(15deg); }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

/* Smooth theme transitions */
html[data-theme] body,
html[data-theme] .nav,
html[data-theme] .mobile-menu,
html[data-theme] .site-footer,
html[data-theme] .btn-primary,
html[data-theme] .btn-secondary,
html[data-theme] .btn-brand,
html[data-theme] .post-card,
html[data-theme] .hero-main,
html[data-theme] .stream-item,
html[data-theme] .deepdive-card,
html[data-theme] .sidebar-block,
html[data-theme] .archive-pill,
html[data-theme] .content-cta,
html[data-theme] .author-card,
html[data-theme] .post-nav-item,
html[data-theme] .post-tag,
html[data-theme] .member-cta-input {
    transition: background-color 0.3s ease, color 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}


/* ================================================================
   3. TYPOGRAPHY & LAYOUT
   ================================================================ */

.container {
    width: 100%;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 var(--page-gutter);
}

.container--narrow {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--page-gutter);
}

.section { position: relative; z-index: 2; }

.section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px; font-weight: 500; color: var(--text-faint);
    text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px;
}

.section-heading { font-size: clamp(28px, 3.5vw, 44px); margin-bottom: 16px; }

.section-desc {
    font-size: 16px; color: var(--text-secondary); max-width: 480px; line-height: 1.6;
}

.divider {
    width: 100%; max-width: var(--page-width); margin: 0 auto;
    height: 1px; background: var(--border-subtle);
}


/* ================================================================
   4. BUTTONS & FORMS
   ================================================================ */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: 'DM Sans', sans-serif; font-weight: 500; border: none;
    cursor: pointer; text-decoration: none; transition: all 0.2s var(--ease-out); white-space: nowrap;
}
.btn-lg { height: 48px; padding: 0 28px; font-size: 15px; border-radius: var(--radius-pill); }
.btn-md { height: 40px; padding: 0 20px; font-size: 14px; border-radius: var(--radius-pill); }
.btn-sm { height: 34px; padding: 0 16px; font-size: 13px; border-radius: var(--radius-pill); }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: #f0f0f0; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(255,255,255,0.1); }
.btn-secondary { background: transparent; color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--border-default); }
.btn-secondary:hover { box-shadow: inset 0 0 0 1px var(--border-strong); background: rgba(255,255,255,0.03); }
.btn-brand { background: linear-gradient(135deg, var(--brand), #3a35ff); color: #fff; }
.btn-brand:hover { transform: translateY(-1px); box-shadow: 0 4px 24px rgba(10,6,229,0.4); }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 0; height: auto; }
.btn-ghost:hover { color: var(--text-primary); }
.btn svg { width: 16px; height: 16px; }
.btn-icon-right { transition: transform 0.2s var(--ease-out); }
.btn:hover .btn-icon-right { transform: translateX(2px); }

/* Focus states for accessibility */
.btn:focus-visible {
    outline: 2px solid var(--brand-light);
    outline-offset: 2px;
}
a:focus-visible {
    outline: 2px solid var(--brand-light);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
input:focus-visible {
    outline: none;
}


/* ================================================================
   5. NAVIGATION
   ================================================================ */

.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: 56px; display: flex; align-items: center;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-faint);
}

.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; max-width: var(--page-width); margin: 0 auto; padding: 0 var(--page-gutter);
}

.nav-left { display: flex; align-items: center; gap: 32px; }

.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700;
    color: var(--text-primary); letter-spacing: -0.02em;
}
.nav-logo-img { height: 26px; width: auto; object-fit: contain; }

.nav-divider { width: 1px; height: 20px; background: var(--border-default); }

.nav-links { display: flex; align-items: center; gap: 4px; }

/* Ghost {{navigation}} outputs <ul class="nav"> <li> <a> - handle both patterns */
.nav-links ul,
.nav-links .nav-list {
    display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0;
}
.nav-links li { margin: 0; }
.nav-links li a,
.nav-link {
    font-size: 13px; color: var(--text-muted); padding: 6px 12px;
    border-radius: var(--radius-sm); transition: all 0.2s var(--ease-out);
}
.nav-links li a:hover,
.nav-link:hover {
    color: var(--text-primary); background: rgba(255,255,255,0.04);
}
.nav-links li.nav-current a,
.nav-links li.nav-item--current a,
.nav-link--active {
    color: var(--text-primary);
}

.nav-link-badge {
    font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600;
    padding: 2px 6px; border-radius: var(--radius-pill);
    background: rgba(152,234,101,0.12); color: var(--brand-green);
    text-transform: uppercase; letter-spacing: 0.04em; margin-left: 4px;
}
[data-theme="light"] .nav-link-badge { background: rgba(22,163,74,0.1); color: #16a34a; }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.nav-mobile-btn {
    display: none; background: none; border: none;
    color: var(--text-muted); cursor: pointer; padding: 4px;
}

/* Mobile menu */
.mobile-menu {
    display: none; position: fixed;
    top: 56px; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.95); backdrop-filter: blur(20px);
    z-index: 99; padding: 24px;
}
.mobile-menu.is-open { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu a {
    display: block; padding: 14px 16px; color: var(--text-secondary);
    font-size: 16px; border-radius: var(--radius-md); transition: background 0.2s var(--ease-out);
}
.mobile-menu a:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }


/* ================================================================
   6. HOMEPAGE — Bloomberg Intelligence meets The Economist
   ================================================================ */

/* Hero */
.hero-section { padding: 100px 0 60px; position: relative; overflow: hidden; }

.hero-glow {
    position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
    width: 800px; height: 600px;
    background: radial-gradient(ellipse, rgba(10,6,229,0.08) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
[data-theme="light"] .hero-glow {
    background: radial-gradient(ellipse, rgba(10,6,229,0.04) 0%, transparent 70%);
}

/* Hero Editorial Layout: 1 main + 3 secondary */
.hero-editorial {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1px;
    background: var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--border-subtle), 0 12px 48px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}
.hero-editorial::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--brand), var(--brand-light), var(--brand-green));
    z-index: 1;
}
[data-theme="light"] .hero-editorial {
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), inset 0 0 0 1px rgba(0,0,0,0.06);
}

/* Main Featured Article */
.hero-main { background: var(--surface); }
.hero-main-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: background 0.2s var(--ease-out);
}
.hero-main-link:hover { background: var(--elevated); }
.hero-main-image-wrap {
    width: 100%;
    height: 240px;
    overflow: hidden;
}
.hero-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease-out);
}
.hero-main-link:hover .hero-main-image { transform: scale(1.03); }
.hero-main-content {
    padding: 28px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.hero-main-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(22px, 2.5vw, 30px);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.15;
}
.hero-main-excerpt {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.hero-main-meta {
    font-size: 12px;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
}
.hero-main-author { color: var(--text-muted); }
.meta-sep { color: var(--text-faint); }

/* Premium indicator */
.premium-indicator {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    background: rgba(10,6,229,0.12);
    color: var(--brand-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
[data-theme="light"] .premium-indicator { background: rgba(10,6,229,0.08); color: #0A06E5; }

/* Secondary Features */
.hero-secondary {
    display: flex;
    flex-direction: column;
    background: var(--surface);
}
.hero-secondary-item {
    flex: 1;
    border-bottom: 1px solid var(--border-subtle);
}
.hero-secondary-item:last-child { border-bottom: none; }
.hero-secondary-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 24px;
    height: 100%;
    transition: background 0.2s var(--ease-out);
}
.hero-secondary-link:hover { background: var(--elevated); }
.hero-secondary-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-faint);
}
.hero-secondary-title {
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.3;
}
.hero-secondary-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ================================================================
   6b. RESEARCH STREAM + SIDEBAR
   ================================================================ */

.research-stream { padding: 60px 0; }

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

.stream-header { margin-bottom: 24px; }

/* Stream list — dense article rows */
.stream-list { display: flex; flex-direction: column; }

.stream-item {
    border-bottom: 1px solid var(--border-faint);
    transition: background 0.15s var(--ease-out);
}
.stream-item:first-child { border-top: 1px solid var(--border-faint); }
.stream-item:hover { background: var(--elevated); }

.stream-item-link {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 12px;
}

.stream-item-left {
    flex-shrink: 0;
    width: 56px;
    padding-top: 2px;
}
.stream-item-date {
    font-size: 12px;
    color: var(--text-faint);
}

.stream-item-body { flex: 1; min-width: 0; }
.stream-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.stream-item-title {
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin-bottom: 4px;
}
.stream-item-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.stream-item-meta {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stream-item-image-wrap {
    flex-shrink: 0;
    width: 88px;
    height: 66px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.stream-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s var(--ease-out);
}
.stream-item:hover .stream-item-image { transform: scale(1.05); }

/* Sidebar */
.stream-sidebar { position: sticky; top: 80px; }

.sidebar-block {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: inset 0 0 0 1px var(--border-subtle);
    margin-bottom: 16px;
}
[data-theme="light"] .sidebar-block {
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), inset 0 0 0 1px rgba(0,0,0,0.06);
}

.sidebar-block-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

/* Topic nav */
.topic-nav { display: flex; flex-direction: column; }
.topic-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-faint);
    transition: color 0.15s var(--ease-out);
}
.topic-nav-item:last-child { border-bottom: none; }
.topic-nav-item:hover .topic-nav-name { color: var(--text-primary); }
.topic-nav-name {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.15s var(--ease-out);
}
.topic-nav-count {
    font-size: 11px;
    color: var(--text-faint);
    background: var(--elevated);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

/* Sidebar stats */
.sidebar-block--stats { background: var(--elevated); }
.sidebar-stat { padding: 10px 0; border-bottom: 1px solid var(--border-faint); }
.sidebar-stat:last-child { border-bottom: none; }
.sidebar-stat-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    display: block;
}
.sidebar-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Sidebar CTA */
.sidebar-block--cta {
    background: linear-gradient(180deg, rgba(10,6,229,0.06) 0%, var(--surface) 100%);
}
[data-theme="light"] .sidebar-block--cta {
    background: linear-gradient(180deg, rgba(10,6,229,0.04) 0%, var(--surface) 100%);
}
.sidebar-cta-title {
    font-family: 'Sora', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.sidebar-cta-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

/* ================================================================
   6c. DEEP DIVES SECTION
   ================================================================ */

.deepdives-section { padding: 60px 0; }
.deepdives-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
}
.deepdives-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.deepdive-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 0 0 1px var(--border-subtle);
    overflow: hidden;
    transition: all 0.25s var(--ease-out);
}
.deepdive-card:hover {
    box-shadow: inset 0 0 0 1px var(--border-default), 0 8px 32px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}
[data-theme="light"] .deepdive-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), inset 0 0 0 1px rgba(0,0,0,0.06);
}
[data-theme="light"] .deepdive-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08), inset 0 0 0 1px rgba(0,0,0,0.1);
}

.deepdive-card-link { display: block; }

.deepdive-card-image-wrap {
    width: 100%;
    height: 160px;
    overflow: hidden;
}
.deepdive-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s var(--ease-out);
}
.deepdive-card:hover .deepdive-card-image { transform: scale(1.05); }

.deepdive-card-content { padding: 20px; }
.deepdive-card-meta {
    font-size: 11px;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.deepdive-card-title {
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 6px;
}
.deepdive-card-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ================================================================
   6d. ARCHIVE BROWSE SECTION
   ================================================================ */

.archive-section { padding: 60px 0; }
.archive-content { text-align: center; }
.archive-content .section-desc { margin: 0 auto 32px; }

.archive-categories {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.archive-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border-subtle);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s var(--ease-out);
}
.archive-pill:hover {
    box-shadow: inset 0 0 0 1px var(--border-default);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.archive-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.archive-pill-dot--briefing { background: var(--brand); }
.archive-pill-dot--deepdive { background: var(--brand-light); }
.archive-pill-dot--sector { background: var(--brand-green); }
.archive-pill-dot--alert { background: var(--brand-red); }

/* Recent posts (paginated pages) */
.recent-section { padding: 80px 0; }
.recent-header {
    display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 36px;
}

/* Posts grid */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.posts-grid--3 { grid-template-columns: repeat(3, 1fr); }




/* ================================================================
   8. POST CARD
   ================================================================ */

.post-card {
    background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: inset 0 0 0 1px var(--border-subtle);
    overflow: hidden; transition: all 0.25s var(--ease-out);
}
.post-card:hover {
    box-shadow: inset 0 0 0 1px var(--border-default), 0 8px 32px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}
.post-card-link { display: block; text-decoration: none; color: inherit; border-radius: var(--radius-lg); }
.post-card-link:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 2px; }
.post-card-image-wrap { height: 180px; overflow: hidden; }
.post-card-image {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s var(--ease-out);
}
.post-card:hover .post-card-image { transform: scale(1.03); }
.post-card-content { padding: 24px; }
.post-card-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.post-card-date {
    font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--text-faint);
}
.post-card-reading-time {
    font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-faint);
}
.post-card-title {
    font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 600;
    color: var(--text-primary); letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 8px;
}
.post-card-excerpt {
    font-size: 14px; color: var(--text-muted); line-height: 1.55; margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-card-premium {
    font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600;
    padding: 2px 8px; border-radius: var(--radius-pill);
    background: rgba(10,6,229,0.12); color: var(--brand-light);
    text-transform: uppercase; letter-spacing: 0.04em;
}


/* ================================================================
   9. CATEGORY BADGE
   ================================================================ */

.category-badge {
    display: inline-flex; align-items: center;
    font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600;
    padding: 3px 8px; border-radius: var(--radius-pill);
    text-transform: uppercase; letter-spacing: 0.04em;
    background: rgba(10,6,229,0.12); color: var(--brand-light);
    text-decoration: none; white-space: nowrap;
    transition: opacity 0.2s var(--ease-out);
}
.category-badge:hover { opacity: 0.85; }
.category-badge:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 2px; }

/* Category variants by tag slug */
.category-badge--briefing,
.category-badge--hash-briefing { background: rgba(10,6,229,0.12); color: var(--brand-light); }
.category-badge--deep-dive,
.category-badge--hash-deep-dive { background: rgba(88,199,247,0.1); color: var(--brand-light); }
.category-badge--sector-report,
.category-badge--hash-sector-report { background: rgba(152,234,101,0.1); color: var(--brand-green); }
.category-badge--alert,
.category-badge--hash-alert { background: rgba(255,107,107,0.1); color: var(--brand-red); }


/* ================================================================
   10. SINGLE POST (post.hbs)
   ================================================================ */

.post-full { padding-top: 56px; }

/* Header */
.post-header { padding: 60px 0 40px; text-align: center; }
.post-header .category-badge { margin-bottom: 20px; display: inline-block; }
.post-title {
    font-size: clamp(32px, 5vw, 52px); font-weight: 700;
    letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 16px;
}
.post-excerpt {
    font-size: 18px; color: var(--text-secondary); line-height: 1.6;
    max-width: 640px; margin: 0 auto 24px;
}

/* Meta */
.post-meta {
    display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.post-meta-date { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--text-muted); }
.post-meta-sep { color: var(--text-faint); }
.post-meta-reading { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--text-muted); }
.post-meta-author { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.post-meta-author:hover { color: var(--text-primary); }
.post-meta-premium {
    font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600;
    padding: 2px 8px; border-radius: var(--radius-pill);
    background: rgba(10,6,229,0.12); color: var(--brand-light);
    text-transform: uppercase; letter-spacing: 0.04em; margin-left: 4px;
}

/* Feature image */
.post-feature-image { max-width: 1000px; margin: 0 auto 48px; padding: 0 var(--page-gutter); }
.post-feature-image img { width: 100%; border-radius: var(--radius-lg); }
.post-feature-caption {
    font-family: 'IBM Plex Mono', monospace; font-size: 13px;
    color: var(--text-faint); text-align: center; margin-top: 12px;
}

/* Content body */
.post-content-section { padding-bottom: 48px; }
.post-content { font-size: 17px; line-height: 1.75; color: var(--text-secondary); }
.post-content h2 { font-size: 28px; margin: 48px 0 16px; letter-spacing: -0.03em; }
.post-content h3 { font-size: 22px; margin: 40px 0 12px; letter-spacing: -0.02em; }
.post-content h4 { font-size: 18px; margin: 32px 0 8px; }
.post-content p { margin-bottom: 20px; }
.post-content a {
    color: var(--brand-light); text-decoration: underline;
    text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.post-content a:hover { color: var(--text-primary); }
.post-content strong { color: var(--text-primary); font-weight: 600; }
.post-content em { font-style: italic; }
.post-content blockquote {
    border-left: 3px solid var(--brand); padding: 16px 24px; margin: 32px 0;
    background: var(--surface); border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic; color: var(--text-secondary);
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content ul, .post-content ol { margin: 16px 0 20px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content pre {
    background: var(--elevated); border-radius: var(--radius-md);
    padding: 20px 24px; margin: 24px 0; overflow-x: auto;
    font-family: 'IBM Plex Mono', monospace; font-size: 14px;
    line-height: 1.6; box-shadow: inset 0 0 0 1px var(--border-subtle);
    color: var(--text-primary);
}
.post-content code {
    font-family: 'IBM Plex Mono', monospace; font-size: 0.9em;
    background: var(--elevated); padding: 2px 6px; border-radius: var(--radius-sm);
    color: var(--text-primary);
}
.post-content pre code { background: none; padding: 0; }
.post-content img { border-radius: var(--radius-md); margin: 24px 0; }
.post-content hr { border: none; height: 1px; background: var(--border-subtle); margin: 40px 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.post-content th, .post-content td {
    padding: 12px 16px; border-bottom: 1px solid var(--border-faint); text-align: left;
}
.post-content th {
    font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600;
    color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em;
    background: var(--elevated);
}
.post-content td { color: var(--text-secondary); }
.post-content tbody tr:hover { background: var(--surface); }
.post-content figure { margin: 32px 0; }
.post-content figcaption {
    font-family: 'IBM Plex Mono', monospace; font-size: 13px;
    color: var(--text-faint); text-align: center; margin-top: 8px;
}

/* Gated content fade */
.post-content--preview { position: relative; max-height: 400px; overflow: hidden; }
.post-content--preview::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 200px;
    background: linear-gradient(transparent, var(--bg)); pointer-events: none;
}

/* Post tags */
.post-tags {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 24px 0; border-top: 1px solid var(--border-subtle);
}
.post-tag {
    font-family: 'IBM Plex Mono', monospace; font-size: 12px;
    padding: 4px 12px; border-radius: var(--radius-pill);
    background: var(--elevated); color: var(--text-muted);
    box-shadow: inset 0 0 0 1px var(--border-subtle); transition: all 0.2s var(--ease-out);
}
.post-tag:hover { color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--border-default); }


/* ================================================================
   11. STATIC PAGE (page.hbs)
   ================================================================ */

.page-full { padding-top: 56px; }
.page-header { padding: 80px 0 40px; text-align: center; }
.page-title { font-size: clamp(32px, 5vw, 52px); font-weight: 700; letter-spacing: -0.04em; }
.page-excerpt { font-size: 17px; color: var(--text-secondary); line-height: 1.6; margin-top: 16px; max-width: 640px; }

/* Comments */
.comments-section { padding: 48px 0; border-top: 1px solid var(--border-subtle); }


/* ================================================================
   12. TAG & AUTHOR ARCHIVES
   ================================================================ */

/* Tag */
.tag-header { padding: 100px 0 60px; text-align: center; }
.tag-header-content { max-width: 640px; margin: 0 auto; }
.tag-header-content .section-desc { margin: 0 auto; }
.tag-header-image { max-width: 200px; border-radius: var(--radius-lg); margin-top: 24px; }
.tag-posts { padding: 0 0 60px; }

/* Author */
.author-header { padding: 100px 0 60px; text-align: center; }
.author-header-content {
    max-width: 640px; margin: 0 auto;
    display: flex; flex-direction: column; align-items: center;
}
.author-header-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    margin-bottom: 20px; object-fit: cover;
    box-shadow: inset 0 0 0 1px var(--border-subtle);
}
.author-header-avatar--placeholder {
    background: var(--elevated); display: flex; align-items: center; justify-content: center;
    font-family: 'Sora', sans-serif; font-size: 32px; font-weight: 700; color: var(--text-muted);
}
.author-header-name { font-size: clamp(28px, 4vw, 44px); margin-bottom: 12px; }
.author-header-bio { font-size: 16px; color: var(--text-secondary); max-width: 560px; margin: 0 auto 12px; line-height: 1.6; }
.author-header-location { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--text-faint); }
.author-posts { padding: 0 0 60px; }


/* ================================================================
   13. CONTENT GATE CTA
   ================================================================ */

.content-cta {
    text-align: center; padding: 60px 32px; margin: 40px 0;
    background: var(--surface); border-radius: var(--radius-xl);
    box-shadow: inset 0 0 0 1px var(--border-subtle);
    position: relative;
}
.content-cta::before {
    content: ''; position: absolute; top: 0; left: 20%; right: 20%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand), var(--brand-light), transparent);
    border-radius: 0 0 2px 2px;
}
.content-cta-inner { max-width: 480px; margin: 0 auto; }
.content-cta-icon {
    width: 56px; height: 56px; margin: 0 auto 20px;
    background: rgba(10,6,229,0.12); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--brand-light);
}
.content-cta-title {
    font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 700;
    color: var(--text-primary); margin-bottom: 12px; letter-spacing: -0.03em;
}
.content-cta-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 28px; }
.content-cta-note { font-size: 12px; color: var(--text-faint); margin-top: 16px; }
.content-cta-note a { color: var(--brand-light); text-decoration: underline; text-underline-offset: 2px; }


/* ================================================================
   14. MEMBER CTA
   ================================================================ */

.member-cta { padding: 100px 0; position: relative; }
.member-cta-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 600px; height: 400px;
    background: radial-gradient(ellipse, rgba(10,6,229,0.06) 0%, transparent 70%);
    pointer-events: none; z-index: 1;
}
.member-cta-content {
    max-width: 640px; margin: 0 auto; text-align: center;
    position: relative; z-index: 3;
}
.member-cta-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: var(--radius-pill);
    background: rgba(152,234,101,0.08);
    box-shadow: inset 0 0 0 1px rgba(152,234,101,0.2); margin-bottom: 20px;
}
.member-cta-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--brand-green); animation: pulse 2s ease-in-out infinite;
}
.member-cta-badge-text {
    font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700;
    color: var(--brand-green); letter-spacing: 0.02em;
}
.member-cta h2 { font-size: clamp(28px, 3.5vw, 44px); margin-bottom: 16px; }
.member-cta-sub { font-size: 16px; color: var(--text-secondary); margin-bottom: 36px; line-height: 1.6; }
.member-cta-form { margin: 0 auto 20px; max-width: 480px; }
.member-cta-form-row { display: flex; gap: 10px; }
.member-cta-input {
    flex: 1; height: 48px; padding: 0 20px; border-radius: var(--radius-pill);
    border: none; background: var(--elevated);
    box-shadow: inset 0 0 0 1px var(--border-subtle); color: var(--text-primary);
    font-family: 'DM Sans', sans-serif; font-size: 14px; outline: none;
    transition: box-shadow 0.2s var(--ease-out);
}
.member-cta-input::placeholder { color: var(--text-faint); }
.member-cta-input:focus {
    box-shadow: inset 0 0 0 1px var(--brand), 0 0 0 3px rgba(10,6,229,0.15);
}
.member-cta-note { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--text-faint); }
.member-cta-message { font-family: 'IBM Plex Mono', monospace; font-size: 13px; margin-top: 12px; }
.member-cta-message--loading { color: var(--text-muted); }
.member-cta-message--success { color: var(--brand-green); }
.member-cta-message--error { color: var(--brand-red); }


/* ================================================================
   15. PAGINATION
   ================================================================ */

.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 24px; padding: 48px 0;
}
.pagination-info {
    font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--text-faint);
}


/* ================================================================
   16. ERROR PAGES
   ================================================================ */

.error-page {
    padding: 160px 0 120px; text-align: center;
    min-height: 60vh; display: flex; align-items: center;
}
.error-content { max-width: 480px; margin: 0 auto; }
.error-code {
    font-family: 'IBM Plex Mono', monospace; font-size: clamp(72px, 12vw, 120px);
    font-weight: 700; color: var(--text-faint); letter-spacing: -0.05em; line-height: 1;
    margin-bottom: 16px;
}
.error-message {
    font-size: 28px; font-weight: 600; color: var(--text-primary);
    margin-bottom: 12px; letter-spacing: -0.03em;
}
.error-desc {
    font-size: 16px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.6;
}


/* ================================================================
   17. AUTHOR CARD & RELATED
   ================================================================ */

.author-section { padding: 40px 0; }
.author-card {
    display: flex; align-items: flex-start; gap: 20px;
    padding: 28px; background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: inset 0 0 0 1px var(--border-subtle);
}
.author-card-avatar {
    width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.author-card-avatar--placeholder {
    background: var(--elevated); display: flex; align-items: center; justify-content: center;
    font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 700; color: var(--text-muted);
    box-shadow: inset 0 0 0 1px var(--border-subtle);
}
.author-card-content { flex: 1; }
.author-card-name {
    font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 600; margin-bottom: 4px;
}
.author-card-name a { color: var(--text-primary); }
.author-card-name a:hover { color: var(--brand-light); }
.author-card-bio { font-size: 14px; color: var(--text-muted); line-height: 1.55; }

.related-section { padding: 60px 0 40px; border-top: 1px solid var(--border-subtle); }
.related-heading { font-size: 22px; margin-bottom: 24px; }


/* ================================================================
   18. POST NAVIGATION
   ================================================================ */

.post-nav { padding: 40px 0; border-top: 1px solid var(--border-subtle); }
.post-nav-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-nav-item {
    display: flex; flex-direction: column; gap: 4px; padding: 20px;
    background: var(--surface); border-radius: var(--radius-md);
    box-shadow: inset 0 0 0 1px var(--border-subtle); transition: all 0.2s var(--ease-out);
}
.post-nav-item:hover {
    box-shadow: inset 0 0 0 1px var(--border-default); transform: translateY(-1px);
}
.post-nav-item--next { text-align: right; }
.post-nav-label {
    font-family: 'IBM Plex Mono', monospace; font-size: 11px;
    color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em;
}
.post-nav-title {
    font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 600;
    color: var(--text-primary); letter-spacing: -0.01em;
}


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

.site-footer {
    border-top: 1px solid var(--border-subtle); padding: 48px 0;
    z-index: 2; position: relative;
}
.footer-grid {
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px; margin-bottom: 40px;
}
.footer-brand {
    font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700;
    color: var(--text-primary); letter-spacing: -0.02em; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.footer-brand-img { height: 20px; width: auto; object-fit: contain; }
.footer-desc { font-size: 13px; color: var(--text-faint); line-height: 1.6; }
.footer-heading {
    font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link { font-size: 13px; color: var(--text-faint); transition: color 0.2s var(--ease-out); }
.footer-link:hover { color: var(--text-primary); }
.footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 24px; border-top: 1px solid var(--border-faint);
}
.footer-copy { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-faint); }

/* Ghost {{navigation}} in footer outputs list items too */
.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links li a { font-size: 13px; color: var(--text-faint); transition: color 0.2s var(--ease-out); }
.footer-links li a:hover { color: var(--text-primary); }


/* ================================================================
   20. GHOST KOENIG EDITOR CARDS
   ================================================================ */

.post-content .kg-card { margin: 32px 0; }
.post-content .kg-image-card img { border-radius: var(--radius-md); }
.post-content .kg-image-card figcaption {
    font-family: 'IBM Plex Mono', monospace; font-size: 12px;
    color: var(--text-faint); text-align: center; margin-top: 8px;
}

/* Width modifiers */
.post-content .kg-width-wide { margin-left: -80px; margin-right: -80px; max-width: none; }
.post-content .kg-width-full {
    margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); max-width: none;
}
.post-content .kg-width-full img { border-radius: 0; }

/* Bookmark card */
.post-content .kg-bookmark-card {
    background: var(--surface); border-radius: var(--radius-md);
    box-shadow: inset 0 0 0 1px var(--border-subtle); overflow: hidden;
}
.post-content .kg-bookmark-container { display: flex; text-decoration: none; color: inherit; }
.post-content .kg-bookmark-content { padding: 20px; flex: 1; }
.post-content .kg-bookmark-title {
    font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 600;
    color: var(--text-primary); margin-bottom: 4px;
}
.post-content .kg-bookmark-description {
    font-size: 13px; color: var(--text-muted); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 8px;
}
.post-content .kg-bookmark-metadata {
    display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-faint);
}
.post-content .kg-bookmark-icon { width: 16px; height: 16px; border-radius: 3px; }
.post-content .kg-bookmark-thumbnail { width: 200px; flex-shrink: 0; }
.post-content .kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }

/* Gallery */
.post-content .kg-gallery-container { display: flex; flex-direction: column; }
.post-content .kg-gallery-row { display: flex; gap: 8px; margin-bottom: 8px; }
.post-content .kg-gallery-image img {
    display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm);
}

/* Callout */
.post-content .kg-callout-card {
    display: flex; gap: 16px; padding: 20px 24px; margin: 24px 0;
    border-radius: var(--radius-md);
}
.post-content .kg-callout-card-grey {
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-subtle);
}
.post-content .kg-callout-card-white {
    background: var(--elevated); box-shadow: inset 0 0 0 1px var(--border-subtle);
}
.post-content .kg-callout-card-blue { background: rgba(88,199,247,0.08); border: 1px solid rgba(88,199,247,0.15); }
.post-content .kg-callout-card-green { background: rgba(152,234,101,0.08); border: 1px solid rgba(152,234,101,0.15); }
.post-content .kg-callout-card-yellow { background: rgba(254,188,46,0.08); border: 1px solid rgba(254,188,46,0.15); }
.post-content .kg-callout-card-red { background: rgba(255,107,107,0.08); border: 1px solid rgba(255,107,107,0.15); }
.post-content .kg-callout-card-pink { background: rgba(255,107,178,0.08); border: 1px solid rgba(255,107,178,0.15); }
.post-content .kg-callout-card-purple { background: rgba(10,6,229,0.08); border: 1px solid rgba(10,6,229,0.15); }
.post-content .kg-callout-card-accent { background: rgba(10,6,229,0.08); border: 1px solid rgba(10,6,229,0.15); }
.post-content .kg-callout-emoji { font-size: 20px; flex-shrink: 0; }
.post-content .kg-callout-text { font-size: 15px; color: var(--text-secondary); line-height: 1.6; }
.post-content .kg-callout-text p { margin: 0; }

/* Toggle */
.post-content .kg-toggle-card { margin: 24px 0; }
.post-content .kg-toggle-heading-container {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; cursor: pointer;
    background: var(--surface); border-radius: var(--radius-md);
    box-shadow: inset 0 0 0 1px var(--border-subtle);
}
.post-content .kg-toggle-heading {
    font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 600; color: var(--text-primary);
}
.post-content .kg-toggle-card-icon {
    width: 16px; height: 16px; color: var(--text-muted);
    transition: transform 0.2s var(--ease-out); flex-shrink: 0;
}
.post-content .kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon {
    transform: rotate(90deg);
}
.post-content .kg-toggle-content { padding: 16px 20px 0; font-size: 15px; color: var(--text-secondary); }

/* Button card */
.post-content .kg-button-card { text-align: center; margin: 32px 0; }
.post-content .kg-button-card a,
.post-content .kg-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 48px; padding: 0 28px; border-radius: var(--radius-pill);
    font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500;
    transition: all 0.2s var(--ease-out); text-decoration: none;
}
.post-content .kg-btn-accent,
.post-content .kg-button-card a {
    background: linear-gradient(135deg, var(--brand), #3a35ff); color: #fff;
}
.post-content .kg-btn-accent:hover,
.post-content .kg-button-card a:hover {
    transform: translateY(-1px); box-shadow: 0 4px 24px rgba(10,6,229,0.4);
}

/* Header card */
.post-content .kg-header-card {
    padding: 80px 40px; text-align: center;
    background: var(--surface); border-radius: var(--radius-xl); margin: 32px 0;
}
.post-content .kg-header-card h2 { font-size: clamp(24px, 3vw, 40px); margin-bottom: 12px; }
.post-content .kg-header-card p { font-size: 16px; color: var(--text-secondary); max-width: 560px; margin: 0 auto; }

/* Video */
.post-content .kg-video-card { border-radius: var(--radius-lg); overflow: hidden; }

/* Embed */
.post-content .kg-embed-card { margin: 32px 0; }
.post-content .kg-embed-card iframe { width: 100%; border-radius: var(--radius-md); }

/* File */
.post-content .kg-file-card {
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-subtle);
    border-radius: var(--radius-md); padding: 16px 20px;
    display: flex; align-items: center; gap: 16px;
}
.post-content .kg-file-card-title {
    font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 600; color: var(--text-primary);
}
.post-content .kg-file-card-caption { font-size: 13px; color: var(--text-muted); }
.post-content .kg-file-card-metadata {
    font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-faint);
}

/* Product */
.post-content .kg-product-card {
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-subtle);
    border-radius: var(--radius-lg); padding: 24px;
}
.post-content .kg-product-card-title {
    font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 600;
    color: var(--text-primary); margin-bottom: 8px;
}
.post-content .kg-product-card-description { font-size: 15px; color: var(--text-secondary); line-height: 1.6; }

/* Signup card */
.post-content .kg-signup-card {
    padding: 48px 32px; text-align: center;
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-subtle);
    border-radius: var(--radius-xl);
}

/* Audio card */
.post-content .kg-audio-card {
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-subtle);
    border-radius: var(--radius-md); padding: 16px 20px;
}


/* ================================================================
   21. ANIMATIONS & UTILITIES
   ================================================================ */

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes mobileMenuIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }


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

/* Intermediate breakpoint for wide layouts */
@media (max-width: 1100px) {
    .deepdives-grid { grid-template-columns: repeat(3, 1fr); }
    .stream-layout { grid-template-columns: 1fr 240px; }
}

/* Main responsive breakpoint */
@media (max-width: 900px) {
    /* Navigation */
    .nav-links { display: none; }
    .nav-divider { display: none; }
    .nav-actions .btn:not(.btn-primary) { display: none; }
    .nav-actions .btn-primary { font-size: 12px; height: 32px; padding: 0 14px; }
    .nav-actions .theme-toggle { display: flex; }
    .nav-mobile-btn { display: block; }
    html { overflow-x: hidden; -webkit-overflow-scrolling: touch; }
    body { overflow-x: hidden; }
    .btn, a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

    /* Mobile menu */
    .mobile-menu {
        padding: 16px 20px; flex-direction: column; gap: 2px;
        transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
    }
    .mobile-menu.is-open { display: flex; animation: mobileMenuIn .3s var(--ease-out) forwards; }
    .mobile-menu a {
        padding: 16px; font-size: 17px; font-weight: 500; min-height: 52px;
        display: flex; align-items: center; border-bottom: 1px solid var(--border-faint);
    }
    .mobile-menu a:last-child { border-bottom: none; }
    .mobile-menu .mobile-menu-cta {
        margin-top: 8px; justify-content: center;
        background: rgba(10,6,229,.1); border-radius: var(--radius-md);
        box-shadow: inset 0 0 0 1px rgba(10,6,229,.25); color: var(--brand-light);
    }

    .nav-mobile-btn {
        width: 44px; height: 44px; display: flex; align-items: center;
        justify-content: center; padding: 0; border-radius: var(--radius-sm);
    }
    .nav-mobile-btn svg { width: 22px; height: 22px; }
    .nav-mobile-btn.is-active svg path:nth-child(1) { d: path("M6 6l12 12"); }
    .nav-mobile-btn.is-active svg path:nth-child(2) { opacity: 0; }
    .nav-mobile-btn.is-active svg path:nth-child(3) { d: path("M6 18L18 6"); }
    .nav-mobile-btn svg path { transition: all .25s var(--ease-out); }

    /* Homepage — Hero */
    .hero-section { padding: 80px 0 56px; }
    .hero-editorial { grid-template-columns: 1fr; }
    .hero-main-image-wrap { height: 220px; }
    .hero-main-title { font-size: clamp(24px, 5vw, 36px); }
    .hero-secondary { grid-template-columns: 1fr; gap: 0; }
    .hero-secondary-item { padding: 20px 0; }

    /* Homepage — Research stream + sidebar */
    .stream-layout { grid-template-columns: 1fr; gap: 48px; }
    .stream-sidebar { position: static; }
    .stream-item-image-wrap { width: 80px; height: 60px; }

    /* Homepage — Deep dives */
    .deepdives-grid { grid-template-columns: 1fr 1fr; }
    .deepdives-header { flex-direction: column; align-items: flex-start; gap: 16px; }

    /* Homepage — Archive */
    .archive-categories { justify-content: flex-start; }

    /* Recent / paginated */
    .recent-section { padding: 56px 0; }
    .recent-header { flex-direction: column; align-items: flex-start; gap: 16px; }

    /* Grids */
    .posts-grid { grid-template-columns: 1fr 1fr; }
    .posts-grid--3 { grid-template-columns: 1fr 1fr; }

    /* Single post */
    .post-header { padding: 40px 0 28px; }
    .post-title { font-size: clamp(28px, 6vw, 44px); }
    .post-content .kg-width-wide { margin-left: 0; margin-right: 0; }

    /* Archives */
    .tag-header { padding: 80px 0 40px; }
    .author-header { padding: 80px 0 40px; }

    /* CTA */
    .member-cta { padding: 72px 0; }
    .content-cta { padding: 48px 24px; }

    /* Navigation */
    .post-nav-inner { grid-template-columns: 1fr; }
    .post-nav-item--next { text-align: left; }

    /* Author card */
    .author-card { flex-direction: column; align-items: center; text-align: center; }

    /* Section system */
    .section-heading { font-size: clamp(24px, 6vw, 44px); }
    .section-desc { font-size: 15px; }

    /* Footer */
    .site-footer { padding: 36px 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 28px; }
    .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}

@media (max-width: 600px) {
    .posts-grid { grid-template-columns: 1fr; }
    .posts-grid--3 { grid-template-columns: 1fr; }
    .deepdives-grid { grid-template-columns: 1fr; }
    .member-cta-form-row { flex-direction: column; }
    .member-cta-form-row .btn { width: 100%; }
    .post-content .kg-bookmark-container { flex-direction: column; }
    .post-content .kg-bookmark-thumbnail { width: 100%; height: 160px; }
    .stream-item-link { gap: 12px; }
    .stream-item-left { display: none; }
    .hero-main-image-wrap { height: 180px; }
    .archive-categories { flex-wrap: wrap; }
}

@media (max-width: 375px) {
    :root { --page-gutter: 16px; }
    .post-title { font-size: clamp(24px, 7vw, 36px); }
    .post-excerpt { font-size: 16px; }
    .error-code { font-size: 72px; }
    .content-cta { padding: 40px 20px; margin: 32px 0; }
}

@media (max-width: 320px) {
    :root { --page-gutter: 12px; }
    .nav-logo span { font-size: 12px; }
    .post-content { font-size: 16px; }
    .post-content h2 { font-size: 24px; }
    .post-content h3 { font-size: 20px; }
}


/* ================================================================
   23. PRINT STYLES
   ================================================================ */

@media print {
    .nav,
    .mobile-menu,
    .site-footer,
    .member-cta,
    .content-cta,
    .post-nav,
    .pagination,
    .theme-toggle,
    .hero-glow,
    .member-cta-glow,
    .related-section {
        display: none !important;
    }

    body {
        background: #fff;
        color: #111;
        font-size: 12pt;
    }

    .post-full,
    .page-full {
        padding-top: 0;
    }

    .post-header {
        padding: 20pt 0 10pt;
    }

    .post-content {
        color: #111;
    }

    .post-content a {
        color: #111;
        text-decoration: underline;
    }

    .post-content a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    .post-content pre {
        border: 1px solid #ddd;
        background: #f5f5f5;
    }

    .post-content blockquote {
        border-left-color: #333;
        background: #f5f5f5;
    }

    .category-badge {
        border: 1px solid #ddd;
        background: transparent;
        color: #333;
    }
}
