/* ============================================
   Sharpe Two Ghost Theme — screen.css
   Light mode: matches app.sharpetwo.com palette
   B2 Steel Blue dark tokens preserved in screen-reskin.css
   ============================================ */

/* ============================================
   DESIGN TOKENS
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Backgrounds — light mode */
  --bg-start: #ffffff;
  --bg-end: #f8fafc;
  --bg-raised: #f1f5f9;
  --card-bg: #ffffff;
  --card-bg-hover: #f8fafc;

  /* Borders */
  --border: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.15);

  /* Text — slate scale */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-dim: #94a3b8;
  --text-data: #237FD4;

  /* Accent — matching app primary blue */
  --accent: #237FD4;
  --accent-hover: #1563B4;
  --accent-dim: rgba(35, 127, 212, 0.08);
  --accent-border: rgba(35, 127, 212, 0.20);
  --accent-glow: rgba(35, 127, 212, 0.04);
  --accent-secondary: #B5A07A;

  /* Category accent colors */
  --cat-sdj: #237FD4;
  --cat-fn: #9A8560;
  --cat-ta: #4A8639;
  --cat-research: #6B5CA5;
  --cat-markets: #B08A52;
  --cat-engineering: #64748B;
  /* Slug-mapped aliases (for dynamic var(--cat-{{slug}}) in templates) */
  --cat-signal-du-jour: #237FD4;
  --cat-forward-notes: #9A8560;
  --cat-trade-anatomy: #4A8639;
}

/* ============================================
   BASE
   ============================================ */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg-start);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: rgba(35, 127, 212, 0.18); }

/* ============================================
   TYPOGRAPHY
   ============================================ */
.display { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; font-weight: 700; }
.sans { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.mono { font-family: 'Fira Code', 'Courier New', monospace; }

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

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.article-column {
  max-width: 700px;
  margin: 0 auto;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.rv {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.rv.vis { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .reading-progress { transition: none !important; }
  .toc-link { transition: none !important; }
}

/* ============================================
   DIVIDER LINE
   ============================================ */
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15,23,42,0.1), transparent);
  margin: 0;
}

/* ============================================
   SECTION LABEL
   ============================================ */
