/* ============================================================
   Blog article — /blog/{slug}
   ------------------------------------------------------------
   Markup:    resources/views/frontend/blog_detail.blade.php
              resources/views/frontend/inc/blog-comment.blade.php
   Behaviour: public/frontend/js/blog-detail.js
   Mobile-first: base rules target phones, min-width queries add up.
   ============================================================ */

.bld {
    --bd-navy: #061634;
    --bd-navy-2: #0b2a5b;
    --bd-blue: #2563eb;
    --bd-blue-d: #1d4ed8;
    --bd-orange: #f97316;
    --bd-ink: #0f172a;
    --bd-body: #334155;
    --bd-text: #475569;
    --bd-muted: #64748b;
    --bd-line: #e6ebf3;
    --bd-soft: #f5f8fe;
    --bd-radius: 16px;
    --bd-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
    --bd-shadow-hover: 0 18px 40px rgba(15, 23, 42, .12);
    --bd-sticky-top: 96px;
    background: #f7f9fd;
    color: var(--bd-text);
    overflow-x: clip;
}
.bld *, .bld *::before, .bld *::after { box-sizing: border-box; }
.bld a { text-decoration: none; }
.bld [hidden] { display: none !important; }
.bld :focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; border-radius: 6px; }
.bld-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Reading progress bar ─────────────────────────────────── */
.bld-readbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1090; height: 3px; pointer-events: none; }
.bld-readbar span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--bd-blue), #38bdf8);
    box-shadow: 0 0 8px rgba(37, 99, 235, .5);
    transition: width .1s linear;
}

/* ── Shared pieces ────────────────────────────────────────── */
.bld-avatar {
    flex-shrink: 0;
    width: 40px; height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bd-blue), #7c3aed);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}
