/* Blog article at /blog/<slug> (scripts/hero/build-blog-post.py). Tokens come from blog.css (--bl-*). Everything is scoped to .bp-* / #bp
   so the Webflow base styles (14px paragraphs, coloured links) cannot reach in. */

/* ---------- reading bar ---------- */
.bp-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 10000; pointer-events: none; }
.bp-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--bl-accent), #7d95ff); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- hero: homepage sky, copy left, cover right ---------- */
.hero-mountains-wrap:has(.bp-hero) { height: auto; min-height: 0; }
.bp-hero .bp-hero__in { max-width: var(--bl-frame); margin: 0 auto; padding: 56px var(--bl-gutter) 80px; display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: 64px; align-items: center; color: #fff; text-align: left; }
.bp-hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; min-width: 0; }
.bp-hero .vs-crumbs { justify-content: flex-start; margin: 0; }
.bp-pill { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .02em; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); color: #fff; }
.bp-hero h1 { font-family: Inter, sans-serif; font-size: clamp(36px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -.035em; font-weight: 600; margin: 0; color: #fff; text-align: left; }
.bp-dek { font-size: 20px; line-height: 1.5; color: rgba(255,255,255,.88); margin: 0; max-width: 60ch; }
.bp-hero__cover { margin: 0; }
.bp-hero__cover img { display: block; width: 100%; height: auto; border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.bp-byline { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; font-size: 15px; color: #fff; }
.bp-byline__a { display: flex; gap: 14px; align-items: center; }
.bp-byline__who { display: flex; flex-direction: column; gap: 3px; line-height: 1.4; }
.bp-byline__who a { color: #fff; font-weight: 600; text-decoration: none; }
.bp-byline__who a:hover { text-decoration: underline; }
.bp-byline__rev { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: rgba(255,255,255,.85); }
.bp-byline__rev .bp-ic { width: 16px; height: 16px; color: #7fe3a9; }
.bp-byline__dates { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: #fff; }
.bp-byline__dates span { display: inline-flex; gap: 6px; align-items: center; }
.bp-byline__dates .bp-ic { width: 16px; height: 16px; }
.bp-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: #ddd; box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
.bp-av--lg { width: 88px; height: 88px; box-shadow: none; }
.bp-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- body: TOC | article | rail ---------- */
#bp { background: #fff; color: var(--bl-ink); padding: 72px var(--bl-gutter) 96px; }
.bp-grid { max-width: var(--bl-frame); margin: 0 auto; display: grid; grid-template-columns: 240px minmax(0, 720px) 240px; gap: 56px; justify-content: center; }
.bp-toc { position: sticky; top: 100px; align-self: start; font-size: 15px; }
.bp-toc__h { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bl-muted); margin: 0 0 14px; }
#bp .bp-toc ol, #bp .bp-toc-m ol { list-style: none; margin: 0; padding: 0; }
#bp .bp-toc li { margin: 0; }
#bp .bp-toc a { display: block; padding: 8px 0 8px 16px; border-left: 2px solid var(--bl-field-2); color: var(--bl-muted); line-height: 1.35; text-decoration: none; transition: color .2s, border-color .2s; }
#bp .bp-toc a:hover { color: var(--bl-ink); }
#bp .bp-toc a.is-done { color: var(--bl-ink-2); border-left-color: #b9c6ff; }
#bp .bp-toc a.is-active { color: var(--bl-ink); font-weight: 600; border-left-color: var(--bl-accent); }
.bp-toc__meta { margin: 18px 0 0; font-size: 14px; color: var(--bl-muted); }
.bp-rail { position: sticky; top: 100px; align-self: start; display: flex; flex-direction: column; gap: 22px; }
.bp-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--bl-muted); }
.bp-share a, .bp-share button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--bl-field-2); background: #fff; display: grid; place-items: center; color: var(--bl-ink); cursor: pointer; padding: 0; transition: border-color .2s; }
.bp-share a:hover, .bp-share button:hover { border-color: var(--bl-ink); }
.bp-share .bp-ic { width: 16px; height: 16px; }
.bp-share .bp-copy.is-done { border-color: var(--bl-green); color: var(--bl-green); }
.bp-mini { border-radius: 18px; padding: 22px; color: #fff; background: linear-gradient(180deg, rgba(18,15,23,.72), rgba(18,15,23,.95)), #231d44 url(/assets/hero-clouds-sky.webp?v=655b03f7dd) 50% 60% / cover; }
.bp-mini strong { display: block; font-size: 19px; line-height: 1.25; letter-spacing: -.01em; margin-bottom: 8px; }
.bp-mini p { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.8); margin: 0 0 16px; }
.bp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 14px 22px; font-weight: 500; font-size: 16px; line-height: 1.2; text-decoration: none; border: 1px solid transparent; white-space: nowrap; transition: opacity .2s, background .2s; }
.bp-btn--sm { padding: 10px 16px; font-size: 14px; width: 100%; }
.bp-btn--white { background: #fff; color: var(--bl-ink); }
.bp-btn--ghost { border-color: rgba(255,255,255,.45); color: #fff; }
.bp-btn--ghost:hover { background: rgba(255,255,255,.1); }
.bp-btn--blue { background: var(--bl-accent); color: #fff; }
.bp-btn:hover { opacity: .92; }

/* ---------- article typography ---------- */
.bp-article { min-width: 0; font-size: 19px; line-height: 1.7; color: var(--bl-ink-2); }
#bp .bp-article p { font-size: inherit; line-height: inherit; color: inherit; margin: 0 0 22px; }
#bp .bp-article h2 { font-family: Inter, sans-serif; font-size: 32px; line-height: 1.15; letter-spacing: -.025em; font-weight: 600; color: var(--bl-ink); margin: 64px 0 18px; scroll-margin-top: 100px; text-align: left; }
#bp .bp-article h3 { font-size: 23px; line-height: 1.3; letter-spacing: -.01em; font-weight: 600; color: var(--bl-ink); margin: 40px 0 12px; }
#bp .bp-article a { color: var(--bl-accent); text-decoration: underline; text-decoration-color: rgba(51,92,255,.35); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
#bp .bp-article a:hover { text-decoration-color: var(--bl-accent); }
#bp .bp-article ul, #bp .bp-article ol { font-size: inherit; line-height: inherit; margin: 0 0 26px; padding-left: 24px; }
#bp .bp-article li { margin: 0 0 10px; }
#bp .bp-article li::marker { color: var(--bl-accent); font-weight: 600; }
#bp .bp-article strong { color: var(--bl-ink); font-weight: 600; }
.bp-lead { font-size: 22px !important; color: var(--bl-ink) !important; }
[id] { scroll-margin-top: 100px; }
.bp-take { background: var(--bl-field); border-radius: 18px; padding: 24px 26px; margin: 0 0 40px; }
#bp .bp-take h2 { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--bl-muted); margin: 0 0 12px; }
#bp .bp-take ul { list-style: none; padding: 0; margin: 0; }
#bp .bp-take li { display: flex; gap: 12px; font-size: 17px; line-height: 1.5; margin: 10px 0; color: var(--bl-ink); }
.bp-take .bp-ic { color: var(--bl-green); margin-top: 3px; stroke-width: 2.6; }
.bp-legal { font-size: 16px !important; line-height: 1.6 !important; color: var(--bl-muted) !important; border: 1px solid var(--bl-field-2); border-radius: 14px; padding: 16px 20px; margin: 0 0 40px !important; }
.bp-legal + .bp-take { margin-top: -16px; }
.bp-note { display: flex; gap: 12px; background: var(--bl-accent-soft); border-radius: 14px; padding: 16px 18px; margin: 28px 0; font-size: 17px; line-height: 1.6; color: var(--bl-ink); }
.bp-note .bp-ic { color: var(--bl-accent); margin-top: 4px; }
.bp-quote { margin: 34px 0; padding: 28px 30px; border-radius: 18px; background: var(--bl-dusk); color: #fff; border: 0; }
#bp .bp-quote p { font-size: 22px; line-height: 1.45; letter-spacing: -.01em; margin: 0 0 12px; color: #fff; }
.bp-quote cite { font-style: normal; font-size: 14px; color: rgba(255,255,255,.65); }
.bp-table { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--bl-field-2); border-radius: 14px; }
.bp-table table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 1.5; min-width: 560px; }
.bp-table caption { caption-side: top; text-align: left; font-size: 14px; font-weight: 600; color: var(--bl-muted); padding: 14px 16px 0; }
.bp-table th, .bp-table td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--bl-field-2); }
.bp-table thead th { background: var(--bl-field); font-size: 14px; font-weight: 600; color: var(--bl-ink); white-space: nowrap; }
.bp-table tbody th { font-weight: 600; color: var(--bl-ink); }
.bp-table tr:last-child th, .bp-table tr:last-child td { border-bottom: 0; }
.bp-small { font-size: 15px !important; color: var(--bl-muted) !important; }
.bp-steps { counter-reset: s; list-style: none; padding: 0 !important; }
#bp .bp-steps li { counter-increment: s; position: relative; padding-left: 52px; margin-bottom: 18px; }
#bp .bp-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 10px; background: var(--bl-ink); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 600; }
.bp-layers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0; }
.bp-layer { border-radius: 18px; padding: 24px; background: var(--bl-field); display: flex; flex-direction: column; gap: 8px; }
.bp-layer--2 { background: var(--bl-accent-soft); }
.bp-layer span { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--bl-muted); }
.bp-layer strong { font-size: 20px; line-height: 1.3; color: var(--bl-ink); }
#bp .bp-layer p { font-size: 16px; line-height: 1.55; margin: 0; }
.bp-layers figcaption { grid-column: 1 / -1; font-size: 14px; color: var(--bl-muted); }
.bp-check { border: 1px solid var(--bl-field-2); border-radius: 18px; padding: 8px 20px 16px; margin: 24px 0; }
#bp .bp-check ul { list-style: none; padding: 0; margin: 0; }
#bp .bp-check li { margin: 0; border-bottom: 1px solid var(--bl-field); }
.bp-check label { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; font-size: 17px; line-height: 1.5; cursor: pointer; }
.bp-check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--bl-accent); flex: none; }
.bp-check input:checked + span { color: var(--bl-muted); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.bp-check output { display: block; padding-top: 12px; font-size: 14px; font-weight: 600; color: var(--bl-muted); }
.bp-check.is-done output { color: var(--bl-green); }
.bp-inline { display: flex; gap: 20px; align-items: center; justify-content: space-between; background: var(--bl-accent-soft); border-radius: 18px; padding: 22px 24px; margin: 40px 0; }
.bp-inline strong { display: block; color: var(--bl-ink); font-size: 18px; line-height: 1.3; }
.bp-inline span { display: block; font-size: 15px; line-height: 1.5; margin-top: 4px; }
#bp .bp-inline a.bp-btn { color: #fff; text-decoration: none; }
.bp-faq details { border-bottom: 1px solid var(--bl-field-2); padding: 18px 0; }
.bp-faq summary { cursor: pointer; font-weight: 600; color: var(--bl-ink); font-size: 18px; line-height: 1.4; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.bp-faq summary::-webkit-details-marker { display: none; }
.bp-faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--bl-accent); flex: none; }
.bp-faq details[open] summary::after { content: "\2013"; }
#bp .bp-faq p { margin: 12px 0 0; font-size: 17px; }
#bp .bp-h-small { font-size: 20px; margin: 56px 0 12px; }
#bp .bp-sources { font-size: 15px; line-height: 1.6; color: var(--bl-muted); }
.bp-sources span { white-space: nowrap; }

