/* The Parent Post — shared newsletter styles.
   Mobile-first. Floating cards on a dark stage: the dark gaps separate the
   cards and lift readability on phones (where most parents read it).
   Used by the viewer (/newsletter/view, /newsletter/[slug]) and the builder
   preview (/newsletter/new). Tokens come from global.css. */

/* ── Dark stage behind the cards ── */
.nl-stage { background: var(--color-charcoal); padding: clamp(0.75rem, 3.5vw, 1.5rem); }

/* ── Cards ── */
.nl-panel {
  max-width: 620px;
  margin-inline: auto;
  background: var(--color-cream);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.32);
  padding: clamp(1.5rem, 6vw, 2.75rem);
  overflow: hidden;
}
.nl-inner { max-width: none; margin: 0; }

/* Gap between cards — the dark stage shows through */
.nl-band { height: clamp(12px, 3vw, 18px); background: transparent; }

/* ── Masthead card (navy) ── */
.nl-masthead {
  background: var(--color-navy); color: #fff; text-align: center;
  padding-block: clamp(2.25rem, 8vw, 3.5rem);
}
/* Centred text must span the card, or the global `p { max-width:72ch }` cap
   left-aligns the block and throws the centring off. */
.nl-masthead .kicker, .nl-masthead .date, .nl-masthead .strapline { max-width: none; }
.nl-masthead .nl-logo { height: clamp(46px, 12vw, 58px); width: auto; margin: 0 auto 1.25rem; display: block; }
.nl-masthead .kicker {
  font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--color-gold);
  text-indent: 0.24em; margin-bottom: 0.9rem;
}
.nl-masthead h1 {
  font-family: var(--font-heading); font-weight: 300; font-size: var(--text-3xl);
  line-height: 1.04; color: #fff; margin: 0;
}
.nl-masthead .date {
  font-family: var(--font-body); font-size: var(--text-xs); letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(255,255,255,0.6); margin-top: 1.1rem;
}
.nl-masthead .strapline {
  font-family: var(--font-heading); font-style: italic; font-weight: 300;
  font-size: var(--text-lg); color: rgba(255,255,255,0.85); margin-top: 1.25rem;
}
.nl-hero { margin: 1.75rem 0 0; text-align: center; }
/* Header photo at its own aspect ratio — portrait, landscape, square, 4:5 */
.nl-hero img { max-width: 100%; max-height: 62vh; width: auto; height: auto; display: inline-block; }

/* ── Section headings ── */
.nl-heading {
  font-family: var(--font-heading); font-weight: 300; font-size: var(--text-2xl);
  color: var(--color-navy); margin: 0 0 0.6rem;
}
.nl-rule { width: 44px; height: 2px; background: var(--color-gold); border: 0; margin: 0 0 1.4rem; }

/* ── Contents ── */
.nl-contents ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.nl-contents li { counter-increment: toc; }
.nl-contents a {
  display: flex; align-items: baseline; gap: 0.9rem; padding: 0.85rem 0;
  border-bottom: 1px solid rgba(27,42,74,0.1); color: var(--color-charcoal); font-size: var(--text-base);
}
.nl-contents li:last-child a { border-bottom: 0; }
.nl-contents a::before {
  content: counter(toc, decimal-leading-zero); font-family: var(--font-body);
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.05em; color: var(--color-gold-muted);
}
.nl-contents a:hover { color: var(--color-navy); }

/* ── Key Dates ── */
.nl-know ul { list-style: none; margin: 0; padding: 0; }
.nl-know li {
  padding: 0.9rem 0; border-bottom: 1px solid rgba(27,42,74,0.08);
  font-size: var(--text-base); line-height: 1.6;
}
.nl-know li:last-child { border-bottom: 0; }
.nl-know .lead { font-weight: 600; color: var(--color-navy); }
.nl-know .when {
  display: inline-block; background: var(--color-gold-pale); color: var(--color-navy);
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 0.18rem 0.55rem; margin: 0 0.15rem; white-space: nowrap;
}
.nl-know a {
  color: var(--color-navy); font-weight: 500; text-decoration: underline;
  text-decoration-color: var(--color-gold-muted); text-underline-offset: 3px; margin-left: 0.35rem;
}

/* ── Panels ── */
.nl-source {
  font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--color-gold-muted); margin-bottom: 0.7rem;
}
.nl-celebrate h2 {
  font-family: var(--font-heading); font-weight: 300; font-size: var(--text-2xl);
  line-height: 1.1; color: var(--color-navy); margin: 0 0 1rem;
}
.nl-celebrate p { font-size: var(--text-base); line-height: 1.7; color: var(--color-charcoal-light); margin: 0 0 1.25rem; }
.nl-celebrate p:last-child { margin-bottom: 0; }
.nl-head-note {
  font-family: var(--font-heading); font-size: var(--text-lg) !important; font-style: italic;
  color: var(--color-charcoal) !important; border-left: 3px solid var(--color-gold); padding-left: 1.1rem;
}

/* ── Images: swipe carousel with an arrow marker on the peeking photo ── */
.nl-carousel-wrap { position: relative; margin-top: 1rem; }
.nl-carousel {
  display: flex; gap: 0.5rem; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.nl-carousel::-webkit-scrollbar { display: none; }
.nl-carousel img {
  flex: 0 0 86%; min-width: 0; max-width: 520px; aspect-ratio: 4/3; object-fit: cover;
  scroll-snap-align: center; cursor: pointer;
}
.nl-carousel-next {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(27,42,74,0.85); color: var(--color-gold);
  display: flex; align-items: center; justify-content: center; padding: 0;
  box-shadow: 0 3px 12px rgba(17,28,51,0.4);
  transition: opacity 0.25s ease, transform 0.15s ease; z-index: 2;
}
.nl-carousel-next:hover { transform: translateY(-50%) scale(1.06); background: var(--color-navy); }
.nl-carousel-wrap.at-end .nl-carousel-next { opacity: 0; pointer-events: none; }

/* ── Grid gallery — for a big photo dump (a trip, a whole-school event) ── */
.nl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin-top: 1rem; }
.nl-grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; cursor: pointer; display: block; }
@media (min-width: 560px) { .nl-grid { grid-template-columns: repeat(4, 1fr); } }

/* ── Lightbox ── */
#nl-lightbox { display: none; position: fixed; inset: 0; background: rgba(17,28,51,0.95); z-index: 200; align-items: center; justify-content: center; }
#nl-lightbox.open { display: flex; }
#nl-lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.nl-lb-btn { position: absolute; background: rgba(255,255,255,0.12); border: none; color: white; cursor: pointer; }
.nl-lb-btn:hover { background: rgba(255,255,255,0.25); }
#nl-lb-close { top: 16px; right: 16px; font-size: 1.75rem; line-height: 1; padding: 6px 14px; }
#nl-lb-prev, #nl-lb-next { top: 50%; transform: translateY(-50%); font-size: 1.4rem; padding: 14px 16px; }
#nl-lb-prev { left: 8px; }
#nl-lb-next { right: 8px; }
#nl-lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.7); font-size: var(--text-sm); }

/* ── Footer (inside the dark stage) ── */
.nl-back { text-align: center; padding: clamp(1.5rem, 5vw, 2.25rem) 1rem 0.5rem; background: transparent; }
.nl-back a {
  color: rgba(255,255,255,0.6); font-family: var(--font-body); font-size: var(--text-xs);
  letter-spacing: 0.15em; text-transform: uppercase; text-decoration: none;
}
.nl-back a:hover { color: var(--color-gold); }
