/* ═══ Blog post design layer (loaded on every /blog/<slug>/ page) ═══ */
:root { --bp-ink: #0f172a; --bp-body: #334155; --bp-mute: #64748b; --bp-line: #e2e8f0; --bp-brand: #4f46e5; --bp-brand2: #7c3aed; }
html { scroll-behavior: smooth; }
body { background: #fff; }

.bp-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 99999; background: linear-gradient(90deg, #4f46e5, #a855f7, #ec4899); transition: width .08s linear; pointer-events: none; }

.bp-page { max-width: 1180px !important; padding: 28px 24px 96px !important; }

/* breadcrumbs */
.bp-crumbs { margin-bottom: 22px !important; font-size: 13px; }
.bp-crumbs a { color: var(--bp-mute) !important; font-weight: 500 !important; transition: color .2s; }
.bp-crumbs a:hover { color: var(--bp-brand) !important; }
.bp-crumbs span { color: var(--bp-ink); font-weight: 600; }

/* hero */
.bp-hero { position: relative; overflow: hidden; border-radius: 28px; padding: 44px 44px 32px; margin-bottom: 36px; background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 55%, #fdf2f8 100%); border: 1px solid #e0e7ff; box-shadow: 0 30px 60px -36px rgba(79,70,229,.35); }
.bp-hero::before, .bp-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(8px); }
.bp-hero::before { width: 320px; height: 320px; right: -80px; top: -140px; background: radial-gradient(circle, rgba(168,85,247,.28), transparent 65%); }
.bp-hero::after { width: 260px; height: 260px; left: -90px; bottom: -150px; background: radial-gradient(circle, rgba(99,102,241,.22), transparent 65%); }
.bp-hero > * { position: relative; z-index: 1; }
.bp-badge { display: inline-flex !important; align-items: center; gap: 6px; background: rgba(255,255,255,.75) !important; color: var(--bp-brand) !important; font-size: 12px !important; font-weight: 700 !important; letter-spacing: .06em; text-transform: uppercase; padding: 6px 14px !important; border-radius: 999px; border: 1px solid rgba(99,102,241,.25); }
.bp-hero h1 { font-size: clamp(28px, 4.2vw, 46px) !important; line-height: 1.15 !important; font-weight: 800 !important; letter-spacing: -.025em; color: var(--bp-ink) !important; margin: 18px 0 20px !important; max-width: 920px; }
.bp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.bp-meta > * { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid rgba(226,232,240,.9); font-size: 13px !important; color: var(--bp-mute) !important; text-decoration: none; }
.bp-meta a:hover { color: var(--bp-brand) !important; border-color: #c7d2fe; }

/* layout: article + sticky TOC */
.bp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 56px; align-items: start; max-width: 1080px; margin: 0 auto; }
.bp-main { min-width: 0; }
.bp-aside { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; }
.bp-toc { border: 1px solid var(--bp-line); border-radius: 20px; padding: 20px 18px; background: #fff; box-shadow: 0 14px 34px -22px rgba(79,70,229,.35); }
.bp-toc-t { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--bp-mute); }
.bp-toc-t i { color: var(--bp-brand); }
.bp-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.bp-toc li { counter-increment: toc; }
.bp-toc a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; line-height: 1.4; color: var(--bp-mute); text-decoration: none; transition: background .2s, color .2s; }
.bp-toc a::before { content: counter(toc, decimal-leading-zero); font-size: 11px; font-weight: 700; color: #a5b4fc; padding-top: 2px; min-width: 18px; }
.bp-toc a:hover { background: #f5f3ff; color: var(--bp-brand); }
.bp-toc a.on { background: linear-gradient(135deg, rgba(79,70,229,.1), rgba(124,58,237,.1)); color: var(--bp-brand); font-weight: 600; }
.bp-toc a.on::before { color: var(--bp-brand); }
.bp-tool-cta { margin-top: 16px; padding: 20px 18px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 18px 36px -18px rgba(79,70,229,.7); }
.bp-tool-cta b { display: block; font-size: 15px; margin-bottom: 6px; }
.bp-tool-cta span { display: block; font-size: 13px; line-height: 1.5; color: #e0e7ff; margin-bottom: 14px; }
.bp-tool-cta a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px; background: #fff; color: var(--bp-brand); font-weight: 700; font-size: 13px; text-decoration: none; transition: transform .2s; }
.bp-tool-cta a:hover { transform: translateY(-2px); }

/* article typography */
.article-body { font-size: 1.0625rem; }
.article-body h2 { position: relative; scroll-margin-top: 96px; font-size: clamp(1.4rem, 2.4vw, 1.75rem) !important; font-weight: 800 !important; letter-spacing: -.02em; color: var(--bp-ink) !important; border-bottom: 0 !important; padding: 0 0 0 18px !important; margin: 3rem 0 1.1rem !important; line-height: 1.3; }
.article-body h2::before { content: ""; position: absolute; left: 0; top: .12em; bottom: .12em; width: 5px; border-radius: 99px; background: linear-gradient(180deg, #4f46e5, #a855f7); }
.article-body h3 { scroll-margin-top: 96px; color: var(--bp-ink) !important; letter-spacing: -.01em; }
.article-body p, .article-body li { color: var(--bp-body) !important; line-height: 1.85 !important; font-size: 1.0625rem !important; }
.article-body a { color: var(--bp-brand) !important; text-decoration: underline; text-decoration-color: rgba(79,70,229,.3); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.article-body a:hover { text-decoration-color: var(--bp-brand); }
.article-body ul { list-style: none; padding-left: 0 !important; }
.article-body ul > li { position: relative; padding-left: 26px; }
.article-body ul > li::before { content: ""; position: absolute; left: 4px; top: .78em; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #4f46e5, #a855f7); }
.article-body ol > li::marker { color: var(--bp-brand); font-weight: 700; }
.article-body code { background: #f1f5f9; border: 1px solid var(--bp-line); border-radius: 6px; padding: 1px 6px; font-size: .9em; color: #be185d; }
.article-body img { max-width: 100%; height: auto; border-radius: 14px; }

/* callouts with icons */
.callout, .tip-box, .warn-box { position: relative; border-left: 0 !important; border-radius: 18px !important; padding: 1.3rem 1.5rem 1.3rem 4.2rem !important; border: 1px solid transparent; box-shadow: 0 10px 28px -20px rgba(15,23,42,.35); }
.callout { background: linear-gradient(135deg, #eef2ff, #f5f3ff) !important; border-color: #ddd6fe; }
.tip-box { background: linear-gradient(135deg, #ecfdf5, #f0fdf4) !important; border-color: #a7f3d0; }
.warn-box { background: linear-gradient(135deg, #fffbeb, #fff7ed) !important; border-color: #fde68a; }
.callout::before, .tip-box::before, .warn-box::before { font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; position: absolute; left: 1.2rem; top: 1.2rem; width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #fff; }
.callout::before { content: "\f05a"; background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.tip-box::before { content: "\f0eb"; background: linear-gradient(135deg, #10b981, #059669); }
.warn-box::before { content: "\f071"; background: linear-gradient(135deg, #f59e0b, #d97706); }

/* quick answer */
.quick-answer { position: relative; border-radius: 22px !important; border: 1px solid #bae6fd !important; background: linear-gradient(135deg, #f0f9ff, #e0f2fe 60%, #ede9fe) !important; box-shadow: 0 18px 40px -26px rgba(2,132,199,.5); padding: 1.5rem 1.75rem !important; }
.quick-answer .qa-label { display: inline-flex; align-items: center; gap: 6px; background: #0284c7; color: #fff !important; padding: 4px 12px; border-radius: 999px; margin-bottom: 12px !important; }
.quick-answer p { font-size: 1.05rem !important; }

/* figure */
.blog-figure { border-radius: 22px !important; border: 1px solid var(--bp-line) !important; box-shadow: 0 18px 40px -28px rgba(79,70,229,.4); background: linear-gradient(135deg, #fafaff, #fff) !important; }

/* tables */
.bp-tablewrap { overflow-x: auto; margin: 1.6rem 0; border-radius: 16px; border: 1px solid var(--bp-line); box-shadow: 0 12px 30px -24px rgba(79,70,229,.4); -webkit-overflow-scrolling: touch; }
.bp-tablewrap table { margin: 0 !important; border-radius: 0 !important; min-width: 520px; }
.bp-tablewrap th { white-space: nowrap; }
.bp-tablewrap tbody tr { transition: background .15s; }
.bp-tablewrap tbody tr:hover td { background: #f5f3ff !important; }
.bp-tablewrap td:first-child { font-weight: 600; color: var(--bp-ink); }

/* FAQ as cards */
.article-body .faq-item { border: 1px solid var(--bp-line) !important; border-radius: 16px; padding: 1.15rem 1.3rem !important; margin-bottom: 12px; background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s; }
.article-body .faq-item:hover { border-color: #c7d2fe !important; box-shadow: 0 14px 30px -22px rgba(79,70,229,.5); transform: translateY(-1px); }
.article-body .faq-item h3 { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 .5rem !important; font-size: 1.05rem !important; }
.article-body .faq-item h3::before { content: "Q"; flex: 0 0 24px; height: 24px; margin-top: 2px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.article-body .faq-item p { padding-left: 34px; }

/* share bar + notices */
.bp-share { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 2.2rem 0 0; padding: 18px 20px; border: 1px solid var(--bp-line); border-radius: 18px; background: #fafaff; }
.bp-share > b { font-size: 13px; color: var(--bp-mute); font-weight: 700; margin-right: 6px; }
.bp-share a, .bp-share button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--bp-line); background: #fff; color: var(--bp-body); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; font-family: inherit; transition: transform .2s, border-color .2s, color .2s, box-shadow .2s; }
.bp-share a:hover, .bp-share button:hover { transform: translateY(-2px); border-color: #a5b4fc; color: var(--bp-brand); box-shadow: 0 10px 22px -14px rgba(79,70,229,.6); }
.bp-note { display: flex; gap: 10px; align-items: center; margin: 0 0 22px; padding: 12px 16px; border-radius: 14px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 13.5px; }

/* CTA + related */
.bp-page div[style*="linear-gradient(135deg,#4f46e5,#7c3aed)"][style*="border-radius:20px"] { position: relative; overflow: hidden; border-radius: 28px !important; padding: 52px 32px !important; max-width: 1080px; margin: 56px auto !important; box-shadow: 0 36px 70px -34px rgba(79,70,229,.75); background: linear-gradient(135deg, #4338ca, #7c3aed 60%, #c026d3) !important; }
.bp-page div[style*="linear-gradient(135deg,#4f46e5,#7c3aed)"][style*="border-radius:20px"]::before { content: ""; position: absolute; width: 280px; height: 280px; right: -80px; top: -120px; border-radius: 50%; background: rgba(255,255,255,.12); }
.bp-page div[style*="linear-gradient(135deg,#4f46e5,#7c3aed)"][style*="border-radius:20px"] > * { position: relative; }
.bp-page div[style*="linear-gradient(135deg,#4f46e5,#7c3aed)"][style*="border-radius:20px"] a { box-shadow: 0 16px 30px -12px rgba(0,0,0,.45); transition: transform .25s; }
.bp-page div[style*="linear-gradient(135deg,#4f46e5,#7c3aed)"][style*="border-radius:20px"] a:hover { transform: translateY(-3px) scale(1.02); }
.bp-relh { max-width: 1080px; margin: 0 auto 20px !important; font-size: 1.35rem !important; font-weight: 800 !important; letter-spacing: -.02em; color: var(--bp-ink) !important; }
.bp-rel { max-width: 1080px; margin: 0 auto; }
.bp-rel > a { border-radius: 20px !important; padding: 22px !important; border: 1px solid var(--bp-line) !important; box-shadow: 0 1px 2px rgba(15,23,42,.04) !important; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s !important; }
.bp-rel > a:hover { transform: translateY(-5px); border-color: #c7d2fe !important; box-shadow: 0 24px 44px -22px rgba(79,70,229,.45) !important; }
.bp-back { max-width: 1080px; margin-left: auto !important; margin-right: auto !important; display: flex !important; width: 100%; }

@media (max-width: 1100px) {
  .bp-layout { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 820px; }
  .bp-aside { position: static; max-height: none; order: -1; margin-bottom: 26px; }
  .bp-tool-cta { display: none; }
  .bp-toc ol { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
  .bp-toc.open ol { max-height: 1200px; }
  .bp-toc-t { cursor: pointer; margin: 0; }
  .bp-toc.open .bp-toc-t { margin-bottom: 12px; }
  .bp-toc-t::after { content: "\f078"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; margin-left: auto; font-size: 11px; transition: transform .25s; }
  .bp-toc.open .bp-toc-t::after { transform: rotate(180deg); }
}
@media (max-width: 640px) {
  .bp-page { padding: 18px 16px 72px !important; }
  .bp-hero { padding: 28px 20px 22px; border-radius: 22px; }
  .callout, .tip-box, .warn-box { padding: 1.1rem 1.1rem 1.1rem 3.6rem !important; }
  .callout::before, .tip-box::before, .warn-box::before { left: .9rem; top: 1rem; width: 34px; height: 34px; }
  .article-body .faq-item p { padding-left: 0; }
}
[dir="rtl"] .article-body h2 { padding: 0 18px 0 0 !important; }
[dir="rtl"] .article-body h2::before { left: auto; right: 0; }
[dir="rtl"] .article-body ul > li { padding-left: 0; padding-right: 26px; }
[dir="rtl"] .article-body ul > li::before { left: auto; right: 4px; }
[dir="rtl"] .callout, [dir="rtl"] .tip-box, [dir="rtl"] .warn-box { padding: 1.3rem 4.2rem 1.3rem 1.5rem !important; }
[dir="rtl"] .callout::before, [dir="rtl"] .tip-box::before, [dir="rtl"] .warn-box::before { left: auto; right: 1.2rem; }
[dir="rtl"] th, [dir="rtl"] td { text-align: right !important; }
[dir="rtl"] .bp-toc a { text-align: right; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .bp-rel > a:hover, .bp-share a:hover, .bp-share button:hover { transform: none; } }
.bp-note[hidden] { display: none !important; }

.bp-cta h2, .bp-cta h3 { color: #fff !important; padding: 0 !important; border: 0 !important; margin: 0 0 12px !important; }
.bp-cta h2::before { display: none !important; }
.bp-cta p { color: rgba(255,255,255,.88) !important; }
.article-body .bp-relh { padding: 0 !important; margin: 2.5rem 0 1rem !important; }
.article-body .bp-relh::before { display: none; }
.bp-legacy .article-body { max-width: none; }
.bp-cta a { text-decoration: none !important; }