/* ---------- author card ---------- */
.bp-author { display: flex; gap: 24px; align-items: flex-start; border: 1px solid var(--bl-field-2); border-radius: 20px; padding: 30px; margin: 56px 0 0; }
.bp-author__txt { display: flex; flex-direction: column; gap: 4px; font-size: 16px; line-height: 1.6; color: var(--bl-ink-2); }
#bp .bp-author__txt p { font-size: 16px; margin: 10px 0 0; }
.bp-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bl-muted); }
.bp-eyebrow--light { color: rgba(255,255,255,.72); }
#bp .bp-article .bp-author__name { font-size: 22px; line-height: 1.3; letter-spacing: -.01em; margin: 0; color: var(--bl-ink); }
.bp-author__role { color: var(--bl-muted); }
.bp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bp-tags span { font-size: 13px; padding: 5px 10px; border-radius: 999px; background: var(--bl-field); color: var(--bl-ink-2); }
.bp-author__links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-weight: 500; }
#bp .bp-author__links a { display: inline-flex; gap: 6px; align-items: center; color: var(--bl-accent); text-decoration: none; }
#bp .bp-author__rev { display: flex; gap: 8px; font-size: 14px; color: var(--bl-muted); border-top: 1px solid var(--bl-field-2); padding-top: 14px; margin-top: 18px; }
.bp-author__rev .bp-ic { color: var(--bl-green); }

