/* ==========================================================================
   Blog article refresh (/blog/{slug}) – loaded last on single posts.
   Focus on reading: one column of comfortable text, the table of contents as the
   only sidebar element, calmer header, graceful handling of missing images.
   ========================================================================== */

.single-post{--br-ink:#0f172a;--br-text:#334155;--br-muted:#64748b;--br-line:#e2e8f0;--br-accent:#4f46e5;--br-soft:#f8fafc}

/* ---------- Header ---------- */
.single-post .bd-hero{padding:28px 0 8px!important;background:#fff!important;border:0!important}
.single-post .bd-hero-content{max-width:780px}
.single-post .bd-title{font-size:clamp(28px,3.2vw,40px)!important;line-height:1.22!important;letter-spacing:-.02em!important;color:var(--br-ink)!important;margin:14px 0 14px!important}
.single-post .bd-summary{font-size:18px!important;line-height:1.7!important;color:var(--br-muted)!important;margin:0 0 20px!important;max-width:720px}
.single-post .bd-meta{padding:16px 0 0!important;border-top:1px solid var(--br-line)!important;gap:12px 20px!important}
.single-post .bd-category-pill{font-size:12px!important}

/* Cover: hidden when the file is missing (see blog-refresh.js) */
.single-post .bd-cover{margin:8px 0 32px!important}
.single-post .bd-cover img{border-radius:16px!important;box-shadow:none!important;max-height:460px;width:100%;object-fit:cover}
.single-post .bd-cover.is-broken,.single-post .bd-content .is-broken{display:none!important}

/* ---------- Article body ---------- */
.single-post .bd-content{font-size:18px!important;line-height:1.85!important;color:var(--br-text)!important;max-width:720px}
.single-post .bd-content p{margin:0 0 1.4em!important}
.single-post .bd-content h2{font-size:1.6rem!important;line-height:1.3!important;color:var(--br-ink)!important;margin:2.4em 0 .8em!important;padding:0!important;border:0!important;scroll-margin-top:110px}
.single-post .bd-content h3{font-size:1.28rem!important;line-height:1.35!important;color:var(--br-ink)!important;margin:1.9em 0 .6em!important}
.single-post .bd-content h4{font-size:1.1rem!important;margin:1.6em 0 .5em!important}
.single-post .bd-content h2+p,.single-post .bd-content h3+p{margin-top:0!important}
/* A paragraph that is only a bold label ("Lưu ý khi …:") reads as a mini heading */
.single-post .bd-content p>strong:only-child{display:block;margin-top:1.4em;color:var(--br-ink)}
.single-post .bd-content ul,.single-post .bd-content ol{margin:0 0 1.5em!important;padding-left:1.4em!important}
.single-post .bd-content li{margin-bottom:.6em!important;padding-left:.2em}
.single-post .bd-content a{color:var(--br-accent)!important;text-underline-offset:3px}
.single-post .bd-content img{border-radius:12px}
.single-post .bd-content figure{margin:2em 0!important}
.single-post .bd-content blockquote{margin:1.8em 0!important;padding:1em 1.25em!important;border-left:4px solid var(--br-accent)!important;background:var(--br-soft)!important;border-radius:0 12px 12px 0;font-style:normal}
.single-post .bd-content table{font-size:16px!important;line-height:1.6;border:1px solid var(--br-line);border-radius:12px;border-collapse:separate;border-spacing:0;overflow:hidden;margin:1.8em 0!important}
.single-post .bd-content th{background:var(--br-soft)!important;color:var(--br-ink)!important}
.single-post .bd-content td,.single-post .bd-content th{vertical-align:top;padding:.8em 1em!important}

/* ---------- Sidebar: table of contents only ---------- */
.single-post .bd-sidebar .bd-side-card,.single-post .bd-sidebar .bd-newsletter{display:none!important}
.single-post .bd-toc-card{border:1px solid var(--br-line)!important;border-radius:14px!important;box-shadow:none!important;background:#fff!important;padding:18px 18px 12px!important}
.single-post .bd-toc a{display:block;padding:6px 0 6px 12px!important;border-left:2px solid transparent;color:var(--br-muted)!important;font-size:14px!important;line-height:1.45!important;text-decoration:none!important}
.single-post .bd-toc a:hover{color:var(--br-ink)!important}
.single-post .bd-toc a.active,.single-post .bd-toc a.is-active,.single-post .bd-toc a[aria-current]{color:var(--br-accent)!important;border-left-color:var(--br-accent);font-weight:600}

/* ---------- End of article ---------- */
.single-post .bd-author-box,.single-post .bd-share-bottom{max-width:720px;border-radius:14px!important;box-shadow:none!important}
.single-post .bd-promo{max-width:720px;border-radius:16px!important}

/* Related posts: placeholder instead of broken image alt text */
.single-post .bd-related-img{background:linear-gradient(135deg,#eef2ff,#e0e7ff)}
.single-post .bd-related-img.is-broken img{display:none!important}

@media (max-width:991.98px){
	.single-post .bd-content,.single-post .bd-summary,.single-post .bd-author-box,.single-post .bd-share-bottom,.single-post .bd-promo{max-width:none}
}
@media (max-width:575.98px){
	.single-post .bd-content{font-size:17px!important;line-height:1.8!important}
	.single-post .bd-summary{font-size:16.5px!important}
	.single-post .bd-content h2{font-size:1.4rem!important}
}
.single-post .bd-hero{padding-bottom:28px!important}
