/* ============================================
   THE RECEIPTS — thereceipts.ca
   Core Stylesheet v25.2
   Phase 1 fixes: share JS externalized, opacity removed,
   v26 contrast tokens added, interpretation label contrast fixed.
   Phase 2 fixes (v25.2): WCAG AA contrast pass — --text-dim,
   --text-faint, and --wheat text usages all ≥4.5:1.
   Cache bust: style.css?v=25.2
   Spruce / Granite / Wheat palette
   Sora + Source Serif 4 + IBM Plex Mono
   ============================================ */

/* Self-hosted fonts — no external requests */
@import url('/fonts/fonts.css');

:root {
  /* Backgrounds */
  --bg:           #FAFAF8;
  --bg-alt:       #F2F1ED;
  --ink:          #141618;
  --ink-soft:     #1C1E22;

  /* Primary: spruce — boreal green */
  --spruce:       #1A4D45;
  --spruce-light: #2A8F82;
  --spruce-dim:   rgba(26,77,69,0.07);

  /* Secondary: granite */
  --granite:      #3D4550;
  --granite-light:#5A6370;

  /* Accent: wheat — interpretation */
  --wheat:        #C4960C;
  --wheat-dim:    rgba(196,150,12,0.07);

  /* Accent: iron — falsifiers */
  --iron:         #2C3E50;

  /* Accent: red — .ca only */
  --red:          #C0392B;

  /* Context: slate blue */
  --context-blue: #4A6FA5;

  /* Text scale */
  --text-ink:     #1A1D23;
  --text-body:    #2A2D32;
  --text-mid:     #5A5E66;
  --text-faint:   #686C74;  /* was #8A8E96 — bumped for WCAG AA (5.0:1 on bg, 4.7:1 on bg-alt) */
  --text-light:   #F0EDE6;
  --text-dim:     #8C8A85;  /* was #6A6E76 — bumped for WCAG AA (5.3:1 on ink) */

  /* Borders */
  --border:       #DDDBD6;
  --border-light: #EEEDEA;
  --chrome-border:#2A2D33;

  /* Type */
  --font-display: 'Sora', sans-serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'IBM Plex Mono', monospace;

  /* Layout */
  --max-width:      740px;
  --max-width-wide: 1080px;

  /* ── Backwards Compatibility ──
     Maps old ChatGPT-era dark-mode variables
     to new palette so all pages render correctly */

  /* Dark-mode surface vars → light equivalents */
  --dark-bg:             var(--bg);
  --dark-card:           var(--bg-alt);
  --dark-surface:        var(--bg-alt);
  --dark-border:         var(--border);
  --dark-border-subtle:  var(--border-light);

  /* Old text scale → new text scale */
  --text-primary:        var(--text-ink);
  --text-secondary:      var(--text-mid);
  --text-muted:          var(--text-faint);

  /* Old accent colours → new palette */
  --teal:                var(--spruce-light);
  --teal-dim:            var(--spruce-dim);
  --teal-glow:           rgba(42,143,130,0.15);
  --amber:               var(--wheat);
  --amber-dim:           var(--wheat-dim);
  --red-soft:            #C0392B;
  --green-soft:          #27AE60;

  /* Old Intercept-era aliases */
  --paper:               var(--bg);
  --paper-warm:          var(--bg-alt);
  --paper-border:        var(--border);
  --font-ui:             var(--font-display);
  --chrome:              var(--ink);
  --text-ghost:          var(--border);

  /* Old font aliases (pages that redeclare these inline) */
  /* --font-display and --font-mono are already defined above */

  /* ── v26 Contrast Tokens ──
     Added v25.1 — solid hex equivalents for all readable text.
     Decorative rgba() values (dividers, borders) are unchanged.
     Values from v26 session handoff — all pass WCAG AA (4.5:1). */

  /* Text — on light (article body, cards) */
  --text-strong:           #1A1D23;   /* headings on light — 16.2:1 on white */
  --text-on-dark:          #E8E5DE;   /* body/headings on ink — 14.4:1 on ink */
  --text-on-dark-secondary:#A8A5A0;   /* metadata on ink — 7.4:1 on ink */

  /* Text — on light (article body) */
  --text-body-v26:         #2A2D32;   /* body on light — 13.2:1 on white */
  --text-secondary-v26:    #585C64;   /* dates, labels on light — 6.4:1 on white */

  /* Link/accent — split by background */
  --spruce-link:           #1A6E62;   /* links on light bg — 5.8:1 on white */
  /* --spruce-light stays #2A8F82 for links/accents on ink — 4.6:1 on ink */

  /* Label chip colors — on light backgrounds, WCAG AA compliant */
  --label-wheat:           #7A5D00;   /* interpretation on light — 5.9:1 on white */
  --wheat-on-dark:         #C4960C;   /* interpretation on ink — 6.7:1 on ink */
  --label-blue:            #3D6090;   /* context on light — 6.1:1 on white */
  --label-iron:            #2C3E50;   /* falsifier on light — 10.5:1 on white */
  --label-facts:           #1A4D45;   /* facts on light — 9.2:1 on white */
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  line-height: 1.75;
  min-height: 100vh;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--ink);
  border-bottom: 3px solid var(--spruce);
}

