
/* ── COLOR TOKENS ───────────────────────────────────────────── */
:root {
    --ludo-bg:           #e8f2ec;
    --ludo-green-dark:   #71B190;
    --ludo-green-accent: #3a7a58;
    --ludo-ink:          #1a1a1a;
    --ludo-ink-soft:     #444;
    --ludo-ink-muted:    #777;
    --ludo-rule:         #a0d0b8;
    --ludo-white:        #f6fcf9;
}

@font-face {
      font-family: 'SNES';
      src: url('../fonts/snes.ttf') format('truetype');
      font-weight: normal;
      font-style: normal;
      font-display: swap;
    }
    
/* ── RESET ──────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }


/* ── BASE ───────────────────────────────────────────────────── */
body {
  background-color: var(--ludo-bg);
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--ludo-ink);
  font-size: 18px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ludo-green-dark); }


/* ── HEADER ─────────────────────────────────────────────────── */
header {
  background-color: var(--ludo-bg);
  border-bottom: 2px solid var(--ludo-green-dark);
  padding: 0 5%;
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 24px 0 20px;
  gap: 0 32px;
}
 
.masthead {
  text-align: center;
  width: fit-content;
  margin: 0 auto;
}
 
.masthead-title {
    font-family: 'SNES';
    font-size: 3.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ludo-green-accent);
    font-style: italic;
    line-height: 1;
    display: block;
    padding-bottom: 0.15em;
    margin-bottom: -0.4em;
    font-size: clamp(2rem, 4vw, 3.75rem);
  }

.masthead { text-align: center; width: fit-content; margin: 0 auto;}
.masthead-title a { color: inherit; }

.masthead-motto {
  font-family: 'SNES';
  font-size: 2.00rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ludo-bg);
  background: var(--ludo-green-accent);
  font-style: italic;
  line-height: 1;
  display: block;
  padding-top: 0.2em;
  padding-bottom: 0.01em;
  font-size: clamp(1rem, 2vw, 2.00rem);
}
 
.nav-left {
  display: flex;
  gap: 28px;
  justify-content: flex-end;
  align-items: center;
  font-size: 1rem;
  letter-spacing: 0.5px;
}
 
.nav-right {
  display: flex;
  gap: 28px;
  justify-content: flex-start;
  align-items: center;
  font-size: 1rem;
  letter-spacing: 0.5px;
}
 
nav a {
  color: var(--ludo-ink-soft);
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
  text-decoration: none;
}
 
nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--green-dark);
  transition: width 0.25s;
}
 
nav a:hover { color: var(--green-dark); }
nav a:hover::after { width: 100%; }

.page-layout {
  display: grid;
  grid-template-columns: 200px 1fr 220px;
  grid-template-areas: "sidebar article sidenotes";
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 4%;
  gap: 0 48px;
  align-items: start;
}


/* ── SIDEBAR ────────────────────────────────────────────────── */
.sidebar { grid-area: sidebar; padding-top: 48px; position: sticky; top: 32px; }
.sidebar-section { margin-bottom: 36px; }
/* Section headings: tiny all-caps uppercase labels */
.sidebar-heading {
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ludo-ink-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ludo-rule);
}
/* Sidebar nav links */
.sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sidebar-nav li a {
  font-size: 0.95rem;
  color: var(--ludo-ink-soft);
  transition: color 0.2s, padding-left 0.2s;
  display: block;
  line-height: 1.5;
}
.sidebar-nav li a:hover { color: var(--ludo-green-dark); padding-left: 6px; }
.sidebar-nav li a.active { color: var(--ludo-green-dark); font-style: italic; }
/* Recent posts list */
.sidebar-recent { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.sidebar-recent li a {
  font-size: 0.88rem;
  color: var(--ludo-ink-soft);
  line-height: 1.45;
  display: block;
  transition: color 0.2s;
}
.sidebar-recent li a:hover { color: var(--ludo-green-dark); }
.sidebar-recent .meta { font-size: 0.72rem; color: var(--ludo-ink-muted); margin-top: 2px; }


/* ── ARTICLE ────────────────────────────────────────────────── */
article.post { grid-area: article; padding: 48px 0 72px; min-width: 0; }

/* Category label: tiny green uppercase with leading dash */
.post-category {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ludo-green-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.post-category::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--ludo-green-dark);
}

/* Post title: Playfair Display, 2.4rem bold
   Italics within titles use <em> tags — never raw asterisks */
article.post h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 6px;
}

