/* Blog article pages (/blog/<slug>): header, cover, contents list, prose, figures, callouts, related.
   Loaded after blog.css on article pages only. Reading column ~680px, 18px body text.
   Prose spacing rules carry .hp-body so they beat home.css's ".hp-body p { margin: 0 }". */
.bl-cat-link { text-decoration: none; min-height: 32px; }
.bl-cat-link:hover { border-color: var(--brand-400); }
/* ---------- Article ---------- */
.bl-article-head { padding: 36px 0 0; background: linear-gradient(180deg, #eef1fb 0%, #f6f8fd 60%, #fff 100%); }
.bl-head-inner { max-width: 1022px; }
.bl-head-inner > * { max-width: 820px; }
.bl-h1 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.12; margin-top: 14px !important; }
.bl-lead { max-width: 720px; font-size: 1.15rem; }
.bl-byline { margin-top: 20px; }
.bl-reviewer { margin-top: 8px !important; color: var(--gray-600); font-size: .9rem; }
/* Full-width cover photo (container width on desktop, edge to edge on phones). */
/* Article hero: the cover runs edge to edge with the title, lead and byline over it on a dark scrim
   (text sits where the scrim is at least ~75% opaque, so contrast holds on any photo). Phones keep the
   16:9 photo with the title starting over its lower edge and continuing on the dark band. */
.bl-hero--photo { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(500px, 74vh, 660px); padding: 0; background: #0b1230; color: #fff; overflow: hidden; }
.bl-hero-media { position: absolute; inset: 0; z-index: -1; margin: 0; }
.bl-hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bl-hero-scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9, 14, 36, .96) 0%, rgba(9, 14, 36, .86) 34%, rgba(9, 14, 36, .55) 62%, rgba(9, 14, 36, .2) 100%), linear-gradient(90deg, rgba(9, 14, 36, .6) 0%, rgba(9, 14, 36, 0) 72%); }
.bl-hero--photo .bl-head-inner { padding-top: 140px; padding-bottom: 56px; }
.bl-hero--photo .bl-h1 { color: #fff; font-size: clamp(2.1rem, 4.4vw, 3.4rem); text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.bl-hero--photo .bl-lead { color: rgba(255, 255, 255, .92); }
.bl-hero--photo .bl-cat { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .5); color: #fff; }
.bl-hero--photo .bl-cat-link:hover { background: rgba(255, 255, 255, .24); border-color: #fff; }
.bl-hero--photo .bl-author-name { color: #fff; }
.bl-hero--photo .bl-meta, .bl-hero--photo .bl-reviewer { color: rgba(255, 255, 255, .86); }
.bl-hero--photo .bl-avatar { background: #fff; color: var(--brand-800); }
.bl-hero--photo a:focus-visible { outline: 3px solid #fde68a; outline-offset: 3px; }

/* Reading progress, just under the fixed header. JS sets the scale; no layout work. */
.bl-progress { position: fixed; top: var(--hp-header-h); left: 0; right: 0; z-index: 501; height: 3px; pointer-events: none; }
.bl-progress-bar { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-600), #f59e0b); transform: scaleX(0); transform-origin: 0 50%; }
.bl-layout { display: block; max-width: 728px; padding-top: 44px; padding-bottom: 24px; }
.bl-layout.has-toc { display: grid; grid-template-columns: 230px minmax(0, 680px); justify-content: center; gap: 64px; max-width: 1180px; }
.bl-toc-wrap { position: relative; }
.bl-toc { position: sticky; top: calc(var(--hp-header-h) + 24px); max-height: calc(100vh - var(--hp-header-h) - 48px); overflow-y: auto; padding: 4px 0 4px 18px; border-left: 2px solid var(--brand-100); }
.bl-toc summary { display: flex; flex-direction: column; gap: 2px; cursor: pointer; list-style: none; font-weight: 800; color: var(--gray-900); font-size: .95rem; }
.bl-toc summary::-webkit-details-marker { display: none; }
.bl-toc-count { font-weight: 600; font-size: .875rem; color: var(--gray-500); }
.bl-toc ol { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; counter-reset: toc; }
.bl-toc li { counter-increment: toc; }
.bl-toc a { display: flex; gap: 8px; padding: 6px 0; color: var(--gray-600); text-decoration: none; font-size: .92rem; line-height: 1.4; }
.bl-toc a::before { content: counter(toc, decimal-leading-zero); flex-shrink: 0; font-weight: 700; font-size: .875rem; color: var(--brand-400); padding-top: 1px; }
.bl-toc a:hover { color: var(--brand-700); }
.bl-toc a[aria-current] { color: var(--brand-700); font-weight: 700; }
.bl-toc a[aria-current]::before { color: #f59e0b; }
.bl-main { min-width: 0; }
.bl-prose { color: #2d3748; font-size: 1.125rem; line-height: 1.7; }
.hp-body .bl-prose > * + * { margin-top: 20px; }
.hp-body .bl-prose h2 { font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1.22; color: var(--gray-900); margin-top: 48px; scroll-margin-top: calc(var(--hp-header-h) + 16px); }
.hp-body .bl-prose h3 { font-size: 1.25rem; line-height: 1.35; color: var(--gray-900); margin-top: 32px; scroll-margin-top: calc(var(--hp-header-h) + 16px); }
.hp-body .bl-prose h4 { font-size: 1.1rem; color: var(--gray-900); margin-top: 24px; }
.hp-body .bl-prose h2 + *, .hp-body .bl-prose h3 + *, .hp-body .bl-prose h4 + * { margin-top: 12px; }
.bl-prose a { color: var(--brand-600); font-weight: 600; text-underline-offset: 3px; }
.bl-prose strong { color: var(--gray-900); }
.bl-prose ul, .bl-prose ol { padding-left: 26px; }
.hp-body .bl-prose li + li { margin-top: 8px; }
.bl-prose li::marker { color: var(--brand-600); font-weight: 700; }
/* Checklists ("- [ ] item" lists) sit in a card with empty tick boxes for the reader. */
.bl-prose ul.bl-check { list-style: none; padding: 20px 22px; border: 1px solid var(--brand-100); border-radius: 16px; background: #fbfcff; }
.bl-prose ul.bl-check li { position: relative; padding-left: 34px; }
.bl-prose ul.bl-check li::before { content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--brand-400); background: #fff; }
/* Plain quote blocks (worked examples). */
.bl-prose blockquote { margin-left: 0; margin-right: 0; padding: 16px 22px; border-left: 4px solid var(--brand-400); background: var(--brand-50); border-radius: 0 14px 14px 0; }
/* Pull-quote: a line from the article, set large. */
.hp-body .bl-prose blockquote.bl-pullquote { position: relative; margin: 36px 0; padding: 8px 0 8px 28px; border-left: 4px solid var(--brand-600); border-radius: 0; background: none; }
.bl-prose .bl-pullquote p { font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-size: clamp(1.3rem, 2.4vw, 1.55rem); line-height: 1.38; font-weight: 600; color: var(--brand-800); }
/* Tip / note boxes */
.bl-prose .bl-callout { padding: 18px 20px 18px 56px; border-radius: 16px; position: relative; border: 1px solid; }
.bl-prose .bl-callout::before { content: ""; position: absolute; left: 18px; top: 20px; width: 24px; height: 24px; border-radius: 50%; background-repeat: no-repeat; background-position: center; }
.bl-prose .bl-callout p { margin: 0; font-size: 1.05rem; line-height: 1.6; }
.bl-prose .bl-callout p + p { margin-top: 4px; }
.bl-prose .bl-callout-label { font-weight: 800; font-size: .875rem !important; letter-spacing: .06em; text-transform: uppercase; }
.bl-prose .bl-callout--tip { background: #f0fdf4; border-color: #bbf7d0; }
.bl-prose .bl-callout--tip .bl-callout-label { color: #15803d; }
.bl-prose .bl-callout--tip::before { background-color: #22c55e; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7V17h8v-2.3A7 7 0 0 0 12 2z'/%3E%3C/svg%3E"); }
.bl-prose .bl-callout--note { background: var(--brand-50); border-color: var(--brand-100); }
.bl-prose .bl-callout--note .bl-callout-label { color: var(--brand-700); }
.bl-prose .bl-callout--note::before { background-color: var(--brand-600); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 11v6M12 7h.01'/%3E%3C/svg%3E"); }
/* In-article figures: photos fill the column; diagrams are mobile-first SVGs capped at 440px. */
.hp-body .bl-prose .bl-figure { margin: 36px 0; }
.bl-figure img { display: block; width: 100%; height: auto; border-radius: 16px; background: var(--brand-50); }
.bl-figure--photo img { aspect-ratio: 16 / 9; object-fit: cover; box-shadow: var(--hp-shadow); }
.bl-figure--diagram { padding: 20px 16px; border-radius: 18px; background: #f8f9fd; border: 1px solid var(--gray-100); }
.bl-figure--diagram img { max-width: 440px; margin: 0 auto; border-radius: 0; background: none; }
.bl-figure figcaption { margin-top: 12px; font-size: .9rem; line-height: 1.5; color: var(--gray-500); text-align: center; }
.hp-body .bl-prose hr { border: 0; border-top: 1px solid var(--gray-200); margin: 36px 0; }
.bl-prose code { font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--gray-100); }
.bl-table-wrap { overflow-x: auto; border: 1px solid var(--gray-200); border-radius: 14px; }
.bl-table-wrap:focus { outline: 3px solid var(--brand-200); }
.bl-prose table { width: 100%; border-collapse: collapse; font-size: .98rem; line-height: 1.5; }
.bl-prose th, .bl-prose td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--gray-100); }
.bl-prose th { background: var(--brand-50); color: var(--gray-900); }
.bl-prose tbody tr:last-child td { border-bottom: 0; }
.bl-services { margin-top: 48px; }
.bl-side-title { font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-size: 1.4rem; margin: 0 0 14px !important; color: var(--gray-900); }
/* Share row: plain links (no third-party scripts) plus a copy-link button the JS reveals. */
.bl-share { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--gray-200); }
.bl-share-title { margin: 0 0 14px !important; font-size: 1rem; font-weight: 800; letter-spacing: .02em; color: var(--gray-900); }
.bl-share-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bl-share-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--gray-200); background: #fff; color: var(--gray-800); font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; }
.bl-share--wa svg { color: #128c7e; }
.bl-share--li svg { color: #0a66c2; }
.bl-share--x svg { color: #000; }
.bl-share--copy svg { color: var(--brand-600); }
.bl-share-btn:focus-visible, .bl-authorbox-link:focus-visible { outline: 3px solid var(--brand-600); outline-offset: 3px; }
.bl-share-status { min-height: 1.4em; margin-top: 8px !important; font-size: .9rem; color: #15803d; }
@media (hover: hover) and (pointer: fine) {
  .bl-share-btn { transition: border-color .2s, background .2s, transform .2s; }
  .bl-share-btn:hover { border-color: var(--brand-400); background: var(--brand-50); transform: translateY(-1px); }
}
/* Author box: the editorial team, not invented people. */
.bl-authorbox { display: flex; gap: 20px; align-items: flex-start; margin-top: 28px; padding: 26px 28px; border-radius: 22px; background: linear-gradient(135deg, #f3f5fc, #eef1fa); border: 1px solid var(--brand-100); }
.bl-avatar--xl { width: 64px; height: 64px; font-size: 1.6rem; box-shadow: 0 8px 20px rgba(63, 86, 160, .25); }
.bl-authorbox-text { min-width: 0; }
.bl-authorbox-text > * + * { margin-top: 6px !important; }
.bl-authorbox-eyebrow { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-700); }
.bl-authorbox-name { margin: 0; font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-size: 1.45rem; line-height: 1.25; color: var(--gray-900); }
.bl-authorbox-text p { color: var(--gray-700); font-size: 1rem; line-height: 1.6; }
.bl-authorbox-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand-700); font-weight: 700; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .bl-share-btn { transition: none; } .bl-share-btn:hover { transform: none; } }
.bl-credit { margin-top: 22px !important; color: var(--gray-500); font-size: .875rem; }
.bl-related { background: #f6f8fd; }
.bl-related-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.bl-related-head .hp-section-title { margin: 0 !important; }
.bl-related-all { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand-600); font-weight: 700; text-decoration: none; }
.bl-related-all:hover { text-decoration: underline; }
@media (max-width: 1024px) {
  .bl-layout.has-toc { grid-template-columns: minmax(0, 680px); gap: 0; max-width: 728px; }
  /* Tablets/phones: the contents list is a collapsible box above the article. */
  .bl-toc { position: static; max-height: none; margin-bottom: 28px; padding: 0 18px; border: 1px solid var(--gray-200); border-radius: 16px; background: #fff; }
  .bl-toc summary { flex-direction: row; align-items: center; justify-content: space-between; min-height: 52px; }
  .bl-toc summary::after { content: ""; width: 9px; height: 9px; margin-left: 12px; border: solid var(--brand-600); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
  .bl-toc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
  .bl-toc summary .bl-toc-count { margin-left: auto; }
  .bl-toc ol { margin: 0 0 12px; }
}
@media (max-width: 640px) {
  /* Phones: in-text links get a 44px tap height from vertical padding (inline padding does not move the line box, so reading layout is unchanged). */
  .bl-prose :is(p, li, td) a { padding-block: 12px; }
  .bl-article-head { padding-top: 24px; }
  .bl-lead { font-size: 1.05rem; }
  .bl-hero--photo { display: block; min-height: 0; padding: 0; }
  .bl-hero-media { position: relative; inset: auto; z-index: 0; aspect-ratio: 16 / 9; }
  .bl-hero-scrim { background: linear-gradient(0deg, #0b1230 0%, rgba(11, 18, 48, .9) 22%, rgba(11, 18, 48, .45) 48%, rgba(11, 18, 48, 0) 72%); }
  .bl-hero--photo .bl-head-inner { position: relative; z-index: 1; margin-top: -60px; padding-top: 0; padding-bottom: 30px; }
  .bl-hero--photo .bl-h1 { font-size: clamp(1.8rem, 7.4vw, 2.2rem); }
  .bl-layout { padding-top: 28px; }
  .hp-body .bl-prose h2 { margin-top: 40px; }
  .bl-prose .bl-callout { padding: 16px 16px 16px 50px; }
  .bl-prose .bl-callout::before { left: 14px; top: 18px; }
  .hp-body .bl-prose blockquote.bl-pullquote { padding-left: 20px; margin: 30px 0; }
  .hp-body .bl-prose .bl-figure { margin: 30px 0; }
  .bl-figure--diagram { padding: 14px 8px; margin-left: -6px !important; margin-right: -6px !important; }
  .bl-prose th, .bl-prose td { padding: 9px 10px; font-size: .9rem; }
  .bl-toc a { align-items: center; min-height: 44px; padding: 8px 0; font-size: .95rem; }
  .bl-cat-link { min-height: 44px; }
  .bl-related-head { align-items: center; }
  .bl-share-btn { padding: 0 16px; }
  .bl-authorbox { flex-direction: column; gap: 14px; padding: 22px 20px; }
}

/* Sections after the article body skip rendering until they come near the viewport (the article text
   itself is left alone so contents links land exactly). */
.bl-services, .bl-share, .bl-authorbox, .bl-article .bl-cta, .bl-related { content-visibility: auto; contain-intrinsic-size: auto 360px; }
.bl-related { contain-intrinsic-size: auto 900px; }

/* Phones (articles only): the breadcrumb shows just Home › Blog, so the long current-page crumb and its
   separator never wrap onto a second line (the full trail stays on desktop and in the BreadcrumbList
   schema). The collapsed "In this article" box stops short of the floating WhatsApp button
   (62px wide, 20px from the right edge), so its count and chevron are never covered. */
@media (max-width: 640px) {
  .sp-crumbs li:last-child { display: none; }
  .sp-crumbs ol { flex-wrap: nowrap; }
  .bl-toc { margin-right: 70px; }
}