.nav-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  position: relative;
}

/* Logo with receipt mark */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.site-logo-mark {
  width: 22px;
  height: 28px;
  flex-shrink: 0;
}
.site-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-light);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
}
.site-logo-text .ca {
  color: var(--red);
  font-weight: 800;
}
.site-logo:hover .site-logo-text { color: #fff; }

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  height: 100%;
}
.nav-links li { display: flex; align-items: stretch; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -3px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-links a:hover { color: var(--text-light); }
.nav-links a.active { color: #fff; border-bottom-color: var(--spruce-light); }

/* ============ MOBILE NAV TOGGLE ============ */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  flex-direction: column;
  gap: 4px;
  z-index: 210;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-light);
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--ink);
    border-bottom: 3px solid var(--spruce);
    flex-direction: column;
    height: auto;
    padding: 0.5rem 0;
    z-index: 200;
  }
  .nav-links.open { display: flex; }
  .nav-links li { display: block; }
  .nav-links a {
    padding: 1rem 1.5rem;
    font-size: 0.88rem;
    border-bottom: none;
    margin-bottom: 0;
    display: block;
  }
  .nav-links a:hover { background: rgba(255,255,255,0.04); }
  .nav-links a.active { border-bottom: none; color: #fff; }
}

/* ============ HOMEPAGE HERO ============ */

.hero {
  background: var(--ink);
  margin: 0 -2rem;
  padding: 3rem 2rem 2.5rem;
  border-bottom: 1px solid var(--chrome-border);
  position: relative;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(26,77,69,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(196,150,12,0.04) 0%, transparent 40%);
}
.hero-inner { position: relative; z-index: 1; }

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--spruce-light);
  margin-bottom: 1rem;
  display: block;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.06;
  color: var(--text-light);
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  max-width: 600px;
}

.hero-desc {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text-dim);
  max-width: 500px;
  line-height: 1.65;
}

.hero-rule {
  width: 100%;
  height: 1px;
  background: var(--chrome-border);
  margin: 2rem 0 0;
}

/* ============ FEED LAYOUT ============ */

.feed-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  align-items: start;
}

.feed-main {
  border-right: 1px solid var(--border);
  padding-right: 2.5rem;
  padding-top: 2rem;
}

.feed-sidebar {
  padding-left: 2rem;
  padding-top: 2rem;
  position: sticky;
  top: 55px;
}

.feed-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--ink);
  display: block;
}

/* ============ ISSUE CARDS ============ */