.bld-avatar--sm { width: 32px; height: 32px; font-size: 11px; }
.bld-avatar--lg { width: 64px; height: 64px; font-size: 20px; border-radius: 18px; }
.bld-avatar--staff { background: linear-gradient(135deg, var(--bd-orange), #dc2626); }

.bld-eyebrow { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--bd-blue); }

.bld-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid var(--bd-blue);
    border-radius: 10px;
    background: var(--bd-blue);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, opacity .2s;
}
.bld-btn:hover { background: var(--bd-blue-d); border-color: var(--bd-blue-d); color: #fff; }
.bld-btn:disabled, .bld-btn.is-loading { opacity: .65; cursor: progress; }
.bld-btn--ghost { background: #fff; border-color: var(--bd-line); color: var(--bd-ink); }
.bld-btn--ghost:hover { background: var(--bd-soft); border-color: #cbd8ee; color: var(--bd-ink); }

.bld-cat {
    --c: var(--bd-blue);
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--c);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bld-cat::before { content: ""; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.bld-cat:hover { color: var(--c); text-decoration: underline; text-underline-offset: 3px; }

.bld-widget {
    padding: 20px;
    background: #fff;
    border: 1px solid var(--bd-line);
    border-radius: var(--bd-radius);
    box-shadow: var(--bd-shadow);
}
.bld-widget__title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 16px; font-weight: 800; color: var(--bd-ink); }
.bld-widget__title i {
    width: 30px; height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eff5ff;
    color: var(--bd-blue);
    font-size: 13px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.bld-hero {
    position: relative;
    overflow: hidden;
    padding: 24px 0 76px;
    color: #fff;
    background:
        radial-gradient(900px 420px at 88% -12%, rgba(37, 99, 235, .38), transparent 60%),
        radial-gradient(600px 300px at -10% 115%, rgba(249, 115, 22, .16), transparent 60%),
        linear-gradient(160deg, var(--bd-navy) 0%, var(--bd-navy-2) 100%);
}
.bld-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
    mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
}
.bld-hero > .container { position: relative; }

.bld-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: rgba(255, 255, 255, .6);
}
.bld-crumbs li { min-width: 0; }
.bld-crumbs li + li::before { content: "/"; margin-right: 6px; color: rgba(255, 255, 255, .35); }
.bld-crumbs a { color: rgba(255, 255, 255, .8); transition: color .2s; }
.bld-crumbs a:hover { color: #fff; }
.bld-crumbs [aria-current] { color: #fff; font-weight: 600; }

.bld-hero__inner { max-width: 860px; }
.bld-pill {
    --c: #60a5fa;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: background-color .2s;
}
.bld-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.bld-pill:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.bld-hero__title {
    margin: 14px 0 12px;
    font-size: clamp(1.7rem, 1.15rem + 2.4vw, 2.75rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: #fff;
    overflow-wrap: anywhere;
}
.bld-hero__lead { margin: 0; max-width: 720px; font-size: 16px; line-height: 1.7; color: rgba(255, 255, 255, .76); }

.bld-byline { display: grid; gap: 14px; margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
.bld-byline__who { display: flex; align-items: center; gap: 12px; }
.bld-byline__who b { display: block; font-size: 15px; color: #fff; }
.bld-byline__who div span { display: block; font-size: 13px; color: rgba(255, 255, 255, .62); }
.bld-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bld-facts li,
.bld-facts a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
    white-space: nowrap;
}
.bld-facts li:has(> a) { padding: 0; border: 0; background: none; }
.bld-facts a { transition: background-color .2s; }
.bld-facts a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.bld-facts i { font-size: 12px; color: #93c5fd; }

/* ── Layout ───────────────────────────────────────────────── */
.bld-body { position: relative; margin-top: -48px; padding-bottom: 64px; }
.bld-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.bld-main { display: grid; gap: 24px; min-width: 0; align-content: start; }

/* ── Article card ─────────────────────────────────────────── */
.bld-article {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--bd-line);
    border-radius: 20px;
    box-shadow: var(--bd-shadow);
}
.bld-cover {
    margin: 0;
    /* aspect-ratio: 1200 / 630; */
    overflow: hidden;
    background: linear-gradient(135deg, var(--bd-navy), var(--bd-blue));
}
.bld-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bld-article__inner { padding: 20px 18px 8px; }

/* Mobile / tablet table of contents */
.bld-toc-mobile {
    margin: 0 0 24px;
    border: 1px solid var(--bd-line);
    border-radius: 12px;
    background: var(--bd-soft);
}
.bld-toc-mobile summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 800;
    color: var(--bd-ink);
    cursor: pointer;
    list-style: none;
}
.bld-toc-mobile summary::-webkit-details-marker { display: none; }
.bld-toc-mobile summary > i:first-child { color: var(--bd-blue); }
.bld-toc-mobile summary small { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--bd-muted); }
.bld-toc-mobile summary .fa-chevron-down { font-size: 12px; color: var(--bd-muted); transition: transform .2s; }
.bld-toc-mobile[open] summary .fa-chevron-down { transform: rotate(180deg); }
.bld-toc-mobile .bld-toc__list { padding: 0 14px 12px; }

/* Table of contents list (shared) */
.bld-toc__list { margin: 0; padding: 0; list-style: none; counter-reset: bld-toc; }
.bld-toc__list li { counter-increment: bld-toc; }
.bld-toc__list a {
    position: relative;
    display: flex;
    gap: 10px;
    padding: 7px 10px 7px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--bd-text);
    transition: color .2s;
}
.bld-toc__list a::before {
    content: counter(bld-toc, decimal-leading-zero);
    flex-shrink: 0;
    min-width: 22px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.75;
    color: #a9bbd8;
    transition: color .2s;
}
.bld-toc__list a:hover { color: var(--bd-blue); }
.bld-toc__list a.is-active { color: var(--bd-blue); }
.bld-toc__list a.is-active::before { color: var(--bd-blue); }

/* ── Article typography ───────────────────────────────────── */
.bld-content { font-size: 16.5px; line-height: 1.8; color: var(--bd-body); overflow-wrap: break-word; }
.bld-content > :first-child { margin-top: 0; }
.bld-content p { margin: 0 0 1.2em; }
.bld-content h2,
.bld-content h3,
.bld-content h4 { color: var(--bd-ink); font-weight: 800; letter-spacing: -.01em; scroll-margin-top: calc(var(--bd-sticky-top) + 12px); }
.bld-content h2 {
    margin: 2em 0 .7em;
    padding-top: 1.4em;
    border-top: 1px solid var(--bd-line);
    font-size: 1.45rem;
    line-height: 1.3;
}
.bld-content > h2:first-child { padding-top: 0; border-top: 0; }
.bld-content h3 { margin: 1.6em 0 .55em; font-size: 1.18rem; line-height: 1.35; }
.bld-content h4 { margin: 1.4em 0 .5em; font-size: 1.05rem; }
.bld-content strong, .bld-content b { color: var(--bd-ink); font-weight: 700; }
.bld-content a {
    color: var(--bd-blue);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, .35);
    text-underline-offset: 3px;
    transition: text-decoration-color .2s, color .2s;
}
.bld-content a:hover { color: var(--bd-blue-d); text-decoration-color: currentColor; }
.bld-content ul,
.bld-content ol { margin: 0 0 1.3em; padding-left: 1.35em; }
.bld-content li { margin-bottom: .5em; padding-left: .25em; }
.bld-content li::marker { color: var(--bd-blue); font-weight: 700; }
.bld-content li > ul, .bld-content li > ol { margin: .5em 0 0; }
.bld-content blockquote {
    margin: 1.6em 0;
    padding: 16px 20px;
    border-left: 4px solid var(--bd-blue);
    border-radius: 0 12px 12px 0;
    background: #eff5ff;
    color: var(--bd-ink);
    font-size: 1.02em;
}
.bld-content blockquote > :last-child { margin-bottom: 0; }
.bld-content hr { margin: 2em 0; border: 0; border-top: 1px solid var(--bd-line); }
.bld-content img { max-width: 100%; height: auto; margin: 1.2em 0; border-radius: 12px; }
.bld-content code {
    padding: .12em .4em;
    border-radius: 6px;
    background: #eef2f8;
    color: #be185d;
    font-size: .88em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.bld-content pre {
    margin: 1.4em 0;
    padding: 16px 18px;
    overflow-x: auto;
    border-radius: 12px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.65;
}
.bld-content pre code { padding: 0; background: none; color: inherit; font-size: inherit; }

.bld-table {
    margin: 1.5em 0;
    overflow-x: auto;
    border: 1px solid var(--bd-line);
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}
.bld-content table { width: 100%; min-width: 520px; margin: 0; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.bld-content th,
.bld-content td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--bd-line); }
.bld-content th { background: var(--bd-soft); color: var(--bd-ink); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.bld-content tr:last-child td { border-bottom: 0; }
.bld-content tbody tr:nth-child(even) td { background: #fbfcfe; }
.bld-content td:first-child { color: var(--bd-ink); font-weight: 600; }

/* ── Article footer: tags + share ─────────────────────────── */
.bld-article__foot { display: grid; gap: 18px; margin: 12px 18px 0; padding: 20px 0; border-top: 1px solid var(--bd-line); }
.bld-label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bd-muted); }
.bld-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.bld-tag {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--bd-line);
    border-radius: 999px;
    background: var(--bd-soft);
    color: var(--bd-text);
    font-size: 13px;
    font-weight: 600;
    transition: background-color .2s, border-color .2s, color .2s;
}
.bld-tag:hover { background: var(--bd-blue); border-color: var(--bd-blue); color: #fff; }

.bld-share__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bld-share__btn {
    --brand: var(--bd-blue);
    width: 40px; height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--bd-line);
    border-radius: 10px;
    background: #fff;
    color: var(--bd-text);
    font-size: 15px;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.bld-share__btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px); }