.section-label {
  font-family: 'Fira Code', monospace;
  font-style: normal;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-variant: normal;
  margin-bottom: 1.25rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 14px 28px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(35,127,212,0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}
.btn-ghost:hover {
  border-color: rgba(15,23,42,0.25);
  background: rgba(15,23,42,0.02);
}

/* ============================================
   HERO BACKGROUND (light mode: subtle)
   ============================================ */
.hero-grid {
  display: none;
}
.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(35,127,212,0.04) 0%, transparent 60%);
  pointer-events: none;
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-logo img {
  display: block;
}
.site-logo-text {
  font-size: 0.8rem;
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  font-weight: 500;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  position: relative;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.nav-link.active { color: var(--accent); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
}
.nav-link-login {
  color: var(--accent);
  font-weight: 500;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 3px; }

/* ============================================
   FORM STYLES
   ============================================ */
.form-input {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-start);
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus {
  border-color: rgba(35, 127, 212, 0.5);
  box-shadow: 0 0 0 3px rgba(35, 127, 212, 0.08);
}
.form-input::placeholder {
  color: var(--text-dim);
  font-weight: 300;
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */
.reading-progress {
  position: fixed;
  top: 64px;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  z-index: 101;
  transition: width 0.1s linear;
}

/* ============================================
   PAYWALL
   ============================================ */
.paywall {
  position: relative;
  margin-top: -4rem;
  padding-top: 0;
}
.paywall-fade {
  height: 8rem;
  background: linear-gradient(to bottom, transparent, var(--bg-start));
  pointer-events: none;
}
.paywall-module {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  max-width: 520px;
  margin: 0 auto;
}
.paywall-icon {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}
.paywall-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.paywall-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.paywall-pricing {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.paywall-price {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
}
.paywall-period {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.paywall-or {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.paywall-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.paywall-actions .btn-primary {
  min-width: 200px;
}
.paywall-actions .btn-ghost {
  font-size: 0.82rem;
  padding: 8px 16px;
  border: none;
}

/* Hide Ghost's default paywall — we use our own */
.gh-post-upgrade-cta {
  display: none !important;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.toc {
  display: none;
}
.toc.toc-ready {
  display: block;
}

/* TOC links — shared between desktop and mobile */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-item {
  margin-bottom: 0;
}
.toc-link {
  display: block;
  padding: 0.3rem 0 0.3rem 0.75rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s ease, border-color 0.2s ease;
  border-left: 2px solid transparent;
}
.toc-link:hover {
  color: var(--text-primary);
}
.toc-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* Desktop TOC — fixed left rail at wide viewports */
@media (min-width: 1280px) {
  .toc.toc-ready {
    position: fixed;
    top: 120px;
    left: max(1.5rem, calc((100vw - 700px) / 2 - 280px));
    width: 200px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .toc.toc-ready::-webkit-scrollbar {
    display: none;
  }
  .toc-toggle {
    display: none;
  }
  .toc-header {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
  }
}

/* Mobile TOC — collapsible inline block */
@media (max-width: 1279px) {
  .toc.toc-ready {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
  }
  .toc-header {
    display: none;
  }
  .toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-raised);
    border: none;
    cursor: pointer;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .toc-toggle:hover {
    color: var(--text-primary);
  }
  .toc-toggle-icon {
    transition: transform 0.2s ease;
  }
  .toc.toc-open .toc-toggle-icon {
    transform: rotate(180deg);
  }
  .toc-list {
    display: none;
    padding: 0.25rem 1rem 0.75rem;
  }
  .toc.toc-open .toc-list {
    display: block;
  }
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-dim);
  transition: color 0.2s ease;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.breadcrumb-sep { color: var(--text-dim); opacity: 0.5; }
.breadcrumb-current {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 40ch;
}

/* ============================================
   ARTICLE HEADER
   ============================================ */
.article-header {
  border-left: 4px solid var(--accent);
  padding-left: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 2.5rem;
}
/* Category-specific header borders */
.article-header.cat-signal-du-jour { border-left-color: var(--cat-sdj); }
.article-header.cat-forward-notes { border-left-color: var(--cat-fn); }
.article-header.cat-trade-anatomy { border-left-color: var(--cat-ta); }
.article-header.cat-research { border-left-color: var(--cat-research); }
.article-header.cat-markets { border-left-color: var(--cat-markets); }
.article-header.cat-engineering { border-left-color: var(--cat-engineering); }

.premium-badge {
  display: inline-flex;
  align-items: center;
  font-family: 'Fira Code', monospace;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.article-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 0.75em;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.byline-author {
  font-family: 'Fira Code', monospace;
  font-weight: 500;
  color: var(--accent);
  font-size: 0.78rem;
}
.byline-sep {
  color: var(--text-dim);
  opacity: 0.4;
}

/* ============================================
   ARTICLE LAYOUT (CSS Grid)
   ============================================ */
.article-layout {
  display: grid;
  grid-template-columns:
    [full-start] minmax(1rem, 1fr)
    [text-start] minmax(0, 700px) [text-end]
    minmax(1rem, 1fr) [full-end];
}
.article-layout > * {
  grid-column: text;
}

/* ============================================
   FEATURED HERO CARD
   ============================================ */
.featured-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  border-left: 4px solid transparent;
  position: relative;
}
.featured-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.featured-meta {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.featured-series {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 500;
}
.featured-title {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.featured-excerpt {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  font-weight: 400;
  max-width: 72ch;
  margin-bottom: 1.5rem;
}
/* Featured card with image — horizontal layout */
.featured-card--has-image {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
}
.featured-image {
  width: 280px;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.featured-content {
  flex: 1;
  min-width: 0;
}
/* Category-specific featured card borders */
.featured-card[data-category="signal-du-jour"] { border-left-color: var(--cat-sdj); }
.featured-card[data-category="forward-notes"] { border-left-color: var(--cat-fn); }
.featured-card[data-category="trade-anatomy"] { border-left-color: var(--cat-ta); }
.featured-card[data-category="research"] { border-left-color: var(--cat-research); }
.featured-card[data-category="markets"] { border-left-color: var(--cat-markets); }
.featured-card[data-category="engineering"] { border-left-color: var(--cat-engineering); }

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
}
.filter-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.filter-tab {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-hover);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.filter-tab:hover {
  color: var(--text-primary);
  border-color: rgba(15,23,42,0.2);
}
.filter-tab.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  font-weight: 500;
}
.filter-search {
  width: 220px;
  padding: 8px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-start);
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
}
.filter-search:focus {
  border-color: rgba(35, 127, 212, 0.5);
  box-shadow: 0 0 0 3px rgba(35, 127, 212, 0.08);
}
.filter-search::placeholder {
  color: var(--text-dim);
  font-weight: 300;
}
.series-description {
  display: none;
  padding: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.6;
}
.series-description.visible {
  display: block;
}

/* ============================================
   ARTICLE GRID
   ============================================ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

/* ============================================
   ARTICLE CARD
   ============================================ */
.article-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  border-left: 3px solid transparent;
}
.article-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.article-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Category left-border accents */
.article-card[data-category="signal-du-jour"] { border-left-color: var(--cat-sdj); }
.article-card[data-category="forward-notes"] { border-left-color: var(--cat-fn); }
.article-card[data-category="trade-anatomy"] { border-left-color: var(--cat-ta); }
.article-card[data-category="research"] { border-left-color: var(--cat-research); }
.article-card[data-category="markets"] { border-left-color: var(--cat-markets); }
.article-card[data-category="engineering"] { border-left-color: var(--cat-engineering); }

.card-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.card-series {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 500;
}
.card-sep {
  color: var(--text-dim);
}
.card-premium {
  color: var(--accent);
  font-size: 0.65rem;
  padding: 2px 6px;
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  margin-left: auto;
}
.card-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.card-footer {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5em;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
}
.empty-state.visible {
  display: block;
}
.empty-state-text {
  font-size: 0.95rem;
  color: var(--text-dim);
  font-weight: 300;
}

/* ============================================
   NEWSLETTER CTA
   ============================================ */
.newsletter-cta {
  text-align: center;
  padding: clamp(2.5rem, 5vh, 4rem) 0;
}
.newsletter-cta-headline {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.newsletter-cta-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}
.newsletter-cta-form {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  max-width: 420px;
  margin: 0 auto 0.75rem;
}
.newsletter-cta-form .form-input {
  flex: 1;
  padding: 11px 16px;
}
.newsletter-cta-form .btn {
  flex-shrink: 0;
  padding: 11px 22px;
  white-space: nowrap;
}
.newsletter-cta-trust {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* Compact newsletter (article pages) */
.newsletter-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: clamp(2rem, 4vh, 3rem) 0;
}
.newsletter-compact .newsletter-inline-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}
.newsletter-compact .newsletter-inline-form {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}
.newsletter-compact .form-input {
  padding: 10px 14px;
  font-size: 0.85rem;
  width: 260px;
}
.newsletter-compact .btn {
  padding: 10px 20px;
  font-size: 0.85rem;
}

/* ============================================
   PLATFORM CTA
   ============================================ */
.platform-cta {
  text-align: center;
  padding: clamp(3rem, 6vh, 5rem) 0;
}
.platform-cta-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 1rem;
  font-weight: 300;
  line-height: 1.6;
}

/* ============================================
   PREV / NEXT NAVIGATION
   ============================================ */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: clamp(2rem, 4vh, 3rem) 0;
}
.article-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.article-nav-link:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.article-nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.article-nav-link.next {
  text-align: right;
}
.article-nav-label {
  font-family: 'Fira Code', monospace;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.article-nav-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

/* ============================================
   RELATED ARTICLES
   ============================================ */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}
.footer-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-logo img {
  display: block;
  opacity: 0.6;
}
.footer-logo-text {
  font-size: 0.75rem;
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-social a {
  color: var(--text-dim);
  transition: color 0.2s;
}
.footer-social a:hover {
  color: var(--text-primary);
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-dim);
  max-width: 60ch;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.footer-links a,
.footer-links span {
  font-size: 0.78rem;
  color: var(--text-dim);
  transition: color 0.2s;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  margin-top: clamp(2rem, 4vh, 3rem);
}
.pagination-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.pagination-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid var(--border-hover);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}
.pagination-link:hover {
  color: var(--text-primary);
  border-color: rgba(15,23,42,0.25);
  background: rgba(15,23,42,0.02);
}
.pagination-disabled {
  opacity: 0.3;
  pointer-events: none;
}
.pagination-info {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1023px) {
  .article-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .mob-stack { flex-direction: column !important; }
  .mob-hide { display: none !important; }
  .nav-wordmark { display: none; }
  .mob-full { width: 100% !important; }

  .article-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }
  .article-nav-link.next {
    text-align: left;
  }

  .filter-bar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .filter-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-search {
    width: 100%;
  }

  .newsletter-cta-form {
    flex-direction: column;
  }
  .newsletter-cta-form .btn {
    width: 100%;
  }

  .newsletter-compact {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .newsletter-compact .newsletter-inline-form {
    flex-direction: column;
    width: 100%;
  }
  .newsletter-compact .form-input {
    width: 100%;
  }
  .newsletter-compact .btn {
    width: 100%;
  }

  .featured-card {
    padding: clamp(1.25rem, 3vw, 1.75rem);
  }
  .featured-card--has-image {
    flex-direction: column;
  }
  .featured-image {
    width: 100%;
    height: 180px;
  }
}