.issue-card {
  display: block;
  text-decoration: none;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.issue-card:hover .card-title { color: var(--spruce); }

.issue-card .card-tag {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--spruce);
  margin-bottom: 0.3rem;
  display: block;
}
.issue-card .card-tag.amber { color: var(--label-wheat); }

.issue-card .card-hook {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 0.3rem;
}

.issue-card .card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
  transition: color 0.15s;
}

.issue-card .card-desc {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--text-mid);
  line-height: 1.55;
}

.issue-card .card-date {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--text-faint);
  margin-top: 0.35rem;
}

/* ============ ARTICLE PAGE ============ */

.article-meta, .article-masthead {
  background: var(--ink);
  margin: 0 -2rem;
  padding: 2.5rem 2rem 2rem;
  border-bottom: 1px solid var(--chrome-border);
}

.article-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--spruce-light);
  margin-bottom: 0.75rem;
  display: block;
}

.article-title {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text-light);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  max-width: 700px;
}

.article-subtitle {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 0.5rem;
}

.article-date, .article-byline {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  margin-top: 0.5rem;
}

.article-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 0;
}
.article-body > p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.8;
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-ink);
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-ink);
  margin: 2rem 0 0.5rem;
  line-height: 1.25;
}

/* ============ LABELED BOXES ============ */

.labeled-box {
  border: 1px solid var(--border);
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
  background: var(--bg-alt);
}
.labeled-box .box-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.labeled-box .box-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 1px;
  flex-shrink: 0;
}

.labeled-box.facts .box-label { color: var(--spruce); }
.labeled-box.facts .box-label::before { background: var(--spruce); }
.labeled-box.facts { border-left: 3px solid var(--spruce); }

.labeled-box.interpretation .box-label { color: var(--label-wheat); }
.labeled-box.interpretation .box-label::before { background: var(--wheat); }
.labeled-box.interpretation { border-left: 3px solid var(--wheat); }

.labeled-box.falsifier .box-label { color: var(--iron); }
.labeled-box.falsifier .box-label::before { background: var(--iron); }
.labeled-box.falsifier { border-left: 3px solid var(--iron); }

.labeled-box.context .box-label { color: var(--context-blue); }
.labeled-box.context .box-label::before { background: var(--context-blue); }
.labeled-box.context { border-left: 3px solid var(--context-blue); }

.labeled-box ul { margin: 0 0 0 1.1rem; list-style: disc; }
.labeled-box li { margin-bottom: 0.4rem; font-size: 0.93rem; color: var(--text-body); line-height: 1.6; }
.labeled-box p { margin-bottom: 0.5rem; font-size: 0.93rem; color: var(--text-body); line-height: 1.65; }
.labeled-box p:last-child { margin-bottom: 0; }

/* ============ PLAIN ENGLISH ============ */

.plain-english {
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0;
  background: var(--spruce-dim);
  border-left: 3px solid var(--spruce);
}
.plain-english .plain-english-label, .plain-english-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--spruce);
  margin-bottom: 0.4rem;
  display: block;
}
.plain-english p { font-size: 0.92rem; color: var(--text-mid); line-height: 1.62; margin: 0; }

/* ============ STAT ROWS ============ */

.stat-row { display: flex; gap: 1px; margin: 2rem 0; background: var(--border); }
.stat-cell { flex: 1; background: var(--bg-alt); padding: 1.1rem 1rem; text-align: center; }
.stat-cell .stat-num, .stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-ink);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}
.stat-cell .stat-label, .stat-label {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

/* ============ TABLES ============ */

.parallel-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-family: var(--font-mono); font-size: 0.78rem; }
.parallel-table th { padding: 0.6rem 1rem; background: var(--ink); color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.55rem; font-weight: 500; text-align: left; }
.parallel-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-mid); vertical-align: top; line-height: 1.5; background: var(--bg-alt); }
.parallel-table tr:last-child td { border-bottom: none; }
.parallel-table td:first-child { color: var(--text-ink); font-weight: 500; background: var(--bg); }