.bld-share__btn--fb { --brand: #1877f2; }
.bld-share__btn--x { --brand: #0f172a; }
.bld-share__btn--in { --brand: #0a66c2; }
.bld-share__btn--wa { --brand: #25d366; }
.bld-share__btn.is-done { background: #16a34a; border-color: #16a34a; color: #fff; }
.bld-share__status { min-height: 20px; margin-top: 6px; font-size: 13px; font-weight: 600; color: #16a34a; }

/* ── Author ───────────────────────────────────────────────── */
.bld-author { display: flex; flex-direction: column; gap: 14px; }
.bld-author h2 { margin: 2px 0 6px; font-size: 1.15rem; font-weight: 800; color: var(--bd-ink); }
.bld-author p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.65; }
.bld-author__links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.bld-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--bd-blue); transition: gap .2s, color .2s; }
.bld-link:hover { gap: 10px; color: var(--bd-blue-d); }

/* ── Previous / next ──────────────────────────────────────── */
.bld-pn { display: grid; gap: 12px; }
.bld-pn__link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--bd-line);
    border-radius: 14px;
    box-shadow: var(--bd-shadow);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.bld-pn__link:hover { border-color: #bfd3fb; box-shadow: var(--bd-shadow-hover); transform: translateY(-2px); }
.bld-pn__link span { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--bd-muted); }
.bld-pn__link b {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.45;
    color: var(--bd-ink);
}
.bld-pn__link:hover b { color: var(--bd-blue); }
.bld-pn__link--next { text-align: right; align-items: flex-end; }

/* ── Comments ─────────────────────────────────────────────── */
.bld-comments { scroll-margin-top: var(--bd-sticky-top); }
.bld-comments__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 16px; }
.bld-comments__head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.2rem; font-weight: 800; color: var(--bd-ink); }
.bld-comments__head p { margin: 0; font-size: 14px; color: var(--bd-muted); }
.bld-count {
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #eff5ff;
    color: var(--bd-blue);
    font-size: 13px;
    font-weight: 800;
}