/* Subtitle: Playfair Display, italic, 1.2rem */
.post-subtitle {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 400;
  color: var(--ludo-ink-soft);
  margin-bottom: 18px;
}

/* Byline: small, muted. Contains read-time span filled by JS */
.post-byline {
  font-size: 0.88rem;
  color: var(--ludo-ink-muted);
}

/* Byline row: byline text + share/like buttons on same line */
.post-byline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ludo-rule);
  flex-wrap: wrap;
}

/* Smaller buttons for byline position */
.post-likes-byline .download-btn,
.post-likes-byline .like-btn,
.post-likes-byline .share-btn {
  flex-direction: row;
  gap: 5px;
  font-size: 0.78rem;
}
.post-likes-byline .download-btn svg,
.post-likes-byline .like-btn svg,
.post-likes-byline .share-btn svg {
  width: 15px;
  height: 15px;
}


/* ── POST BODY ──────────────────────────────────────────────── */
.post-body { font-size: 1.08rem; line-height: 1.85; color: var(--ludo-ink-soft); }
.post-body p { margin-bottom: 1.4em; }

/* Drop cap: only on the DIRECT first <p> child of .post-body.
   The > combinator prevents drop cap leaking into nested blocks
   like .post-newsletter-support. */
.post-body > p:first-of-type::first-letter {
  font-family: 'Lora', Georgia, serif;
  font-size: 4rem;
  float: left;
  line-height: 0.75;
  margin-right: 8px;
  margin-top: 8px;
  color: var(--ludo-green-dark);
}

/* Section headings inside body */
.post-body h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ludo-ink);
  margin: 2em 0 0.6em;
}

.post-body h3 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  font-style: italic;
  color: var(--ludo-ink);
  margin: 1em 0 0.5em;
}

.post-body h4 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ludo-ink);
  margin: 1.6em 0 0.5em;
}

/* Block quotes */
.post-body blockquote {
  border-left: 3px solid var(--ludo-green-dark);
  padding: 4px 0 4px 24px;
  margin: 1.6em 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ludo-ink);
  line-height: 1.78;
}

.post-body em { font-style: italic; }
.post-body strong { font-weight: 600; color: var(--ludo-ink); }
/* Key terms: bold, full ink colour */
.term { font-weight: 600; color: var(--ludo-ink); }

/* External links in body: green underline */
.post-body a[href^="http"] { color: var(--ludo-green-dark); text-decoration: underline; text-underline-offset: 2px; }

.nowrap {
  white-space: nowrap ;
}

/* ── FIGURES ────────────────────────────────────────────────── */
.post-figure { margin: 1.8em 0; }
.post-figure img { width: 100%; display: block; }
.post-caption { font-size: 0.82rem; color: var(--ludo-ink-muted); line-height: 1.45; margin-top: 7px; font-style: normal; }
.post-featured-image { margin-top: 0; margin-bottom: 1em; }

/* Audio player */
.post-audio { width: 100%; display: block; accent-color: var(--ludo-green-dark); margin-top: 8px; }

/* Video */
.post-video-el { width: 100%; display: block; border-radius: 2px; }


/* ── SIDENOTE REFERENCES (superscripts in body) ─────────────── */
.sn-ref {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.62rem;
  color: var(--ludo-green-dark);
  vertical-align: super;
  line-height: 0;
  margin-left: 1px;
  font-weight: 700;
  cursor: default;
  transition: color 0.2s;
}
.sn-ref:hover { color: var(--ludo-green-accent); }


/* ── SIDENOTES COLUMN (desktop) ─────────────────────────────── */
.sidenotes-col { grid-area: sidenotes; padding-top: 48px; position: relative; }
.sidenote {
  position: absolute;
  left: 0; width: 100%;
  font-size: 0.82rem;
  color: var(--ludo-ink-muted);
  line-height: 1.6;
  font-style: normal;
  border-left: 2px solid var(--ludo-rule);
  padding-left: 14px;
  /* Rounded right edge, flush left — mirrors a sidenote panel */
  border-radius: 0 6px 6px 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
/* Hover highlight: soft green tint + darker left border */
.sidenote.highlighted {
  color: var(--ludo-ink-soft);
  border-left-color: var(--ludo-green-dark);
  background: rgba(74,103,65,0.07);
}
.sidenote .sn-num {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.62rem;
  color: var(--ludo-green-dark);
  font-weight: 700;
  font-style: normal;
  vertical-align: super;
  line-height: 0;
  margin-right: 3px;
}


/* ── MOBILE SIDENOTE POPUPS (≤1100px) ──────────────────────── */
.sn-popup {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--ludo-white);
  border-top: 2px solid var(--ludo-green-dark);
  padding: 18px 20px 28px;
  font-size: 0.92rem;
  color: var(--ludo-ink-soft);
  line-height: 1.65;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
}
.sn-popup .sn-popup-close {
  float: right;
  background: none; border: none;
  font-size: 1.2rem; cursor: pointer;
  color: var(--ludo-ink-muted); margin-left: 12px; line-height: 1;
}
.sn-popup .sn-popup-num {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.65rem;
  color: var(--ludo-green-dark);
  font-weight: 700;
  vertical-align: super;
  line-height: 0;
  margin-right: 4px;
}
.sn-popup-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 199;
}