/* ============ COUNTERARG & FALSIFIER (legacy) ============ */

.counterarg, .falsifier { margin: 2rem 0; padding: 1.1rem 1.25rem; border: 1px solid var(--border); background: var(--bg-alt); }
.counterarg { border-left: 3px solid var(--context-blue); }
.falsifier  { border-left: 3px solid var(--iron); }
.counterarg-label, .falsifier-label { font-family: var(--font-mono); font-size: 0.55rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; display: block; }
.counterarg-label { color: var(--context-blue); }
.falsifier-label  { color: var(--iron); }
.counterarg p, .falsifier p { font-size: 0.92rem; color: var(--text-mid); line-height: 1.65; margin: 0; }

/* ============ SOURCES ============ */

.source-ref { font-family: var(--font-mono); font-size: 0.68rem; color: var(--spruce); background: var(--spruce-dim); padding: 0.1rem 0.4rem; text-decoration: none; white-space: nowrap; }
.source-ref:hover { background: rgba(26,77,69,0.15); }

.source-list { background: var(--bg-alt); border: 1px solid var(--border); border-top: 2px solid var(--ink); padding: 1.25rem 1.5rem; margin: 2rem 0; }
.source-list h3 { font-family: var(--font-mono); font-size: 0.55rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 0.75rem; }
.source-list ol { margin: 0 0 0 1.25rem; list-style: none; counter-reset: source; }
.source-list li { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-mid); margin-bottom: 0.35rem; line-height: 1.5; counter-increment: source; }
.source-list li::before { content: "[" counter(source) "] "; color: var(--text-faint); }

/* ============ CORRECTIONS / DISCLAIMER ============ */

.corrections-status { font-family: var(--font-mono); font-size: 0.68rem; color: var(--spruce); padding: 0.6rem 1rem; border: 1px solid rgba(26,77,69,0.3); background: var(--spruce-dim); margin: 2rem 0; display: flex; align-items: center; gap: 0.5rem; }
.corrections-status::before { content: '●'; font-size: 0.6rem; }

.article-disclaimer, .section-disclaimer {
  margin-top: 3rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  line-height: 1.6;
}
.article-disclaimer strong, .section-disclaimer strong { color: var(--text-mid); }

/* ============ SECTION LABELS ============ */

.section-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--label-wheat);
  margin-bottom: 0.75rem;
  display: block;
}

.section-divider { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* ============ SECTION BANNER (landing pages) ============ */

.section-banner {
  background: var(--ink-soft);
  margin: 0 -2rem;
  padding: 2.5rem 2rem 2rem;
  border-bottom: 1px solid var(--chrome-border);
}
.section-banner-inner { max-width: var(--max-width-wide); margin: 0 auto; }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--spruce-light);
  margin-bottom: 0.6rem;
  display: block;
}
.section-banner h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-light);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.section-banner p {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text-dim);
  max-width: 560px;
  line-height: 1.6;
}

/* ============ SIDEBAR ============ */

.sidebar-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-block:last-child { border-bottom: none; }

.sidebar-label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 0.6rem;
  display: block;
}

.sidebar-quiz {
  background: var(--ink);
  padding: 1.1rem;
  border-left: 3px solid var(--spruce-light);
}
.sq-badge {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--spruce-light);
  display: block;
  margin-bottom: 0.5rem;
}
.sq-question {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  color: #D0CEC8;
  line-height: 1.45;
  margin-bottom: 0.6rem;
}
.sq-cta {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--spruce-light);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sq-cta:hover { color: #fff; }

.stat-stack .stat-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-light);
}
.stat-stack .stat-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-ink);
  letter-spacing: -0.02em;
}
.stat-stack .stat-label {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: right;
}

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

.site-footer {
  background: var(--ink);
  border-top: 3px solid var(--spruce);
  padding: 0;
  display: flex;
  flex-direction: column;
}