.bld-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}
.bld-alert i { margin-top: 3px; }
.bld-alert ul { margin: 0; padding-left: 18px; }
.bld-alert--ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.bld-alert--err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.bld-form { display: grid; gap: 10px; }
.bld-form__who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--bd-muted); }
.bld-form__who b { color: var(--bd-ink); }
.bld-form textarea {
    width: 100%;
    min-height: 110px;
    padding: 12px 14px;
    border: 1px solid var(--bd-line);
    border-radius: 12px;
    background: var(--bd-soft);
    color: var(--bd-ink);
    font: inherit;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.bld-form textarea:focus { outline: none; border-color: var(--bd-blue); background: #fff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.bld-form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.bld-form__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.bld-counter { font-size: 12px; font-weight: 600; color: var(--bd-muted); font-variant-numeric: tabular-nums; }
.bld-counter.is-near { color: #c2410c; }
.bld-form--reply { margin: 12px 0 4px; padding: 14px; border: 1px solid var(--bd-line); border-radius: 12px; background: #fff; }
.bld-form--reply textarea { min-height: 84px; }
.bld-form__to { margin: 0; font-size: 13px; color: var(--bd-muted); }
.bld-form__to b { color: var(--bd-ink); }

.bld-login {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px dashed #c8d7ef;
    border-radius: 14px;
    background: var(--bd-soft);
}
.bld-login__intro { display: flex; align-items: center; gap: 12px; }
.bld-login__icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    color: var(--bd-blue);
    font-size: 18px;
    box-shadow: var(--bd-shadow);
}
.bld-login b { display: block; font-size: 15px; color: var(--bd-ink); }
.bld-login__intro div span { display: block; font-size: 13.5px; line-height: 1.5; color: var(--bd-muted); }
.bld-login__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.bld-thread { margin: 20px 0 0; padding: 0; list-style: none; }
.bld-thread > .bld-c + .bld-c { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--bd-line); }
.bld-thread--nested { margin: 14px 0 0 18px; padding-left: 14px; border-left: 2px solid #e3ebf7; }
.bld-thread--nested > .bld-c + .bld-c { margin-top: 14px; padding-top: 0; border-top: 0; }
.bld-c { scroll-margin-top: var(--bd-sticky-top); }
.bld-c__card { display: flex; gap: 12px; }
.bld-c__body { flex: 1; min-width: 0; }
.bld-c__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.bld-c__meta b { font-size: 14.5px; color: var(--bd-ink); }
.bld-c__meta time { font-size: 12.5px; color: var(--bd-muted); }
.bld-c__badge { padding: 2px 8px; border-radius: 999px; background: #fff7ed; border: 1px solid #fed7aa; color: #c2410c; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.bld-c__text { margin-top: 4px; font-size: 15px; line-height: 1.65; color: var(--bd-body); overflow-wrap: anywhere; }
.bld-c__reply {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--bd-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: color .2s;
}
.bld-c__reply:hover, .bld-c__reply[aria-expanded="true"] { color: var(--bd-blue); }

/* ── Sidebar ──────────────────────────────────────────────── */
.bld-side { display: grid; gap: 20px; align-content: start; min-width: 0; }
.bld-toc { display: none; }
.bld-toc__progress { height: 4px; margin: -4px 0 12px; overflow: hidden; border-radius: 999px; background: #eef2f8; }
.bld-toc__progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--bd-blue); transition: width .1s linear; }

.bld-cta {
    padding: 24px 20px;
    border-radius: var(--bd-radius);
    color: #fff;
    background:
        radial-gradient(320px 220px at 100% 0, rgba(249, 115, 22, .32), transparent 60%),
        linear-gradient(150deg, var(--bd-navy), var(--bd-navy-2));
}
.bld-cta__eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #fdba74; }
.bld-cta h2 { margin: 8px 0 10px; font-size: 1.15rem; font-weight: 900; line-height: 1.3; color: #fff; }
.bld-cta p { margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, .74); }
.bld-cta__actions { display: grid; gap: 8px; }
.bld-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--bd-orange);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    transition: background-color .2s;
}
.bld-cta__btn:hover { background: #ea580c; color: #fff; }
.bld-cta__btn--ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); }
.bld-cta__btn--ghost:hover { background: rgba(255, 255, 255, .16); }

