/* ═══════════════════════════════════════════════════════════════════════════
   single-post.css — VSHR blog single-post template
   Created 2026-06-08. Ports the published "Design System v3" blog shell
   (live on the 11 modern 2026 posts as per-post inline CSS) into one themed
   stylesheet so EVERY post — modern and legacy — renders in the house style.

   Two layers:
     1. .bp-*  → the Sage template FRAME (hero, meta, ToC, author, related,
        CTA). Always applied, fully themed, owns the chrome around the content.
     2. .e-content ...  → body typography + FALLBACK component styles
        (.lead, .insight-box, .checklist-card, tables) so the 166 legacy
        posts that ship NO inline CSS still look premium. Modern posts carry
        their own inline `!important` rules which win the cascade — by design.

   Tokens come from tokens.css. The signature blog blue (#2170b5) is kept as a
   local var so the hero reads as "the blog" while staying in-family with the
   sitewide navy/blue/orange system.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bp-blue:        #2170b5;   /* signature blog hero blue (matches published shell) */
  --bp-blue-deep:   #1a567f;
  --bp-ink:         #111827;
  --bp-muted:       #5f6d7e;
  --bp-surface:     #f8f9fb;
  --bp-hairline:    #e3e7ed;
  --bp-measure:     44rem;     /* ~700px reading measure */
}

/* ──── LAYOUT SHELL ────────────────────────────────────────────────────── */
.bp-article {
  --bp-gap: clamp(2rem, 5vw, 4rem);
  background: #fff;
}

/* Reading column + sticky sidebar grid (desktop). Single column on mobile. */
.bp-body {
  max-width: 75rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 2rem) 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--bp-gap);
}
@media (min-width: 1024px) {
  .bp-body {
    grid-template-columns: 15rem minmax(0, var(--bp-measure));
    justify-content: center;
    align-items: start;
  }
  .bp-body--no-toc { grid-template-columns: minmax(0, var(--bp-measure)); }
}

.bp-main { min-width: 0; }       /* prevent grid blowout from wide tables/pre */

/* ──── HERO ────────────────────────────────────────────────────────────── */
.bp-hero {
  background: linear-gradient(180deg, var(--bp-blue) 0%, var(--bp-blue-deep) 100%);
  color: #fff;
  border-radius: 0 0 22px 22px;
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1.25rem, 5vw, 2rem) clamp(2.25rem, 5vw, 3rem);
  position: relative;
  overflow: hidden;
}
.bp-hero::after {              /* subtle iridescent wash, not device chrome */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 85% -10%, rgba(255,255,255,.18), transparent 60%),
    radial-gradient(50% 70% at 0% 120%, rgba(41,171,226,.25), transparent 60%);
  pointer-events: none;
}
.bp-hero-inner {
  position: relative;
  max-width: 52rem;
  margin: 0 auto;
}
.bp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .4rem .75rem;
  border-radius: 999px;
  text-decoration: none;
}
.bp-eyebrow:hover { background: rgba(255,255,255,.22); }
.bp-hero h1 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.95rem, 1.2rem + 2.8vw, 3.1rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -.018em;
  color: #fff;
  margin: 1rem 0 0;
  text-wrap: balance;
}
.bp-standfirst {
  font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem);
  line-height: 1.6;
  color: rgba(255,255,255,.92);
  margin: 1rem 0 0;
  max-width: 42rem;
}
.bp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  margin-top: 1.5rem;
  color: rgba(255,255,255,.85);
  font-size: .9rem;
}
.bp-meta .bp-byline { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; color: #fff; }
.bp-meta-sep { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.5); }
.bp-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.4);
  display: grid; place-items: center;
  font-size: .8rem; font-weight: 700; color: #fff;
  overflow: hidden;
}
.bp-avatar img { width: 100%; height: 100%; object-fit: cover; }

.bp-featured {
  display: block;
  max-width: 75rem;
  margin: -1px auto 0;
  padding: 1.5rem clamp(1.25rem, 5vw, 2rem) 0;
}
.bp-featured img {
  width: 100%;
  border-radius: 14px;
  display: block;
  box-shadow: 0 18px 50px -24px rgba(7,25,46,.45);
}

/* ──── STICKY TABLE OF CONTENTS ────────────────────────────────────────── */
.bp-toc {
  position: sticky;
  top: 6.5rem;
  align-self: start;
  font-size: .9rem;
}
.bp-toc-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-quaternary, #8A97A8);
  margin: 0 0 .75rem;
}
.bp-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--bp-hairline); }
.bp-toc li { margin: 0; }
.bp-toc a {
  display: block;
  padding: .4rem 0 .4rem 1rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--text-tertiary, #5B6B7E);
  text-decoration: none;
  line-height: 1.4;
  transition: color .15s, border-color .15s;
}
.bp-toc a:hover { color: var(--bp-ink); }
.bp-toc a.is-active {
  color: var(--bp-blue);
  border-left-color: var(--bp-blue);
  font-weight: 600;
}
@media (max-width: 1023px) {
  .bp-toc {
    position: static;
    margin-bottom: 2rem;
    background: var(--bp-surface);
    border: 1px solid var(--bp-hairline);
    border-radius: 12px;
    padding: 1rem 1.25rem;
  }
  .bp-toc[open] summary, .bp-toc summary { cursor: pointer; }
}

