@charset "utf-8";
/* =========================================================================
   Blog post detail — modernised surface (UI3-08, 2026-05-29)
   ----------------------------------------------------------------------------
   Loaded ALONGSIDE blog.css on post pages only. Owns the modernised hero
   header, share rail, reading-progress bar, and "Back to blog" card. The
   list / card / preview-banner / author-bio / related rules stay in blog.css.

   Class taxonomy: `.blog-*` (sibling of `.acc-*` / `.adm-*` / etc).
   Consumes design tokens from content/static/content/design-tokens.css.
   ========================================================================= */

/* ----- Shell override on post pages ----- */
.blog-shell--post {
  background: #fff;
  position: relative;
}

/* ----- Article wrapper (override the default narrow column on post pages) ----- */
.blog-shell--post .blog-article-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 0 4rem;
}

/* ----- Hero header (editorial / centered — "direction A", 2026-05-29) -----
   No masthead, no progress bar, no pill chip. A tracked kicker, a large
   Lora headline, a Source-Serif standfirst, a hairline rule, then a quiet
   byline. Cover image sits below at wide measure. NYT/Atlantic register. */
.blog-hero {
  position: relative;
  z-index: 1;
  padding: 4rem 1.25rem 2.5rem;
  background: #fff;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .blog-hero {
    padding: 5.5rem 2rem 3rem;
  }
}

.blog-hero__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

/* Kicker / category — a tracked uppercase Inter eyebrow (not a pill). */
.blog-hero__kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-green-700);
  text-decoration: none;
  margin-bottom: 1.25rem;
}
.blog-hero__kicker:hover {
  color: var(--brand-green-500);
  text-decoration: none;
}

.blog-hero__title {
  /* Brand law: headings are Lora (--font-display). */
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.125rem, 5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--brand-ink-900);
  margin: 0 0 1rem;
}

/* Standfirst / deck — Source Serif (--font-prose), the editorial deck face. */
.blog-hero__lede {
  font-family: var(--font-prose);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.5;
  color: var(--brand-charcoal-700);
  margin: 0.25rem auto 2rem;
  max-width: 38rem;
}

.blog-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--brand-paper-200);
}

.blog-hero__meta-author {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.blog-hero__author-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--brand-ink-900);
}

.blog-hero__meta-facts {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--brand-charcoal-500);
}
.blog-hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.blog-hero__meta-item i {
  color: var(--brand-green-700);
}

/* ----- Cover image below the header text ----- */
.blog-hero__cover {
  max-width: 1080px;
  margin: 0.5rem auto 0;
  padding: 0 1rem;
}
.blog-hero__cover-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: none;
  max-height: 560px;
  object-fit: cover;
}
.blog-hero__cover-caption {
  margin-top: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--brand-charcoal-500);
  font-style: italic;
  text-align: center;
}

/* ----- Body: centred prose with floating margin sidebars -----
   The prose stays centred on the page at every width; the share rail and the
   TOC float in the SYMMETRIC side gutters (sticky), so neither shifts the text
   off the page's centre axis. Layout is `1fr | measure | 1fr` — the middle
   column is page-centred regardless of whether the side rails are shown.
   Below 1024px everything stacks. The TOC only appears once the right gutter
   is genuinely wide enough (≥1280px); below that it vanishes and the centred
   prose keeps the full measure. */
.blog-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
}

#blog-toc {
  display: none;
}

/* ≥1024: the share rail floats in the left gutter; the prose is centred in a
   fixed-measure middle column (the symmetric 1fr gutters keep it page-centred). */
@media (min-width: 1024px) {
  .blog-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 680px) minmax(0, 1fr);
    column-gap: 2.5rem;
    max-width: 1180px;
  }
  .blog-rail  { grid-column: 1; justify-self: end; }
  .blog-prose { grid-column: 2; }
  #blog-toc   { grid-column: 3; }  /* fills the gutter track, capped by its own max-width */
}

/* ≥1280: the right gutter is now wide enough to hold the TOC without crowding
   the text — reveal it (only when the JS actually populated it, i.e. it isn't
   still [hidden]) and widen the container so the gutters can breathe. */
@media (min-width: 1280px) {
  /* Widen the article wrapper so the body's side gutters can actually hold the
     TOC (the wrapper otherwise caps everything at 1080px → 132px gutters). The
     hero, cover and footer keep their own narrower max-widths, centred within. */
  .blog-shell--post .blog-article-wrap {
    max-width: 1280px;
  }
  .blog-body {
    max-width: 1280px;
    column-gap: 3rem;
  }
  #blog-toc:not([hidden]) {
    display: block;
  }
}

/* ----- Share rail ----- */
.blog-rail {
  margin: 0 0 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--brand-paper-200);
  border-bottom: 1px solid var(--brand-paper-200);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.blog-rail__label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-charcoal-500);
  margin: 0;
}
.blog-rail__list {
  list-style: none;
  display: inline-flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}
.blog-rail__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--brand-paper-200);
  color: var(--brand-ink-900);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.blog-rail__btn:hover {
  background: var(--brand-green-700);
  color: #fff;
  border-color: var(--brand-green-700);
  text-decoration: none;
  transform: translateY(-1px);
}

@media (min-width: 1024px) {
  .blog-rail {
    position: sticky;
    top: 96px;
    align-self: start;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.5rem 0;
    border: 0;
    margin: 0;
  }
  .blog-rail__label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin-bottom: 0.4rem;
  }
  .blog-rail__list {
    flex-direction: column;
  }
}

/* ----- Prose measure + anchor offset -----
   The middle grid column sets the reading measure on desktop; on mobile the
   body's max-width does. So the prose simply fills its container. */
.blog-shell--post .blog-prose {
  max-width: 100%;
  min-width: 0;
}

/* Clicking a TOC link (or any in-page #hash jump) must land the heading BELOW
   the sticky meganav (~66px), not tucked under it. */
.blog-prose :is(h2, h3, h4) {
  scroll-margin-top: 5.5rem;
}

/* ----- "Back to blog" card CTA ----- */
.blog-back-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 760px;
  margin: 3rem auto 0;
  padding: 1.25rem 1.5rem;
  background: var(--brand-paper-50);
  border: 1px solid var(--brand-paper-200);
  border-radius: 12px;
  text-decoration: none;
  color: var(--brand-ink-900);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.blog-back-card:hover {
  text-decoration: none;
  color: var(--brand-ink-900);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: var(--brand-green-500);
}
.blog-back-card__icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--brand-green-700);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: background 120ms ease;
}
.blog-back-card:hover .blog-back-card__icon {
  background: var(--brand-green-500);
}
.blog-back-card__copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.blog-back-card__eyebrow {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}
.blog-back-card__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-ink-900);
}

/* ----- Article footer override (tag chips) ----- */
.blog-shell--post .blog-article__footer {
  max-width: 760px;
  margin: 3rem auto 0;
  padding: 1.5rem 1.25rem 0;
  border-top: 1px solid var(--brand-paper-200);
}

/* ----- Author bio: re-center under the prose measure ----- */
.blog-shell--post .blog-author-bio {
  max-width: 760px;
  margin: 2rem auto 0;
  margin-left: auto;
  margin-right: auto;
}