/* ---------- CTA banner + related ---------- */
.bp-cta-wrap { background: #fff; padding: 0 var(--bl-gutter); }
.bp-cta { max-width: var(--bl-frame); margin: 0 auto; border-radius: 24px; padding: 56px; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 40px;
  background: linear-gradient(90deg, rgba(18,15,23,.9), rgba(18,15,23,.5)), #231d44 url(/assets/hero-clouds-sky.webp?v=655b03f7dd) 50% 70% / cover; }
.bp-cta h2 { font-family: Inter, sans-serif; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.03em; line-height: 1.08; margin: 10px 0 12px; font-weight: 600; color: #fff; text-align: left; }
.bp-cta p { margin: 0; font-size: 18px; color: rgba(255,255,255,.84); max-width: 56ch; line-height: 1.5; }
.bp-cta__btns { display: flex; gap: 12px; flex: none; }
#bl.bp-related { padding: 96px var(--bl-gutter) 120px; }
.bp-related .bl-related__h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.bp-all { display: inline-flex; gap: 6px; align-items: center; color: var(--bl-accent); text-decoration: none; font-weight: 500; font-size: 16px; }

/* ---------- mobile table of contents ---------- */
.bp-toc-m { display: none; }

@media (max-width: 1199px) { .bp-grid { grid-template-columns: 220px minmax(0, 720px); gap: 48px; } .bp-rail { display: none; } }
@media (max-width: 1100px) { .bp-hero .bp-hero__in { grid-template-columns: 1fr; gap: 40px; } .bp-hero__cover { max-width: 640px; } }
@media (max-width: 991px) {
  .bp-grid { grid-template-columns: minmax(0, 1fr); }
  .bp-toc { display: none; }
  #bp { padding-top: 40px; }
  #bp [id], #bp .bp-article h2 { scroll-margin-top: 150px; }
  .bp-toc-m { display: block; position: sticky; top: 80px; z-index: 20; margin: 0 0 28px; background: #fff; border: 1px solid var(--bl-field-2); border-radius: 14px; padding: 0 16px; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
  .bp-toc-m summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; padding: 14px 0; color: var(--bl-ink); }
  .bp-toc-m summary::-webkit-details-marker { display: none; }
  .bp-toc-m summary span { color: var(--bl-muted); font-weight: 500; }
  #bp .bp-toc-m ol { padding-bottom: 12px; }
  #bp .bp-toc-m li { margin: 0; }
  #bp .bp-toc-m a { display: block; padding: 8px 0; font-size: 15px; color: var(--bl-ink-2); text-decoration: none; }
  #bp .bp-toc-m a.is-active { color: var(--bl-accent); font-weight: 600; }
  .bp-cta { flex-direction: column; align-items: flex-start; padding: 36px 28px; }
}
@media (max-width: 767px) {
  .bp-hero .bp-hero__in { padding: 32px var(--bl-gutter) 48px; }
  .bp-dek { font-size: 17px; }
  .bp-article { font-size: 17px; }
  #bp .bp-article h2 { font-size: 26px; margin-top: 48px; }
  .bp-layers { grid-template-columns: 1fr; }
  .bp-author { flex-direction: column; padding: 22px; }
  .bp-inline { flex-direction: column; align-items: flex-start; }
  .bp-cta__btns { flex-direction: column; width: 100%; }
  .bp-cta__btns .bp-btn { width: 100%; }
  #bl.bp-related { padding: 64px var(--bl-gutter) 72px; }
  #bp .bp-quote p { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { #bp .bp-toc a, .bp-btn, .bp-share a { transition: none; } }