/* Scroll-progress bar pinned under the header */
.bp-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--bp-blue), var(--brand-accent, #F97316));
  z-index: 60;
  transition: width .08s linear;
}

/* ──── ARTICLE BODY (e-content) ────────────────────────────────────────── */
.bp-main .e-content {
  color: var(--bp-ink);
  font-size: 1.08rem;
  line-height: 1.75;
}
.bp-main .e-content > * + * { margin-top: 1.25rem; }
.bp-main .e-content h2 {
  font-size: clamp(1.4rem, 1.2rem + .8vw, 1.85rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--brand-primary, #07192E);
  margin-top: 2.75rem;
  scroll-margin-top: 6.5rem;
}
.bp-main .e-content h3 {
  font-size: clamp(1.2rem, 1.1rem + .5vw, 1.4rem);
  font-weight: 700;
  color: var(--brand-primary, #07192E);
  margin-top: 2rem;
}
.bp-main .e-content a { color: var(--bp-blue); text-decoration: underline; text-underline-offset: 2px; }
.bp-main .e-content a:hover { color: var(--bp-blue-deep); }
.bp-main .e-content ul, .bp-main .e-content ol { padding-left: 1.4rem; }
.bp-main .e-content li + li { margin-top: .5rem; }
.bp-main .e-content img { max-width: 100%; height: auto; border-radius: 12px; }
.bp-main .e-content blockquote {
  margin: 2rem 0;
  padding: .25rem 0 .25rem 1.5rem;
  border-left: 3px solid var(--bp-blue);
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--brand-primary, #07192E);
  font-weight: 500;
}
.bp-main .e-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  margin: 1.75rem 0;
  display: block;
  overflow-x: auto;
}
.bp-main .e-content th, .bp-main .e-content td {
  border: 1px solid var(--bp-hairline);
  padding: .65rem .85rem;
  text-align: left;
}
.bp-main .e-content th { background: var(--bp-surface); font-weight: 700; }

/* FALLBACK component styles for LEGACY posts (modern posts override w/ inline !important) */
.bp-main .e-content .lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--bp-ink);
}
.bp-main .e-content .insight-box {
  background: var(--bp-surface);
  border-left: 3px solid var(--bp-blue);
  border-radius: 0 10px 10px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}
.bp-main .e-content .checklist-card {
  background: #fff;
  border: 1px solid var(--bp-hairline);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.75rem 0;
  box-shadow: 0 10px 30px -20px rgba(7,25,46,.3);
}

/* ──── AUTHOR CARD ─────────────────────────────────────────────────────── */
.bp-author {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  background: var(--bp-surface);
  border: 1px solid var(--bp-hairline);
  border-radius: 14px;
  padding: 1.5rem;
  margin-top: 3rem;
}
.bp-author-avatar {
  flex: 0 0 auto;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bp-blue), var(--brand-secondary-bright, #29ABE2));
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 1.25rem;
  overflow: hidden;
}
.bp-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bp-author-name { font-weight: 700; color: var(--brand-primary, #07192E); margin: 0; }
.bp-author-role { font-size: .9rem; color: var(--bp-muted); margin: .15rem 0 0; }
.bp-author-bio { font-size: .95rem; color: var(--text-secondary, #3D5266); margin: .5rem 0 0; line-height: 1.55; }

/* ──── IN-ARTICLE / END CTA BAND ───────────────────────────────────────── */
.bp-cta {
  margin-top: 3rem;
  background: linear-gradient(135deg, var(--brand-primary, #07192E) 0%, var(--bp-blue-deep) 100%);
  border-radius: 18px;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  color: #fff;
  text-align: center;
}
.bp-cta h2 { color: #fff; font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); margin: 0; line-height: 1.2; }
.bp-cta p { color: rgba(255,255,255,.85); margin: .75rem auto 1.5rem; max-width: 38rem; }

/* ──── RELATED ─────────────────────────────────────────────────────────── */
.bp-related {
  max-width: 75rem;
  margin: 0 auto;
  padding: 1rem clamp(1.25rem, 5vw, 2rem) 4rem;
}
.bp-related h2 {
  font-size: 1.35rem;
  color: var(--brand-primary, #07192E);
  margin: 0 0 1.25rem;
}
.bp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1.25rem;
}
.bp-related-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--bp-hairline);
  border-radius: 14px;
  padding: 1.25rem;
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.bp-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -26px rgba(7,25,46,.5);
  border-color: #cdd6e0;
}
.bp-related-cat {
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--bp-blue);
}
.bp-related-card h3 {
  font-size: 1.05rem; line-height: 1.3; color: var(--brand-primary, #07192E);
  margin: .5rem 0 0; font-weight: 700;
}
.bp-related-date { margin-top: auto; padding-top: .75rem; font-size: .82rem; color: var(--bp-muted); }

/* ──── COMMENTS (kept minimal, sitewide-safe) ──────────────────────────── */
.bp-comments { max-width: var(--bp-measure); margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 2rem) 4rem; }

@media (prefers-reduced-motion: reduce) {
  .bp-progress, .bp-related-card { transition: none; }
}