/* ── Related articles ─────────────────────────────────────── */
.bld-related { margin-top: 48px; }
.bld-related__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.bld-related__head h2 { margin: 4px 0 0; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.65rem); font-weight: 900; color: var(--bd-ink); }
.bld-related__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

.bld-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--bd-line);
    border-radius: var(--bd-radius);
    box-shadow: var(--bd-shadow);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.bld-card:hover { transform: translateY(-4px); box-shadow: var(--bd-shadow-hover); border-color: #d6e2f5; }
.bld-card__media { position: relative; aspect-ratio: 1200 / 630; overflow: hidden; background: linear-gradient(135deg, var(--bd-navy), var(--bd-blue)); }
.bld-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.bld-card:hover .bld-card__media img { transform: scale(1.035); }
.bld-card__ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; color: rgba(255, 255, 255, .55); }
.bld-card__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 16px 18px 18px; }
.bld-card__title {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 16.5px;
    font-weight: 800;
    line-height: 1.4;
    color: var(--bd-ink);
}
.bld-card__title a { color: inherit; transition: color .2s; }
.bld-card:hover .bld-card__title a { color: var(--bd-blue); }
.bld-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bld-card__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: auto; padding-top: 10px; border-top: 1px solid #eef2f8; font-size: 12.5px; color: var(--bd-muted); }
.bld-card__meta i { margin-right: 4px; color: #94a3b8; }

/* ── ≥576px ───────────────────────────────────────────────── */
@media (min-width: 576px) {
    .bld-article__inner { padding: 28px 28px 8px; }
    .bld-article__foot { margin: 12px 28px 0; }
    .bld-byline { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px 24px; }
    .bld-facts { justify-content: flex-end; }
    .bld-author { flex-direction: row; align-items: flex-start; gap: 18px; }
    .bld-pn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bld-login { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .bld-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bld-thread--nested { margin-left: 26px; padding-left: 18px; }
}

/* ── ≥768px ───────────────────────────────────────────────── */
@media (min-width: 768px) {
    .bld-hero { padding: 32px 0 84px; }
    .bld-article__inner { padding: 36px 40px 8px; }
    .bld-article__foot { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 24px; margin: 16px 40px 0; padding: 24px 0 28px; }
    .bld-share { text-align: right; }
    .bld-share__btns { justify-content: flex-end; }
    .bld-content { font-size: 17px; }
    .bld-content h2 { font-size: 1.6rem; }
    .bld-content h3 { font-size: 1.25rem; }
    .bld-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bld-widget { padding: 24px; }
}

/* ── ≥992px — two columns, sticky table of contents ───────── */
@media (min-width: 992px) {
    .bld-hero { padding: 40px 0 96px; }
    .bld-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
    .bld-side { grid-template-columns: minmax(0, 1fr); align-content: stretch; }
    .bld-side__sticky { position: sticky; top: var(--bd-sticky-top); align-self: start; display: grid; gap: 20px; }
    .bld-toc { display: block; }
    .bld-toc .bld-toc__list { max-height: calc(100vh - var(--bd-sticky-top) - 140px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
    .bld-toc-mobile { display: none; }
    .bld-related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── ≥1200px ──────────────────────────────────────────────── */
@media (min-width: 1200px) {
    .bld-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
    .bld-article__inner { padding: 44px 56px 8px; }
    .bld-article__foot { margin: 16px 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .bld *, .bld *::before, .bld *::after { transition: none !important; }
    .bld-card:hover, .bld-pn__link:hover, .bld-share__btn:hover { transform: none; }
    .bld-card:hover .bld-card__media img { transform: none; }
}

@media print {
    .bld-readbar, .bld-side, .bld-hero::before, .bld-article__foot, .bld-pn, .bld-comments, .bld-related { display: none !important; }
    .bld-hero { padding: 0; background: none; color: #000; }
    .bld-hero__title, .bld-hero__lead { color: #000; }
    .bld-body { margin: 0; }
    .bld-layout { display: block; }
    .bld-article { border: 0; box-shadow: none; }
}