/* ── FOOTNOTES LIST (shown only at ≤1100px) ─────────────────── */
.footnotes { display: none; }


/* ── BIBLIOGRAPHY / LUDOGRAPHY ACCORDIONS ───────────────────── */
.post-body .bib-section { margin-top: 2.5em; }
.bib-accordion { border-top: 1px solid var(--ludo-rule); }
.bib-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s;
  gap: 12px;
}
.bib-accordion summary::-webkit-details-marker { display: none; }
.bib-accordion[open] summary { border-bottom-color: var(--ludo-rule); margin-bottom: 10px; }
/* Heading text: sits inline, doesn't wrap */
.bib-accordion summary h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ludo-ink-muted);
  margin: 0;
  letter-spacing: 0.3px;
  transition: color 0.2s;
  flex-shrink: 0;
  display: inline;
}
/* "click to expand" cue with chevron — stays on one line */
.bib-accordion summary .accordion-cue {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--ludo-ink-muted);
  font-style: italic;
  transition: color 0.2s;
  white-space: nowrap;
}
.bib-accordion summary .accordion-cue svg {
  width: 12px; height: 12px;
  transition: transform 0.2s;
  flex-shrink: 0;
}
/* Chevron flips when open */
.bib-accordion[open] summary .accordion-cue svg { transform: rotate(180deg); }
/* Hover + open: green */
.bib-accordion summary:hover h2,
.bib-accordion summary:hover .accordion-cue { color: var(--ludo-green-dark); }
.bib-accordion[open] summary h2,
.bib-accordion[open] summary .accordion-cue { color: var(--ludo-green-dark); }
/* List inside accordion */
.bib-accordion .bib-list { padding: 0 0 20px; }

/* Bib list items: hanging indent style */
.bib-list { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; }
.bib-list li {
  font-size: 0.92rem;
  color: var(--ludo-ink-soft);
  line-height: 1.65;
  padding-left: 1.8em;
  text-indent: -1.8em;
}


