/* PPC Studio — blog post UX layer (2026-11-23). Loaded after Astro CSS on /blog/<post>/ pages only.
   Styling/layout only: no copy, URL, menu or form changes. Brand blue #2563eb / amber #f59e0b kept. */
@media(max-width:768px){html{scroll-padding-bottom:6.5rem}}

/* 1. Readable measure (~70ch) */
.blog-post-main .blog-post-content-wrapper{max-width:42.5rem}
.blog-post-main .blog-post-content-section{max-width:none}

/* 2. Contrast: excerpt, meta, breadcrumb (were 2.9–3.5:1) */
.blog-post-main .blog-post-hero__excerpt{color:#1e40af}
.blog-post-main .blog-post-hero__meta{color:#475569;flex-wrap:wrap;justify-content:center;row-gap:.35rem}
.blog-post-main .blog-post-hero__meta > *{white-space:nowrap}
.blog-post-main .blog-post-hero__separator{color:#94a3b8}
.blog-post-main .blog-post-breadcrumb{flex-wrap:wrap;row-gap:.25rem;color:#475569}
.blog-post-main .blog-post-breadcrumb a{color:#1d4ed8;text-decoration:underline;text-decoration-color:rgba(29,78,216,.35);text-underline-offset:.2em}
.blog-post-main .blog-post-breadcrumb [aria-current]{color:#475569}
.blog-post-main .blog-post-breadcrumb li:not(:last-child):after{color:#94a3b8}
@media(max-width:768px){
 .blog-post-main .blog-post-breadcrumb{justify-content:flex-start;text-align:left;font-size:.8rem}
 .blog-post-main .blog-post-breadcrumb li:last-child{display:block;min-width:0;max-width:100%}
 .blog-post-main .blog-post-breadcrumb [aria-current]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
 .blog-post-main .blog-post-hero__meta{font-size:.8rem;gap:.45rem}
}

/* 3. Featured image: match 1200x630 source ratio, no cropping */
.blog-post-main .blog-post-hero__image-container{aspect-ratio:1200/630}
@media(max-width:768px){.blog-post-main .blog-post-hero__image-container{aspect-ratio:1200/630}}
.blog-post-main .blog-post-hero__image-container.is-broken{display:none}

/* 4. Body type rhythm */
.blog-post-main .blog-post-body{color:#1e293b}
.blog-post-main .blog-post-body h2{margin:3.25rem 0 1rem;text-wrap:balance}
.blog-post-main .blog-post-body h3{margin:2.25rem 0 .75rem;text-wrap:balance}
.blog-post-main .blog-post-body h2 + h3{margin-top:1.25rem}
.blog-post-main .blog-post-body h2,.blog-post-main .blog-post-body h3{scroll-margin-top:6.5rem}
.blog-post-main .blog-post-body p{margin:0 0 1.15rem}
.blog-post-main .blog-post-body ul,.blog-post-main .blog-post-body ol{margin:0 0 1.5rem;padding-left:1.5rem}
.blog-post-main .blog-post-body li{margin:.45rem 0;padding-left:.25rem}
.blog-post-main .blog-post-body li::marker{color:#2563eb;font-weight:600}
.blog-post-main .blog-post-body p + ul,.blog-post-main .blog-post-body p + ol{margin-top:-.35rem}
.blog-post-main .blog-post-body strong{color:#0f172a;font-weight:650}
@media(max-width:768px){
 .blog-post-main .blog-post-body{font-size:1.0625rem;line-height:1.75}
 .blog-post-main .blog-post-body p:first-of-type{font-size:1.125rem}
 .blog-post-main .blog-post-body h2{margin-top:2.5rem;line-height:1.25}
 .blog-post-main .blog-post-body h2,.blog-post-main .blog-post-body h3{scroll-margin-top:5.5rem}
}

/* 5. Links: clearly underlined, AA colour, visible focus */
.blog-post-main .blog-post-body a{color:#1d4ed8;text-decoration:underline;text-decoration-color:rgba(29,78,216,.55);text-decoration-thickness:1px;text-underline-offset:.18em;overflow-wrap:anywhere}
.blog-post-main .blog-post-body a:hover{color:#1e3a8a;text-decoration-color:currentColor;text-decoration-thickness:2px}
.blog-post-main a:focus-visible,.blog-post-main summary:focus-visible,.blog-post-main .blog-table-scroll:focus-visible{outline:3px solid #f59e0b;outline-offset:2px;border-radius:4px}

/* 6. Inline code / code blocks (code was 4.1:1) */
.blog-post-main .blog-post-body code{color:#1e40af;background:#eef3fe;border:1px solid #dbe5fb;padding:.1rem .38rem;font-size:.88em;overflow-wrap:anywhere}
.blog-post-main .blog-post-body pre{max-width:100%;white-space:pre;tab-size:2}
.blog-post-main .blog-post-body pre code{border:0;overflow-wrap:normal}

/* 7. Tables: styled header row, borders, horizontal scroll on small screens */
.blog-post-main .blog-table-scroll{margin:1.75rem 0 2rem;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #dbe5fb;border-radius:.75rem;background:#fff;box-shadow:0 8px 24px rgba(37,99,235,.06)}
.blog-post-main .blog-post-body table{margin:1.75rem 0 2rem;font-size:.95rem;line-height:1.55;border:1px solid #dbe5fb;background:#fff}
.blog-post-main .blog-table-scroll table{margin:0;border:0;border-radius:0;min-width:100%}
.blog-post-main .blog-post-body th,.blog-post-main .blog-post-body td{padding:.8rem 1rem;vertical-align:top;border-bottom:1px solid #e5ecfb}
.blog-post-main .blog-post-body thead th{background:#eaf0fe;color:#0f172a;font-weight:650;border-bottom:2px solid #2563eb;white-space:nowrap}
.blog-post-main .blog-post-body tbody tr:last-child td{border-bottom:0}
.blog-post-main .blog-post-body tbody td:first-child{font-weight:600;color:#0f172a}
.blog-post-main .blog-post-body tr:nth-child(2n){background:#f7f9fe}
@media(max-width:768px){
 .blog-post-main .blog-post-body table{font-size:.9rem}
 .blog-post-main .blog-table-scroll table{min-width:34rem}
 .blog-post-main .blog-post-body th,.blog-post-main .blog-post-body td{padding:.65rem .75rem}
 .blog-post-main .blog-table-scroll tbody td:first-child,.blog-post-main .blog-table-scroll thead th:first-child,.blog-post-main .blog-table-scroll thead td:first-child{position:sticky;left:0;z-index:1;background:inherit;box-shadow:1px 0 0 #e5ecfb}
 .blog-post-main .blog-table-scroll tr{background:#fff}
 .blog-post-main .blog-table-scroll thead tr{background:#eaf0fe}
}
.blog-post-main .blog-table-hint{display:none;margin:-1.5rem 0 1.75rem;font-size:.78rem;color:#475569}
@media(max-width:768px){.blog-post-main .blog-table-hint{display:block}}

/* 8. FAQ block (dl/dt/dd) */
.blog-post-main .blog-faq{margin:3.5rem 0 0}
.blog-post-main .blog-faq dl{margin:1.25rem 0 0;display:grid;gap:.85rem}
.blog-post-main .blog-faq__item{padding:1.15rem 1.3rem;border:1px solid #dbe5fb;border-radius:.875rem;background:#fff;box-shadow:0 6px 18px rgba(37,99,235,.05)}
.blog-post-main .blog-faq dt{font-weight:650;font-size:1.08rem;line-height:1.45;color:#0f172a;margin:0 0 .45rem}
.blog-post-main .blog-faq dd{margin:0}
.blog-post-main .blog-post-body .blog-faq dd p,.blog-post-main .blog-post-body .blog-faq dd p:first-of-type{margin:0;font-size:1rem;line-height:1.7;color:#334155}
.blog-post-main .blog-faq dd p + p{margin-top:.6rem}

/* 9. Sources list */
.blog-post-main .blog-sources{margin:3rem 0 0;padding:1.4rem 1.4rem .6rem;border-top:1px solid #dbe5fb;background:#f8faff;border-radius:.875rem}
.blog-post-main .blog-sources h2{font-size:1.25rem;margin:0 0 .75rem}
.blog-post-main .blog-sources ol{font-size:.92rem;line-height:1.55;margin:0 0 .75rem}
.blog-post-main .blog-sources li{margin:.4rem 0}

/* 10. In-content CTA box */
.blog-post-main .blog-post-cta{margin:3rem 0 0;padding:1.6rem;border-radius:1rem;text-align:center;background:linear-gradient(135deg,rgba(37,99,235,.08),rgba(245,158,11,.08));border:1px solid rgba(37,99,235,.18)}
.blog-post-main .blog-post-body .blog-post-cta a{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:.8rem 1.5rem;border-radius:999px;background:#1d4ed8;color:#fff;font-weight:600;text-decoration:none;box-shadow:0 10px 24px rgba(37,99,235,.25)}
.blog-post-main .blog-post-body .blog-post-cta a:hover{background:#1e40af;color:#fff;text-decoration:none}
.blog-post-main .blog-post-body .blog-post-cta a::after{content:"→";margin-left:.5rem}
@media(max-width:768px){.blog-post-main .blog-post-body .blog-post-cta a{width:100%}}

/* 11. Auto table of contents (built from existing H2s) */
.blog-post-main .blog-toc{margin:0 0 2.25rem;border:1px solid #dbe5fb;border-radius:.875rem;background:#fff;box-shadow:0 6px 18px rgba(37,99,235,.05)}
.blog-post-main .blog-toc summary{cursor:pointer;list-style:none;padding:.9rem 1.15rem;font-size:.85rem;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:#1d4ed8;display:flex;justify-content:space-between;align-items:center;min-height:44px}
.blog-post-main .blog-toc summary::-webkit-details-marker{display:none}
.blog-post-main .blog-toc summary::after{content:"+";font-size:1.2rem;line-height:1}
.blog-post-main .blog-toc[open] summary::after{content:"–"}
.blog-post-main .blog-toc ol{margin:0;padding:0 1.15rem 1rem 2.4rem;font-size:.95rem;line-height:1.5}
.blog-post-main .blog-toc li{margin:.4rem 0}
.blog-post-main .blog-toc a{color:#1e293b;text-decoration:underline;text-decoration-color:rgba(37,99,235,.35);text-underline-offset:.18em}
.blog-post-main .blog-toc a:hover{color:#1d4ed8}
.blog-post-main .blog-toc li::marker{color:#2563eb}

/* 12. Keep last content clear of the fixed mobile CTA bar */
@media(max-width:767px){.blog-post-main .blog-post-content-section{padding-bottom:6.5rem}}

/* 13. Tighter hero→content gap (esp. posts without/with collapsed featured image) */
.blog-post-main .blog-post-hero__container{margin-bottom:2rem}
.blog-post-main .blog-post-hero__image-container{margin-top:1.5rem}
.blog-post-main .blog-post-content-section{padding-top:2rem}
@media(max-width:768px){
 .blog-post-main .blog-post-hero__separator{display:none}
 .blog-post-main .blog-post-hero__meta{column-gap:1rem}
 .blog-post-main .blog-post-content-section{padding-top:1.5rem}
}
.blog-post-main .blog-post-body .blog-post-cta a{white-space:nowrap;gap:.5rem}
.blog-post-main .blog-post-body .blog-post-cta a::after{margin-left:0}
html body main.blog-post-main > section.blog-post-hero:first-of-type{padding-bottom:1.25rem!important}