.footer-social {
  border-bottom: 1px solid var(--chrome-border);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-social-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  white-space: nowrap;
}
.footer-social-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--chrome-border);
  letter-spacing: 0.03em;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.social-link:hover { color: var(--text-light); border-color: var(--granite-light); }
.social-link.soon { color: var(--text-dim); border-color: #222; cursor: default; }
.social-link.soon:hover { color: var(--text-dim); border-color: #222; }
.social-soon-badge {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  background: #1E1E1E;
  padding: 0.1rem 0.3rem;
}

.footer-bottom {
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-text { font-family: var(--font-mono); font-size: 0.58rem; color: var(--text-dim); letter-spacing: 0.03em; }
.footer-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-links a { font-family: var(--font-mono); font-size: 0.58rem; color: var(--text-dim); text-decoration: none; letter-spacing: 0.03em; }
.footer-links a:hover { color: var(--text-faint); }

/* ============ DEEP DIVE CTA ============ */

.deep-dive-cta {
  display: block;
  text-decoration: none;
  text-align: center;
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
  background: var(--ink);
  color: var(--text-light);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}
.deep-dive-cta:hover { background: var(--ink-soft); }
.deep-dive-cta span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 400;
  color: var(--text-dim);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 860px) {
  .feed-layout { grid-template-columns: 1fr; }
  .feed-main { border-right: none; padding-right: 0; }
  .feed-sidebar { padding-left: 0; border-top: 2px solid var(--ink); position: static; }
}

@media (max-width: 640px) {
  html { font-size: 16px; }
  .hero h1 { font-size: 2.4rem; }
  .article-title { font-size: 2rem; }
  .section-banner h1 { font-size: 1.8rem; }
  .nav-inner { padding: 0 1rem; }
  main { padding: 0 1rem 4rem; }
  .hero { margin: 0 -1rem; padding: 2.5rem 1rem 2rem; }
  .article-meta, .article-masthead { margin: 0 -1rem; padding: 2rem 1rem 1.75rem; }
  .section-banner { margin: 0 -1rem; }
  .nav-links a { padding: 0 0.6rem; font-size: 0.55rem; }
  /* Mobile nav handled by hamburger toggle above */
  .stat-cell .stat-num { font-size: 1.3rem; }
  .footer-social { padding: 1.25rem 1rem; gap: 1rem; }
  .footer-bottom { padding: 1rem; flex-direction: column; text-align: center; }
}

/* ============ GLOSSARY TOOLTIPS ============ */
.glossary-term {
  border-bottom: 1px dotted var(--text-faint);
  cursor: help;
  position: relative;
}
.glossary-term:hover,
.glossary-term:focus {
  border-bottom-color: var(--spruce);
  color: var(--spruce-light);
}
.glossary-term::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-surface, #1e2124);
  color: var(--text-secondary, #c8c4bc);
  border: 1px solid var(--dark-border, #2a2d31);
  border-radius: 5px;
  padding: 0.5rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  width: max-content;
  max-width: 280px;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.glossary-term:hover::after,
.glossary-term:focus::after {
  opacity: 1;
}
/* On mobile, position tooltip below and left-align to avoid overflow */
@media (max-width: 600px) {
  .glossary-term::after {
    left: 0;
    transform: none;
    bottom: auto;
    top: calc(100% + 4px);
    max-width: 220px;
  }
}
/* ============================================
   THE RECEIPTS — Collapsible Labeled Boxes
   v22 Format Update — append to style.css
   ============================================ */

/* Toggle bar replaces the static label */
.labeled-box.is-collapsible {
  padding: 0;
  transition: background 0.2s ease;
}

.labeled-box.is-collapsible .box-toggle-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  gap: 1rem;
}

.labeled-box.is-collapsible .box-toggle-bar .box-label {
  margin-bottom: 0;
  pointer-events: none;
}

.box-toggle-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.box-toggle-hint {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.box-toggle-chevron {
  display: flex;
  align-items: center;
  color: var(--text-faint);
  transition: transform 0.25s ease;
}

/* Collapsed state */
.labeled-box.is-collapsed {
  background: var(--bg);
}

.labeled-box.is-collapsed .box-collapsible-content {
  display: none;
}

.labeled-box.is-collapsed .box-toggle-hint {
  opacity: 0.7;
}

/* Expanded state */
.labeled-box.is-collapsible:not(.is-collapsed) {
  background: var(--bg-alt);
}

.labeled-box.is-collapsible:not(.is-collapsed) .box-collapsible-content {
  display: block;
  padding: 0 1.4rem 1.1rem;
  animation: receiptSlideOpen 0.25s ease;
}

.labeled-box.is-collapsible:not(.is-collapsed) .box-toggle-hint {
  opacity: 0;
}

.labeled-box.is-collapsible:not(.is-collapsed) .box-toggle-chevron {
  transform: rotate(180deg);
}

/* Hover state on toggle bar */
.labeled-box.is-collapsed .box-toggle-bar:hover {
  background: rgba(0, 0, 0, 0.015);
}

.labeled-box.is-collapsed .box-toggle-bar:hover .box-toggle-hint {
  opacity: 1;
}

/* Animation */
@keyframes receiptSlideOpen {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   READ NEXT — Curated + Tagged Suggestions
   Append to style.css
   ============================================ */

.read-next-curated {
  display: block;
  text-decoration: none;
  padding: 1.5rem 1.75rem;
  background: var(--ink);
  color: #fff;
  border-left: 4px solid var(--spruce-light);
  margin-top: 2.5rem;
  transition: background 0.15s;
}
.read-next-curated:hover { background: var(--ink-soft); }

.read-next-badge {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--spruce-light);
  display: block;
  margin-bottom: 0.4rem;
}

.read-next-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 0.45rem;
}

.read-next-hook {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-on-dark-secondary);
  line-height: 1.55;
  font-style: italic;
}

/* Tagged suggestions grid */
.tagged-suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 0.75rem 0 2rem;
}

.tagged-suggestion {
  display: block;
  text-decoration: none;
  padding: 1rem 1.2rem;
  background: var(--bg);
  transition: background 0.15s;
}
.tagged-suggestion:hover { background: var(--bg-alt); }

.tagged-suggestion .ts-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--spruce);
  display: block;
  margin-bottom: 0.3rem;
}