/* ── NEWSLETTER + SUPPORT BLOCK (~~~) ───────────────────────── */
.post-newsletter-support {
  background: white;
  border: 1px solid var(--ludo-rule);
  border-radius: 4px;
  padding: 22px 24px;
  margin: 2em 0;
}
.newsletter-heading {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 6px;
  color: var(--ludo-ink);
}
.newsletter-form { margin-top: 14px; }
.newsletter-fields { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.newsletter-fields input {
  flex: 1; min-width: 150px;
  padding: 8px 12px;
  border: 1px solid var(--ludo-rule);
  border-right: 2px solid var(--ludo-green-dark);
  border-radius: 6px 0 0 6px;
  background: var(--ludo-field-bg);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.95rem;
  color: var(--ludo-ink);
}
.newsletter-fields input:focus { outline: none; border-color: var(--ludo-green-dark); }
.newsletter-fields button {
  padding: 8px 20px;
  background: var(--ludo-green-dark); color: #fff;
  border: none;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s;
}
.newsletter-fields button:hover { background: var(--ludo-green-accent); }
.newsletter-note {
  font-size: 0.8rem;
  color: var(--ludo-ink-muted);
  font-style: italic;
  margin-top: 4px;
}
/* Divider between newsletter and support sections */
.block-divider {
  border: none;
  border-top: 1px solid var(--ludo-rule);
  margin: 18px 0;
}
/* Support/BMaC paragraph */
.support-text {
  font-size: 0.95rem;
  color: var(--ludo-ink-soft);
  line-height: 1.7;
}
.support-text a { color: var(--ludo-green-dark); text-decoration: underline; text-underline-offset: 2px; }


/* ── POST FOOTER ────────────────────────────────────────────── */
.post-footer {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--ludo-rule);
  font-size: 0.85rem;
  color: var(--ludo-ink-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.back-link {
  font-size: 0.85rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ludo-green-dark);
  border-bottom: 1px solid var(--ludo-green-dark);
  padding-bottom: 1px;
  transition: opacity 0.2s;
}
.back-link:hover { opacity: 0.6; color: var(--ludo-green-dark); }


/* ── LIKES + SHARE ROW ─────────────────────────────────────── */
.post-likes {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
}

/* ── LIKE BUTTON ────────────────────────────────────────────── */
.like-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.78rem; color: var(--ludo-ink-muted);
  transition: color 0.2s;
}
.like-btn svg { width: 22px; height: 22px; flex-shrink: 0; transition: fill 0.2s, stroke 0.2s; }
.like-btn.liked svg { fill: #e05252; stroke: #e05252; }
.like-btn.liked { color: #e05252; }
.like-btn:hover svg { stroke: #e05252; }
.like-btn-count { font-size: 0.78rem; line-height: 1; }
.like-btn-text  { font-size: 0.78rem; line-height: 1; }
.like-btn-text:hover { color: var(--ludo-green-dark)}
.like-count { display: none; }


/* ── SHARE BUTTON + TOAST ───────────────────────────────────── */
.share-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.78rem; color: var(--ludo-ink-muted);
  transition: color 0.2s;
}
.share-btn svg { width: 22px; height: 22px; }
.share-btn:hover { color: var(--ludo-green-dark); }
/* "Link copied!" toast notification */
.share-toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ludo-green-dark); color: #fff;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.9rem; padding: 8px 20px;
  border-radius: 3px; opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none; z-index: 999;
}
.share-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* –– PDF DOWNLOAD BUTTON —————————————————————————————————————— */
.download-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: 'EB Garamond', Georgia, serif; font-size: 0.78rem;
  color: var(--ludo-ink-muted); background: none; text-decoration: none;
  transition: color 0.2s; border: none; cursor: pointer;
}
.download-btn svg { width: 22px; height: 22px; }
.download-btn:hover { color: var(--ludo-green-dark); }

/* -- REPLY THREADING ------------------------------------------ */
.comment-replies {
  margin-top: 16px;
  margin-left: 20px;
  padding-left: 16px;
  border-left: 2px solid var(--ludo-rule);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.reply-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.8rem; color: var(--ludo-ink-muted);
  text-decoration: underline; text-underline-offset: 2px;
  margin-top: 6px;
  transition: color 0.2s;
}
.reply-btn:hover { color: var(--ludo-green-dark); }
.reply-to-label {
  font-size: 0.88rem; color: var(--ludo-ink-muted);
  margin-bottom: 8px; font-style: italic;
}
.cancel-reply-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.82rem; color: var(--ludo-ink-muted);
  text-decoration: underline; text-underline-offset: 2px;
  margin-left: 8px;
}
.cancel-reply-btn:hover { color: var(--ludo-ink); }
.inline-reply-form {
  margin: 12px 0 12px 20px;
  padding-left: 16px;
  border-left: 2px solid var(--ludo-green-dark);
}

/* -- COMMENTS ───────────────────────────────────────────────── */
.post-comments { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--ludo-rule); }
.comments-heading {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.3rem; font-weight: 700;
  margin-bottom: 24px; color: var(--ludo-ink);
}
.comment-form { margin-bottom: 36px; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--ludo-rule); background: var(--ludo-field-bg);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1rem; color: var(--ludo-ink);
  border-radius: 2px; margin-bottom: 10px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--ludo-green-dark); }
.comment-form textarea { min-height: 100px; resize: vertical; }
.comment-form button {
  padding: 9px 24px;
  background: var(--ludo-green-dark); color: #fff; border: none;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1rem; cursor: pointer; border-radius: 2px;
  transition: background 0.2s;
}
.comment-form button:hover { background: var(--ludo-green-accent); }
.comments-list { display: flex; flex-direction: column; gap: 24px; }
.comment { border-left: 2px solid var(--ludo-rule); padding-left: 16px; }
.comment-meta { font-size: 0.78rem; color: var(--ludo-ink-muted); margin-bottom: 4px; }
.comment-name { font-weight: 600; color: var(--ludo-ink-soft); }
.comment-body { font-size: 0.97rem; line-height: 1.7; color: var(--ludo-ink-soft); }
.comment-empty { font-size: 0.92rem; color: var(--ludo-ink-muted); font-style: italic; }


/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  border-top: 2px solid var(--ludo-green-dark);
  padding: 22px 5%;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--ludo-ink-muted);
  flex-wrap: wrap; gap: 12px;
}
.footer-logo {
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem; color: var(--ludo-green-accent); font-weight: 500;
}
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: var(--ludo-ink-muted); font-size: 0.82rem; transition: color 0.2s; }
.footer-nav a:hover { color: var(--ludo-green-dark); }