.tagged-suggestion .ts-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-ink);
  line-height: 1.22;
  letter-spacing: -0.01em;
}

@media (max-width: 640px) {
  .tagged-suggestions { grid-template-columns: 1fr; }
}

/* =============================================
   THE RECEIPT — Signature Summary Element
   Added v25
   ============================================= */

.the-receipt {
  background: var(--ink);
  border-radius: 8px 8px 0 0;
  border-top: 3px solid var(--spruce);
  padding: 1.75rem 1.8rem 0;
  margin: 0;
  position: relative;
}
.the-receipt-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.the-receipt-icon { flex-shrink: 0; }
.the-receipt-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--spruce-light);
}
.the-receipt-divider {
  border: none;
  border-top: 1px dashed rgba(42,143,130,0.25);
  margin: 0 0 1rem 0;
}
.the-receipt-body {
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--text-light);
  margin: 0;
}
.the-receipt-source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--spruce-light);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
.the-receipt-source-link:hover { opacity: 1; }
.the-receipt-source-link .arrow { transition: transform 0.2s ease; }
.the-receipt-source-link:hover .arrow { transform: translateX(2px); }
.the-receipt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding: 0.85rem 0 1.1rem;
  border-top: 1px dashed rgba(42,143,130,0.15);
}
.the-receipt-watermark {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--spruce-light);
  opacity: 0.45;
  letter-spacing: 0.06em;
}
.the-receipt-share-btns { display: flex; gap: 0.5rem; }
.receipt-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(42,143,130,0.25);
  border-radius: 4px;
  background: rgba(42,143,130,0.08);
  color: var(--spruce-light);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.receipt-share-btn:hover {
  background: rgba(42,143,130,0.18);
  border-color: rgba(42,143,130,0.45);
}
.receipt-share-btn:active { transform: scale(0.97); }
.receipt-share-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
.receipt-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--spruce-light);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.65rem 1.3rem;
  border-radius: 6px;
  border: 1px solid rgba(42,143,130,0.35);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
}
.receipt-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.the-receipt-tear {
  display: block;
  width: 100%;
  height: 14px;
  margin-top: -1px;
  margin-bottom: 2.25rem;
  line-height: 0;
}
.the-receipt-tear svg { display: block; width: 100%; height: 14px; }
@media (max-width: 640px) {
  .the-receipt {
    padding: 1.4rem 1.2rem 0;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 0;
  }
  .the-receipt-tear {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    width: calc(100% + 1rem);
  }
  .the-receipt-body { font-size: 0.95rem; }
  .the-receipt-actions { flex-direction: column; gap: 0.6rem; align-items: flex-start; }
  .the-receipt-watermark { order: 2; }
  .the-receipt-share-btns { order: 1; width: 100%; }
  .receipt-share-btn { flex: 1; justify-content: center; padding: 0.5rem 0.75rem; }
}