/* ── RESPONSIVE: TABLET (≤1100px) ──────────────────────────── */
@media (max-width: 1100px) {
  /* Drop sidenotes column, go 2-column */
  .page-layout {
    grid-template-columns: 200px 1fr;
    grid-template-areas: "sidebar article";
  }
  .sidenotes-col { display: none; }

  /* Show footnotes list as a fallback for desktop sidenotes */
  .footnotes {
    display: block;
    margin-top: 48px; padding-top: 24px;
    border-top: 1px solid var(--ludo-rule);
  }
  .footnotes h3 {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem; font-weight: 700;
    color: var(--ludo-ink); margin-bottom: 16px;
  }
  .footnotes ol { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; }
  .footnotes li {
    font-size: 0.88rem; color: var(--ludo-ink-muted);
    font-style: normal; line-height: 1.65;
    display: grid; grid-template-columns: 1.4em 1fr; gap: 0 6px;
  }
  .footnotes li .fn-text { min-width: 0; display: block; }
  .footnotes li em { display: inline; white-space: normal; }
  .footnotes li .fn-num {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.62rem; color: var(--ludo-green-dark);
    font-weight: 700; font-style: normal; padding-top: 5px;
  }

  /* Mobile popup system activates — superscripts become tappable */
  .sn-popup.active { display: block; }
  .sn-popup-overlay.active { display: block; }
  .sn-ref { cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
  /* Hide footnote list when popup system is active */
  .footnotes { display: none !important; }
  .sidenote { display: none; }
}


/* ── RESPONSIVE: MOBILE (≤750px) ───────────────────────────── */
@media (max-width: 750px) {
  .page-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "article";
  }
  .sidebar { display: none; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  nav { flex-wrap: wrap; gap: 14px; }
  article.post h1 { font-size: 1.8rem; }
}

/* ── HAMBURGER MENU ─────────────────────────────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--ludo-ink);
  transition: color 0.2s;
  line-height: 0;
}
.hamburger:hover { color: var(--ludo-green-dark); }
.hamburger svg { display: block; width: 24px; height: 24px; }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--ludo-bg);
  border-top: 1px solid var(--ludo-rule);
  padding: 12px 0;
}
.mobile-nav a {
  font-size: 1rem;
  color: var(--ludo-ink-soft);
  padding: 10px 5%;
  display: block;
  transition: color 0.2s, background 0.15s;
}
.mobile-nav a:hover,
.mobile-nav a.active { color: var(--ludo-green-dark); background: rgba(255,255,255,0.5); }
.mobile-nav.open { display: flex; }

@media (max-width: 900px) {
  .header-inner nav { display: none !important; }
  .hamburger {
    display: block !important;
    grid-column: 3;
    justify-self: end; }
  .masthead {
    grid-column: 2;
  } }


/* ── HAMBURGER MENU (post pages) ────────────────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--ludo-ink);
  transition: color 0.2s;
  line-height: 0;
}
.hamburger:hover { color: var(--ludo-green-dark); }
.hamburger svg { display: block; width: 24px; height: 24px; }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--ludo-bg);
  border-bottom: 1px solid var(--ludo-rule);
}
.mobile-nav a {
  font-size: 1rem;
  color: var(--ludo-ink-soft);
  padding: 10px 5%;
  display: block;
  transition: color 0.2s, background 0.15s;
  text-decoration: none;
}
.mobile-nav a:hover { color: var(--ludo-green-dark); background: rgba(255,255,255,0.5); }
.mobile-nav.open { display: flex; }

@media (max-width: 900px) {
  .header-inner nav { display: none !important; }
  .hamburger { display: block !important; }
}

/* ── IMAGE LIGHTBOX ─────────────────────────────────────────── */
#img-lightbox {
  position: fixed; inset: 0;
  background: rgba(10,12,18,0.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  cursor: zoom-out;
}
#img-lightbox.open { display: flex; }

#img-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  background: white;
  display: block;
}

#img-lightbox-cap {
  color: rgba(255,255,255,0.7);
  font-style: normal;
  font-size: 0.9rem;
  font-family: 'EB Garamond', Georgia, serif;
  text-align: center;
  max-width: 600px;
  line-height: 1.5;
}

/* ── PAGE LOADER ─────────────────────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}
#page-loader.done {
  opacity: 0;
  pointer-events: none;
}