/* =============================================
   HOW TO READ THIS — Collapsible Legend
   Added v25
   ============================================= */
.how-to-read {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 2rem;
  overflow: hidden;
  background: var(--bg);
}
.how-to-read-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  cursor: pointer;
  background: var(--bg-alt);
  border: none;
  width: 100%;
  text-align: left;
}
.how-to-read-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}
.how-to-read-chevron {
  font-size: 0.7rem;
  color: var(--text-faint);
  transition: transform 0.2s ease;
}
.how-to-read.open .how-to-read-chevron { transform: rotate(180deg); }
.how-to-read-body { display: none; padding: 0.75rem 1rem 0.85rem; }
.how-to-read.open .how-to-read-body { display: block; }
.htr-row { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.3rem 0; }
.htr-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; margin-top: 2px; }
.htr-dot.green { background: var(--spruce); }
.htr-dot.blue { background: var(--context-blue); }
.htr-dot.gold { background: var(--wheat); }
.htr-dot.grey { background: var(--iron); }
.htr-label { font-family: var(--font-mono); font-size: 0.65rem; font-weight: 600; color: var(--text-mid); min-width: 100px; }
.htr-desc { font-family: var(--font-body); font-size: 0.82rem; color: var(--text-mid); line-height: 1.5; }

/* =============================================
   READ NEXT — Curated Article Cards
   Added v25
   ============================================= */
.read-next { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--border); }
.read-next-label { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); margin-bottom: 1rem; }
.read-next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.read-next-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  background: var(--bg);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.read-next-card:hover { border-color: var(--spruce-light); box-shadow: 0 2px 8px rgba(26,77,69,0.08); }
.read-next-tag { font-family: var(--font-mono); font-size: 0.5rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--spruce-light); }
.read-next-title { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: var(--text-ink); line-height: 1.25; }
.read-next-hook { font-family: var(--font-body); font-size: 0.8rem; color: var(--text-mid); line-height: 1.5; }
@media (max-width: 640px) { .read-next-grid { grid-template-columns: 1fr; } }

/* ============ NAV SEARCH ICON ============ */
.nav-search {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
  margin-left: 0.25rem;
}
.nav-search:hover { color: var(--text-light); }
.nav-search svg { width: 15px; height: 15px; flex-shrink: 0; }
.nav-search-label { display: none; }
@media (max-width: 640px) {
  .nav-links .nav-search {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 0.88rem;
    margin-left: 0;
    color: var(--text-dim);
    line-height: 1.2;
  }
  .nav-links .nav-search svg,
  .nav-search svg {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden;
  }
  .nav-search-label { display: inline; }
}
