/* Blog + knowledge base (public site). Uses the design tokens from platform-ui.css. */

.bl-hero { padding: clamp(2.5rem, 7vw, 4.5rem) 0 1.6rem; text-align: center; }
.bl-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: .9rem 0 .6rem; }
.bl-hero p { color: var(--ink-2); max-width: 38rem; margin: 0 auto; }

.bl-search { position: relative; max-width: 34rem; margin: 1.6rem auto 0; }
.bl-search input {
    width: 100%; padding: .95rem 3.2rem .95rem 1.2rem; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink);
    font: inherit; font-size: 1rem; outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
[dir="rtl"] .bl-search input { padding: .95rem 1.2rem .95rem 3.2rem; }
.bl-search input:focus { border-color: var(--volt); box-shadow: 0 0 0 4px var(--accent-soft); }
.bl-search button {
    position: absolute; inset-inline-end: .4rem; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
    border: 0; background: var(--volt); color: var(--accent-ink); cursor: pointer;
}
.bl-suggest {
    position: absolute; inset-inline: 0; top: calc(100% + .5rem); z-index: 30; text-align: start;
    background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow);
    padding: .4rem; display: none; max-height: 24rem; overflow: auto;
}
.bl-suggest.is-open { display: block; }
.bl-suggest a { display: block; padding: .7rem .8rem; border-radius: 12px; color: var(--ink-2); }
.bl-suggest a:hover, .bl-suggest a:focus-visible { background: var(--surface-2); color: var(--ink); outline: none; }
.bl-suggest a b { display: block; color: var(--ink); font-weight: 600; }
.bl-suggest a small { color: var(--muted); font-size: .82rem; }
.bl-suggest p { margin: 0; padding: .8rem; color: var(--muted); font-size: .9rem; }

.bl-chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 1.4rem 0 2rem; }
.bl-chip {
    display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .95rem; border-radius: 999px;
    border: 1px solid var(--line-strong); color: var(--ink-2); font-size: .9rem; background: var(--surface);
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.bl-chip:hover { color: var(--ink); border-color: var(--volt); }
.bl-chip.is-active { background: var(--volt); color: var(--accent-ink); border-color: var(--volt); }
.bl-chip small { font-family: var(--font-mono); opacity: .7; font-size: .75rem; }

.bl-featured {
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; overflow: hidden;
    border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); margin-bottom: 2rem;
}
.bl-featured__media { position: relative; aspect-ratio: 1200 / 630; background: var(--signal); }
.bl-featured__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bl-featured__body { padding: clamp(1.4rem, 4vw, 2.4rem); display: flex; flex-direction: column; justify-content: center; gap: .8rem; }
.bl-featured__body h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.3; }
.bl-featured__body p { margin: 0; color: var(--ink-2); line-height: 1.8; }
@media (max-width: 860px) { .bl-featured { grid-template-columns: 1fr; } }

.bl-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.bl-card {
    position: relative; isolation: isolate; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line); transition: border-color .3s ease, transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
/* cursor spotlight */
.bl-card::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .4s ease;
    background: radial-gradient(380px circle at var(--sx, 50%) var(--sy, 0%), rgba(255, 181, 71, .11), transparent 45%);
}
/* gradient hairline that lights up on hover */
.bl-card::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .4s ease;
    background: var(--signal);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.bl-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.bl-card:hover::before, .bl-card:hover::after { opacity: 1; }
.bl-card__media {
    position: relative; display: block; margin: .55rem .55rem 0; aspect-ratio: 16 / 9; overflow: hidden;
    border-radius: calc(var(--radius) - 8px); background: linear-gradient(135deg, var(--brand), var(--bg-3));
}
.bl-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.85); transition: transform 1s var(--ease-out), filter .6s ease; }
.bl-card:hover .bl-card__media img { transform: scale(1.06); filter: saturate(1.1); }
.bl-card__placeholder {
    display: grid; place-items: center; width: 100%; height: 100%; color: var(--brand-300); font-family: var(--font-display); font-size: 3.4rem; font-weight: 800;
    background: var(--lattice), radial-gradient(circle at 30% 20%, var(--brand-400), transparent 60%);
}
.bl-card__no {
    position: absolute; inset-block-end: .6rem; inset-inline-start: .6rem; padding: .2rem .6rem; border-radius: 999px;
    font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em; color: #fff;
    background: rgba(14, 9, 32, .7); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(8px);
}
.bl-card__body { padding: 1.1rem 1.3rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.bl-card__body h3 { margin: 0; font-size: 1.04rem; line-height: 1.6; }
.bl-card__body h3 a { color: var(--ink); transition: color .2s ease; }
.bl-card__body h3 a:hover { color: var(--volt); }
.bl-card__body p { margin: 0; color: var(--ink-2); font-size: .93rem; line-height: 1.8; flex: 1; }
.bl-card__foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .3rem; padding-top: .9rem; border-top: 1px dashed var(--line-strong); }
.bl-card__go {
    flex: 0 0 auto; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%;
    border: 1px solid var(--line-strong); color: var(--ink-2); transition: background .3s ease, color .3s ease, border-color .3s ease, transform .5s var(--ease-spring);
}
[dir="rtl"] .bl-card__go svg { transform: scaleX(-1); }
.bl-card:hover .bl-card__go { background: var(--volt); border-color: var(--volt); color: var(--accent-ink); transform: rotate(-8deg) scale(1.08); }
[dir="rtl"] .bl-card:hover .bl-card__go { transform: rotate(8deg) scale(1.08); }

.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; color: var(--muted); font-size: .84rem; }
.bl-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.bl-cat { display: inline-block; align-self: flex-start; padding: .2rem .65rem; border-radius: 999px; background: var(--accent-soft); color: var(--volt); font-size: .78rem; font-weight: 600; }

.bl-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 2.4rem 0 4rem; }
.bl-pager a, .bl-pager span {
    min-width: 2.5rem; height: 2.5rem; padding: 0 .8rem; display: inline-grid; place-items: center; border-radius: 12px;
    border: 1px solid var(--line); color: var(--ink-2); font-family: var(--font-mono); font-size: .9rem;
}
.bl-pager a:hover { border-color: var(--volt); color: var(--ink); }
.bl-pager .is-current { background: var(--volt); color: var(--accent-ink); border-color: var(--volt); }
.bl-pager .is-disabled { opacity: .4; }

.bl-empty { text-align: center; padding: 3rem 1rem 5rem; color: var(--muted); }

/* ---- article ---- */
.bl-article { padding: clamp(2rem, 6vw, 3.5rem) 0 2rem; }
.bl-article__head { max-width: 820px; margin: 0 auto 1.8rem; text-align: center; }
.bl-article__head h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin: .8rem 0 1rem; line-height: 1.3; }
.bl-article__head .bl-meta { justify-content: center; }
.bl-article__cover { max-width: 1040px; margin: 0 auto 2rem; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1200 / 630; background: var(--surface); }
.bl-article__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bl-article__layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 2rem; align-items: start; max-width: 1100px; margin: 0 auto; }
.bl-article__layout:not(:has(.bl-toc)) { grid-template-columns: minmax(0, 820px); justify-content: center; }
@media (max-width: 960px) { .bl-article__layout { grid-template-columns: 1fr; } .bl-toc { position: static !important; order: -1; } }

.bl-prose { padding: clamp(1.4rem, 4vw, 2.4rem); font-size: 1.05rem; line-height: 1.95; color: var(--ink-2); overflow-wrap: anywhere; }
.bl-prose > :first-child { margin-top: 0; }
.bl-prose h2 { font-size: 1.45rem; margin: 2.2rem 0 .7rem; color: var(--ink); scroll-margin-top: 6rem; }
.bl-prose h3 { font-size: 1.17rem; margin: 1.6rem 0 .5rem; color: var(--ink); scroll-margin-top: 6rem; }
.bl-prose a { color: var(--volt); text-decoration: underline; text-underline-offset: 3px; }
.bl-prose ul, .bl-prose ol { padding-inline-start: 1.4rem; }
.bl-prose li { margin: .3rem 0; }
.bl-prose img { max-width: 100%; height: auto; border-radius: 14px; }
.bl-prose blockquote { margin: 1.2rem 0; padding: .8rem 1.1rem; border-inline-start: 3px solid var(--volt); background: var(--surface); border-radius: 10px; }
.bl-prose pre { direction: ltr; text-align: left; overflow: auto; padding: 1rem; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); font-family: var(--font-mono); font-size: .88rem; line-height: 1.6; }
.bl-prose code { font-family: var(--font-mono); font-size: .9em; }
.bl-prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.bl-prose th, .bl-prose td { border: 1px solid var(--line-strong); padding: .55rem .7rem; text-align: start; }
.bl-prose hr { border: 0; border-top: 1px solid var(--line-strong); margin: 2rem 0; }

.bl-toc { position: sticky; top: 6rem; padding: 1.1rem; display: grid; gap: .15rem; font-size: .92rem; }
.bl-toc b { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .4rem; }
.bl-toc a { padding: .4rem .6rem; border-radius: 10px; color: var(--ink-2); line-height: 1.5; }
.bl-toc a:hover, .bl-toc a.is-active { background: var(--surface-2); color: var(--ink); }
.bl-toc a.lvl-3 { padding-inline-start: 1.4rem; font-size: .86rem; color: var(--muted); }

.bl-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.4rem; }
.bl-share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.bl-share b { color: var(--muted); font-size: .88rem; font-weight: 500; margin-inline-end: .3rem; }
.bl-share a, .bl-share button {
    display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); transition: color .2s ease, border-color .2s ease;
}
.bl-share a:hover, .bl-share button:hover { color: var(--volt); border-color: var(--volt); }
.bl-share button.is-done { color: var(--ok); border-color: var(--ok); }

.bl-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 1100px; margin: 2rem auto 0; }
.bl-nav a { padding: 1rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; gap: .25rem; }
.bl-nav a:hover { border-color: var(--line-strong); }
.bl-nav a small { color: var(--muted); font-size: .8rem; }
.bl-nav a.is-next { text-align: end; }
@media (max-width: 640px) { .bl-nav { grid-template-columns: 1fr; } }

.bl-section-title { font-size: 1.4rem; margin: 3rem 0 1.2rem; }
.bl-related { max-width: 1100px; margin: 0 auto 4rem; }

/* ---- knowledge base ---- */
.kbx-cats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 2.6rem; }
.kbx-cat {
    display: flex; gap: .9rem; padding: 1.3rem; border-radius: var(--radius); background: var(--surface);
    border: 1px solid var(--line); color: var(--ink); transition: border-color .3s ease, transform .5s var(--ease-out);
}
.kbx-cat:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.kbx-icon { flex: 0 0 auto; display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--cyan); }
.kbx-cat h2, .kbx-cat h3 { margin: 0 0 .25rem; font-size: 1.08rem; font-family: var(--font-display); font-weight: 600; }
.kbx-cat p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.kbx-cat small { display: inline-block; margin-top: .45rem; font-family: var(--font-mono); color: var(--muted); font-size: .78rem; }

.kbx-list { list-style: none; margin: 0; padding: 0; }
.kbx-list li a {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .85rem .5rem; border-top: 1px solid var(--line); color: var(--ink-2);
    transition: color .2s ease, padding .35s var(--ease-out);
}
.kbx-list li:first-child a { border-top: 0; }
.kbx-list li a:hover { color: var(--ink); padding-inline-start: .9rem; }
.kbx-list li a span small { display: block; color: var(--muted); font-size: .82rem; margin-top: .15rem; }
.kbx-list svg { flex: 0 0 auto; color: var(--faint); }
[dir="rtl"] .kbx-list svg { transform: scaleX(-1); }

.kbx-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; margin-bottom: 4rem; }
@media (max-width: 860px) { .kbx-columns { grid-template-columns: 1fr; } }
.kbx-box { padding: 1.3rem 1.4rem; }
.kbx-box h2 { margin: 0 0 .6rem; font-size: 1.1rem; }

.kbx-vote { margin-top: 1.6rem; padding: 1.2rem 1.4rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.kbx-vote p { margin: 0; color: var(--ink); font-weight: 600; }
.kbx-vote form { display: flex; gap: .5rem; margin: 0; }
.kbx-vote button {
    display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.1rem; border-radius: 999px; cursor: pointer; font: inherit;
    border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); transition: border-color .2s ease, color .2s ease;
}
.kbx-vote button:hover { border-color: var(--volt); color: var(--ink); }
.kbx-vote .kbx-thanks { color: var(--ok); font-weight: 500; }

.bl-progress { position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 60; background: var(--signal); transform: scaleX(0); }
[dir="rtl"] .bl-progress { transform-origin: right; }
[dir="ltr"] .bl-progress { transform-origin: left; }
@supports (animation-timeline: scroll()) {
    .bl-progress { animation: blProgress linear both; animation-timeline: scroll(root); }
    @keyframes blProgress { to { transform: scaleX(1); } }
}

html[data-theme="light"] .bl-prose pre { background: #f6f4fb; }
html[data-theme="light"] .bl-suggest { background: #fff; }
html[data-theme="light"] .bl-prose a, html[data-theme="light"] .bl-cat { color: #b86a00; }

/* ---------- Reader rating (stars) ---------- */
.bl-rate { margin-top: 1.4rem; padding: 1.1rem 1.3rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; }
.bl-rate__head { display: grid; gap: .2rem; }
.bl-rate__head small { color: var(--muted); font-size: .85rem; }
.bl-rate__thanks { margin: 0; color: var(--signal, #22c55e); font-weight: 600; }
/* buttons are rendered 5 → 1 and displayed reversed, so "hover a star + every star before it" works with ~ */
.bl-stars { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.bl-stars button { background: none; border: 0; padding: .15rem; cursor: pointer; color: var(--line-strong, rgba(255,255,255,.25)); transition: transform .15s ease, color .15s ease; }
.bl-stars button svg { fill: currentColor; display: block; }
.bl-stars button:hover, .bl-stars button:hover ~ button, .bl-stars button:focus-visible, .bl-stars button:focus-visible ~ button { color: #ffb547; }
.bl-stars button:hover { transform: scale(1.12); }

/* ---------- Comments ---------- */
.bl-comments { margin-top: 2.4rem; display: grid; gap: .9rem; }
.bl-comments .bl-section-title small { color: var(--muted); font-size: .9rem; font-weight: 400; margin-inline-start: .4rem; }
.bl-comments__notice { margin: 0; padding: .9rem 1.1rem; border-color: rgba(34, 197, 94, .4); }
.bl-comments__empty { margin: 0; color: var(--muted); }
.bl-comment { display: grid; grid-template-columns: auto 1fr; gap: .9rem; padding: 1rem 1.2rem; }
.bl-comment__avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, var(--signal, #7c5cff), #ffb547); color: #fff; }
.bl-comment header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.bl-comment time { color: var(--muted); font-size: .8rem; }
.bl-comment p { margin: .35rem 0 0; line-height: 1.8; }
.bl-comment__reply { margin-top: .8rem; padding: .7rem .9rem; border-inline-start: 3px solid #ffb547; background: rgba(255, 181, 71, .06); border-radius: 10px; }
.bl-comment__reply b { font-size: .85rem; }
.bl-comment-form { display: grid; gap: .9rem; padding: 1.3rem; }
.bl-comment-form h3 { margin: 0; }
.bl-comment-form__row { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.bl-comment-form label { display: grid; gap: .35rem; }
.bl-comment-form label > span { font-size: .88rem; color: var(--muted); }
.bl-comment-form input, .bl-comment-form textarea { width: 100%; padding: .7rem .9rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: inherit; font: inherit; }
.bl-comment-form input:focus, .bl-comment-form textarea:focus { outline: none; border-color: #ffb547; }
.bl-comment-form label > small { color: var(--muted); font-size: .78rem; }
.bl-comment-form .bl-error { color: #f87171; }
.bl-comment-form .btn { justify-self: start; }
.bl-hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- In-article figures ---------- */
.bl-prose figure { margin: 1.8rem 0; }
.bl-prose figure img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); }
.bl-prose figcaption { margin-top: .55rem; font-size: .86rem; color: var(--muted); text-align: center; line-height: 1.6; }

/* ---------- Code blocks (language label + copy button) ---------- */
.bl-code { position: relative; margin: 1.2rem 0; }
.bl-code pre { margin: 0; padding-top: 2.4rem; }
.bl-code__bar { position: absolute; inset-inline: 0; top: 0; display: flex; align-items: center; justify-content: space-between; padding: .45rem .8rem; direction: ltr; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.bl-code__copy { background: none; border: 1px solid var(--line); border-radius: 8px; color: inherit; font: inherit; text-transform: none; padding: .15rem .55rem; cursor: pointer; }
.bl-code__copy:hover { color: var(--ink); border-color: var(--line-strong); }
.bl-code__copy.is-done { color: #22c55e; border-color: rgba(34, 197, 94, .5); }
.bl-prose :not(pre) > code { padding: .1rem .35rem; border-radius: 6px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); direction: ltr; unicode-bidi: isolate; }
html[data-theme="light"] .bl-prose :not(pre) > code { background: #f1eef8; }

/* =====================================================================
   Blog index — editorial "magazine" layout (bx-*)
   ===================================================================== */

/* ---- masthead ---- */
.bx-mast { position: relative; isolation: isolate; padding-top: clamp(2.4rem, 7vw, 4.8rem); overflow-x: clip; }
.bx-mast__aura { position: absolute; z-index: -1; inset: -2rem -10vw auto; height: 34rem; pointer-events: none; overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); mask-image: linear-gradient(to bottom, #000 40%, transparent); }
.bx-mast__aura::before { content: ""; position: absolute; inset: 0; background: var(--lattice); opacity: .55; }
.bx-mast__aura i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: bxFloat 18s ease-in-out infinite alternate; }
.bx-mast__aura i:nth-child(1) { width: 28rem; height: 28rem; inset-inline-start: 4%; top: -6rem; background: rgba(157, 134, 255, .45); }
.bx-mast__aura i:nth-child(2) { width: 22rem; height: 22rem; inset-inline-end: 8%; top: 2rem; background: rgba(255, 181, 71, .32); animation-duration: 22s; }
.bx-mast__aura i:nth-child(3) { width: 18rem; height: 18rem; inset-inline-start: 40%; top: 12rem; background: rgba(255, 122, 107, .22); animation-duration: 26s; }
@keyframes bxFloat { to { transform: translate3d(3rem, 2rem, 0) scale(1.12); } }
.bx-dateline {
    display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line-strong);
    font-family: var(--font-mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
[dir="rtl"] .bx-dateline { font-family: var(--font-body); letter-spacing: 0; font-size: .86rem; }
.bx-dateline__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 0 4px var(--accent-soft); animation: bxPulse 2.4s ease-in-out infinite; }
.bx-dateline__sep { width: 1.4rem; height: 1px; background: var(--line-strong); }
@keyframes bxPulse { 50% { box-shadow: 0 0 0 9px transparent; } }

.bx-mast__row { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(1.4rem, 4vw, 4rem); align-items: end; padding: clamp(1.4rem, 3vw, 2.2rem) 0; }
.bx-mast__title { margin: 0; font-family: var(--font-display); font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.25; letter-spacing: -.02em; color: var(--ink); }
[dir="rtl"] .bx-mast__title { letter-spacing: 0; line-height: 1.45; }
.bx-mast__title::after { content: ""; display: block; width: 4rem; height: 4px; margin-top: .9rem; border-radius: 99px; background: var(--signal); }
.bx-mast__aside p { margin: 0 0 1.2rem; color: var(--ink-2); line-height: 1.9; font-size: 1.02rem; }

.bx-search {
    display: flex; align-items: center; gap: .65rem; padding: .35rem; padding-inline-start: 1rem; border-radius: 16px;
    background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--muted); transition: border-color .2s ease, box-shadow .2s ease;
}
.bx-search:focus-within { border-color: var(--volt); box-shadow: 0 0 0 4px var(--accent-soft); color: var(--volt); }
.bx-search input { flex: 1; min-width: 0; padding: .6rem 0; border: 0; outline: none; background: none; color: var(--ink); font: inherit; font-size: 1rem; }
.bx-search kbd {
    font-family: var(--font-mono); font-size: .74rem; padding: .1rem .5rem; border-radius: 6px; color: var(--muted);
    border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--surface);
}
.bx-search:focus-within kbd { display: none; }
.bx-search button { border: 0; border-radius: 12px; padding: .65rem 1.15rem; cursor: pointer; font: inherit; font-weight: 600; background: var(--volt); color: var(--accent-ink); transition: filter .2s ease; }
.bx-search button:hover { filter: brightness(1.08); }
@media (pointer: coarse) { .bx-search kbd { display: none; } }
@media (max-width: 860px) { .bx-mast__row { grid-template-columns: 1fr; align-items: start; } }

/* ---- category rail ---- */
.bx-rail { display: flex; flex-wrap: wrap; gap: .5rem; padding: .9rem 0; border-block: 1px solid var(--line-strong); }
.bx-rail::-webkit-scrollbar { display: none; }
.bx-rail a {
    position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-radius: 99px;
    color: var(--ink-2); font-size: .93rem; white-space: nowrap; scroll-snap-align: start; border: 1px solid var(--line); background: var(--surface);
    transition: color .2s ease, background .3s ease, border-color .2s ease;
}
.bx-rail a i { font-style: normal; font-family: var(--font-mono); font-size: .7rem; color: var(--muted); transition: color .2s ease; }
.bx-rail a small { font-family: var(--font-mono); font-size: .7rem; padding: .05rem .45rem; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.bx-rail a::after {
    content: ""; position: absolute; inset-inline: 1rem; bottom: -1px; height: 2px; background: var(--signal);
    transform: scaleX(0); transition: transform .5s var(--ease-out);
}
.bx-rail a:hover { color: var(--ink); border-color: var(--line-strong); }
.bx-rail a:hover::after, .bx-rail a.is-active::after { transform: scaleX(1); }
.bx-rail a.is-active { color: var(--ink); border-color: rgba(255, 181, 71, .45); background: var(--accent-soft); }
@media (max-width: 720px) {
    .bx-rail { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding-inline: .1rem; }
    .bx-rail::-webkit-scrollbar { display: none; }
}
.bx-rail a.is-active i { color: var(--volt); }

/* ---- labels ---- */
.bx-label {
    display: flex; align-items: center; gap: .65rem; margin: 0 0 1rem; font-family: var(--font-mono); font-weight: 500;
    font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
[dir="rtl"] .bx-label { font-family: var(--font-body); letter-spacing: 0; font-size: .92rem; font-weight: 600; }
.bx-label::before { content: ""; width: 8px; height: 8px; background: var(--volt); transform: rotate(45deg); flex: 0 0 auto; }
.bx-label--rule { margin: 0 0 1.4rem; }
.bx-label--rule::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }

.bx-results { margin: 1.8rem 0 1.4rem; color: var(--muted); }
.bx-results a { color: var(--volt); }

/* ---- lead: cover story + numbered headlines ---- */
.bx-lead { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 1.4rem; margin: 2.2rem 0 3.2rem; }
.bx-cover {
    --ink: #f3efff; --ink-2: #d7cff2; --muted: #b9afd9;
    position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(380px, 38vw, 480px);
    border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong); background: linear-gradient(135deg, var(--brand), #0e0920);
    color: var(--ink);
}
.bx-cover__media { position: absolute; inset: 0; z-index: -2; }
.bx-cover__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.4s var(--ease-out); }
.bx-cover:hover .bx-cover__media img { transform: scale(1.04); }
.bx-cover::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(to top, rgba(14, 9, 32, .97) 10%, rgba(14, 9, 32, .6) 48%, rgba(14, 9, 32, .05) 85%);
}
.bx-cover::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s ease;
    background: radial-gradient(520px circle at var(--sx, 50%) var(--sy, 50%), rgba(255, 181, 71, .14), transparent 45%);
}
.bx-cover:hover::after { opacity: 1; }
.bx-cover__body { position: relative; z-index: 1; display: grid; gap: .9rem; width: 100%; padding: clamp(1.4rem, 3.5vw, 2.6rem); }
.bx-cover__badge {
    justify-self: start; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .85rem; border-radius: 99px;
    font-size: .8rem; font-weight: 600; color: #ffd08a; background: rgba(255, 181, 71, .14); border: 1px solid rgba(255, 181, 71, .4); backdrop-filter: blur(6px);
}
.bx-cover h2 { margin: 0; max-width: 40rem; font-size: clamp(1.25rem, 2.2vw, 1.7rem); line-height: 1.5; }
.bx-cover h2 a {
    color: inherit; background: linear-gradient(var(--volt), var(--volt)) no-repeat 0 100% / 0 2px; transition: background-size .6s var(--ease-out);
}
[dir="rtl"] .bx-cover h2 a { background-position: 100% 100%; }
.bx-cover h2 a:hover { background-size: 100% 2px; }
.bx-cover p { margin: 0; max-width: 38rem; color: var(--ink-2); line-height: 1.85; }
.bx-cover__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .14); }

.bx-headlines { display: flex; flex-direction: column; padding: 1.4rem 1.4rem .6rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.bx-headlines ol { list-style: none; margin: 0; padding: 0; display: grid; align-content: space-between; flex: 1; }
.bx-headlines li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; padding: 1.15rem 0; border-top: 1px solid var(--line); }
.bx-headlines li:first-child { border-top: 0; padding-top: .3rem; }
.bx-headlines__no {
    font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: .9; min-width: 2.2ch;
    color: transparent; -webkit-text-stroke: 1px var(--line-strong); transition: color .35s ease, -webkit-text-stroke-color .35s ease;
}
.bx-headlines li:hover .bx-headlines__no { color: var(--volt); -webkit-text-stroke-color: var(--volt); }
/* the decorative number is drawn from data-no, so it is not read as low-contrast page text */
.bx-headlines__no::before { content: attr(data-no); }
.bx-headlines__cat { font-size: .76rem; font-weight: 600; color: var(--volt); }
.bx-headlines h3 { margin: .25rem 0 .5rem; font-size: .96rem; line-height: 1.65; }
.bx-headlines h3 a { color: var(--ink); }
.bx-headlines h3 a:hover { color: var(--volt); }
@media (max-width: 1000px) { .bx-lead { grid-template-columns: 1fr; } }

/* ---- asymmetric card grid ---- */
.bx-grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1rem; }
.bx-grid > .bl-card { animation: fadeUp .9s var(--ease-out) both; }
.bx-grid > .bl-card:nth-child(2) { animation-delay: .06s; }
.bx-grid > .bl-card:nth-child(3) { animation-delay: .12s; }
.bx-grid > .bl-card:nth-child(4) { animation-delay: .18s; }
.bx-grid > .bl-card:nth-child(n+5) { animation-delay: .24s; }
.bl-card--wide { grid-column: span 2; flex-direction: row; }
.bl-card--wide .bl-card__media { flex: 1.15 1 0; aspect-ratio: auto; min-height: 100%; margin: .55rem; margin-inline-end: 0; }
.bl-card--wide .bl-card__body { flex: 1 1 0; padding: 1.6rem 1.6rem 1.4rem; justify-content: center; }
.bl-card--wide .bl-card__body h3 { font-size: clamp(1.1rem, 1.6vw, 1.3rem); }
@media (max-width: 1000px) { .bx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
    .bx-grid { grid-template-columns: 1fr; }
    .bl-card--wide { grid-column: auto; flex-direction: column; }
    .bl-card--wide .bl-card__media { aspect-ratio: 16 / 9; margin: .55rem .55rem 0; }
    .bl-card--wide .bl-card__body { padding: 1.1rem 1.3rem 1.2rem; }
}

.bx-empty { text-align: center; padding: 4rem 1rem 5rem; color: var(--muted); }
.bx-empty span { display: block; margin-bottom: 1rem; font-family: var(--font-display); font-size: 5rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--line-strong); }

/* ---- trending tags ribbon (marquee) ---- */
.bx-ribbon { margin: 1rem 0 4.5rem; }
.bx-ribbon__track {
    display: flex; overflow: hidden; padding: 1.1rem 0; border-block: 1px solid var(--line-strong); background: var(--surface);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.bx-ribbon__list { flex: 0 0 auto; display: flex; gap: .7rem; margin: 0; padding: 0; padding-inline-end: .7rem; list-style: none; animation: bxMarquee 45s linear infinite; }
[dir="rtl"] .bx-ribbon__list { animation-name: bxMarqueeRtl; }
.bx-ribbon__track:hover .bx-ribbon__list, .bx-ribbon__track:focus-within .bx-ribbon__list { animation-play-state: paused; }
@keyframes bxMarquee { to { transform: translateX(-100%); } }
@keyframes bxMarqueeRtl { to { transform: translateX(100%); } }
.bx-ribbon__list a {
    display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1.05rem; border-radius: 99px; white-space: nowrap;
    border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--ink-2); font-size: .95rem; transition: border-color .2s ease, color .2s ease, transform .3s var(--ease-spring);
}
.bx-ribbon__list a:hover { border-color: var(--volt); color: var(--ink); transform: translateY(-2px); }
.bx-ribbon__list a.is-active { background: var(--volt); border-color: var(--volt); color: var(--accent-ink); }
.bx-ribbon__list a small { font-family: var(--font-mono); font-size: .72rem; opacity: .65; }
@media (prefers-reduced-motion: reduce) {
    .bx-ribbon__track { flex-wrap: wrap; justify-content: center; -webkit-mask-image: none; mask-image: none; }
    .bx-ribbon__list { animation: none; flex-wrap: wrap; justify-content: center; }
    .bx-ribbon__list[aria-hidden="true"] { display: none; }
    .bx-dateline__dot, .bx-grid > .bl-card { animation: none; }
}

/* ---- light mode tweaks ---- */
html[data-theme="light"] :is(.bx-headlines__cat, .bx-results a, .bx-rail a.is-active i) { color: #b86a00; }
html[data-theme="light"] .bx-headlines li:hover .bx-headlines__no { color: #e39a2b; -webkit-text-stroke-color: #e39a2b; }
html[data-theme="light"] .bx-ribbon__list a { background: #fff; }

/* =====================================================================
   Article page — editorial reading layout (ba-*)
   ===================================================================== */
.ba { padding: clamp(2rem, 6vw, 3.6rem) 0 2rem; }

/* ---- header ---- */
.ba-head { max-width: 980px; margin: 0 auto 2.2rem; }
.ba-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1.3rem; font-size: .88rem; color: var(--muted); }
.ba-crumbs a { color: var(--muted); transition: color .2s ease; }
.ba-crumbs a:hover { color: var(--volt); }
.ba-crumbs a:last-child { padding: .2rem .7rem; border-radius: 99px; background: var(--accent-soft); color: var(--volt); font-weight: 600; }
.ba-title { margin: 0 0 1.1rem; font-family: var(--font-display); font-size: clamp(1.55rem, 2.8vw, 2.2rem); line-height: 1.5; color: var(--ink); text-wrap: balance; }
[dir="ltr"] .ba-title { letter-spacing: -.01em; line-height: 1.25; }
.ba-lede {
    max-width: 50rem; margin: 0 0 1.8rem; padding-inline-start: 1.1rem; border-inline-start: 3px solid var(--volt);
    font-size: clamp(1rem, 1.4vw, 1.1rem); line-height: 1.9; color: var(--ink-2);
}
.ba-byline { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.2rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.ba-byline__who b { display: block; color: var(--ink); }
.ba-byline__who small { color: var(--muted); font-size: .85rem; }
.ba-facts { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; margin-inline-start: auto; padding: 0; list-style: none; }
.ba-facts li {
    display: inline-flex; align-items: center; gap: .4rem; padding: .38rem .8rem; border-radius: 99px;
    border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-size: .84rem;
}
.ba-facts svg { color: var(--volt); }
.ba-avatar {
    flex: 0 0 auto; display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%;
    font-family: var(--font-display); font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--violet), var(--volt));
    box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--line-strong);
}
.ba-avatar--lg { width: 4rem; height: 4rem; font-size: 1.4rem; }

.ba-cover { max-width: 980px; margin: 0 auto 2.6rem; aspect-ratio: 1200 / 630; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line-strong); box-shadow: var(--shadow); background: var(--surface); }
.ba-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---- 3-column reading layout: share rail · article · contents ---- */
.ba-layout { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: clamp(1.4rem, 3vw, 2.6rem); align-items: start; max-width: 1180px; margin: 0 auto; }
.ba-layout.has-toc { grid-template-columns: 3rem minmax(0, 1fr) 270px; }
.ba-rail { position: sticky; top: 7rem; }
.ba-side { position: sticky; top: 6.5rem; max-height: calc(100vh - 8rem); overflow: auto; scrollbar-width: thin; }
.ba-main { min-width: 0; }
@media (max-width: 1100px) {
    .ba-layout, .ba-layout.has-toc { grid-template-columns: minmax(0, 1fr); }
    .ba-rail { display: none; }
    .ba-side { position: static; max-height: none; order: -1; }
}

/* ---- prose ---- */
.ba-prose { padding: 0; font-size: 1.05rem; line-height: 2; color: var(--ink-2); }
[dir="ltr"] .ba-prose { line-height: 1.85; }
.ba-prose ::selection { background: rgba(255, 181, 71, .32); color: var(--ink); }
.ba-prose strong { color: var(--ink); }
.ba-prose h2 { position: relative; margin: 3rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: clamp(1.2rem, 1.9vw, 1.4rem); line-height: 1.6; }
.ba-prose h2::before { content: ""; position: absolute; top: -1px; inset-inline-start: 0; width: 3.5rem; height: 2px; background: var(--signal); }
.ba-prose > h2:first-child { margin-top: 0; }
.ba-prose h3 { margin: 1.8rem 0 .5rem; font-size: 1.08rem; }
.ba-prose a { color: var(--volt); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-thickness .2s ease; }
.ba-prose a:hover { text-decoration-thickness: 2px; }
.ba-prose ul, .ba-prose ol { list-style: none; padding-inline-start: 1.7rem; margin: 1.2rem 0; }
.ba-prose li { position: relative; margin: .55rem 0; }
.ba-prose ul > li::before { content: ""; position: absolute; inset-inline-start: -1.2rem; top: .85em; width: 7px; height: 7px; border-radius: 1px; background: var(--volt); transform: rotate(45deg); }
.ba-prose ol { counter-reset: ba-ol; padding-inline-start: 2.5rem; }
.ba-prose ol > li { counter-increment: ba-ol; }
.ba-prose ol > li::before {
    content: counter(ba-ol); position: absolute; inset-inline-start: -2.4rem; top: .32em; display: grid; place-items: center; width: 1.65rem; height: 1.65rem;
    border-radius: 50%; font: 600 .78rem/1 var(--font-mono); color: var(--volt); background: var(--accent-soft); border: 1px solid rgba(255, 181, 71, .35);
}
.ba-prose blockquote {
    position: relative; margin: 2.2rem 0; padding: 1.4rem 1.6rem; padding-inline-start: 3.8rem; border: 0; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-soft), transparent 70%); color: var(--ink); font-size: 1.18rem; line-height: 1.9;
}
.ba-prose blockquote::before { content: "\201D"; position: absolute; inset-inline-start: 1rem; top: .5rem; font: 800 4rem/1 var(--font-display); color: var(--volt); opacity: .85; }
[dir="ltr"] .ba-prose blockquote::before { content: "\201C"; }
.ba-prose blockquote p { margin: 0; }
.ba-prose figure { margin: 2.2rem 0; }
.ba-prose figure img, .ba-prose img { border-radius: var(--radius-sm); }
.ba-prose table { display: block; overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); border-collapse: separate; border-spacing: 0; }
.ba-prose th, .ba-prose td { border: 0; border-bottom: 1px solid var(--line); }
.ba-prose th { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.ba-prose tr:last-child td { border-bottom: 0; }
[dir="ltr"] .ba-prose > p:first-of-type::first-letter { float: left; margin: .1em .12em 0 0; font: 800 3.4em/.85 var(--font-display); color: var(--volt); }

.ba-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.2rem; }
.ba-tags a { padding: .4rem .9rem; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--ink-2); font-size: .9rem; transition: border-color .2s ease, color .2s ease; }
.ba-tags a:hover { border-color: var(--volt); color: var(--ink); }

/* ---- share: shared button look + variants ---- */
.bl-share [hidden] { display: none !important; }
.bl-share a, .bl-share button { transition: color .2s ease, border-color .2s ease, background .2s ease, transform .3s var(--ease-spring); }
.bl-share a:hover, .bl-share button:hover { transform: translateY(-2px); }
.bl-share a.is-whatsapp:hover { color: #25d366; border-color: #25d366; }
.bl-share a.is-x:hover { color: var(--ink); border-color: var(--ink); }
.bl-share a.is-facebook:hover { color: #1877f2; border-color: #1877f2; }
.bl-share a.is-linkedin:hover { color: #0a66c2; border-color: #0a66c2; }
.bl-share a.is-telegram:hover { color: #29a9eb; border-color: #29a9eb; }
.bl-share--rail, .bl-share--box { margin: 0; padding: 0; border: 0; }
.bl-share--rail { flex-direction: column; flex-wrap: nowrap; gap: .45rem; }
.bl-share--rail a, .bl-share--rail button { border-radius: 50%; }
.bl-share--rail a:hover, .bl-share--rail button:hover { transform: translateX(0) scale(1.08); }
.bl-share__native { background: var(--volt) !important; border-color: var(--volt) !important; color: var(--accent-ink) !important; }

.ba-sharebox {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.4rem; margin-top: 2.4rem; padding: 1.4rem 1.6rem;
    border-radius: var(--radius); border: 1px solid var(--line-strong);
    background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 55%), var(--surface);
}
[dir="rtl"] .ba-sharebox { background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 55%), var(--surface); }
.ba-sharebox b { display: block; font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.ba-sharebox small { color: var(--muted); font-size: .88rem; }

.ba-author {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.1rem; margin-top: 1.2rem; padding: 1.3rem 1.5rem;
    border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
}
.ba-author small { color: var(--muted); font-size: .8rem; }
.ba-author b { display: block; font-size: 1.08rem; color: var(--ink); }
.ba-author p { margin: .3rem 0 0; color: var(--muted); font-size: .92rem; line-height: 1.7; }
@media (max-width: 640px) { .ba-author { grid-template-columns: auto minmax(0, 1fr); } .ba-author .btn { grid-column: 1 / -1; justify-self: start; } }

/* ---- table of contents ---- */
.ba-toc { position: static; padding: 0; padding-inline-start: 1rem; border-inline-start: 1px solid var(--line-strong); gap: .1rem; }
.ba-toc a { display: flex; gap: .6rem; align-items: baseline; margin-inline-start: calc(-1rem - 1px); padding: .45rem .6rem; padding-inline-start: 1rem; border-radius: 0; border-inline-start: 2px solid transparent; transition: color .2s ease, border-color .2s ease; }
.ba-toc a i { flex: 0 0 auto; font-style: normal; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
.ba-toc a.lvl-3 { padding-inline-start: 2.7rem; }
.ba-toc a:hover, .ba-toc a.is-active { background: none; color: var(--ink); }
.ba-toc a.is-active { border-inline-start-color: var(--volt); }
.ba-toc a.is-active i { color: var(--volt); }
@media (max-width: 1100px) { .ba-toc { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); } .ba-toc a { margin-inline-start: 0; border-inline-start: 0; padding-inline-start: .3rem; } .ba-toc a.lvl-3 { padding-inline-start: 1.6rem; } }

/* ---- previous / next ---- */
.ba-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 1180px; margin: 3rem auto 0; }
.ba-nav__item {
    display: flex; align-items: center; gap: 1rem; padding: .7rem; padding-inline-end: 1.2rem; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; line-height: 1.55;
    transition: border-color .3s ease, transform .5s var(--ease-out);
}
.ba-nav__item:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.ba-nav__item img { flex: 0 0 auto; width: 7.5rem; height: 4.2rem; object-fit: cover; border-radius: 10px; }
.ba-nav__item small { display: block; margin-bottom: .2rem; color: var(--muted); font-size: .8rem; font-weight: 400; }
.ba-nav__item.is-next { flex-direction: row-reverse; text-align: end; padding-inline-end: .7rem; padding-inline-start: 1.2rem; }
@media (max-width: 680px) { .ba-nav { grid-template-columns: 1fr; } .ba-nav__item img { width: 5.5rem; height: 3.6rem; } }
.bl-related { max-width: 1180px; margin: 3.5rem auto 4rem; }

/* ---- quote-share popover + toast ---- */
.ba-quote { position: absolute; z-index: 70; display: flex; gap: .2rem; padding: .3rem; border-radius: 12px; background: #1b1238; border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6); }
.ba-quote[hidden] { display: none; }
.ba-quote button { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 9px; background: transparent; color: #f3efff; cursor: pointer; }
.ba-quote button:hover { background: rgba(255, 255, 255, .1); color: #ffb547; }
.ba-toast {
    position: fixed; z-index: 80; bottom: 1.6rem; left: 50%; padding: .7rem 1.3rem; border-radius: 99px; pointer-events: none;
    background: var(--volt); color: var(--accent-ink); font-weight: 600; box-shadow: var(--shadow);
    opacity: 0; transform: translate(-50%, 1rem); transition: opacity .3s ease, transform .4s var(--ease-out);
}
.ba-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.ba-toast:empty { display: none; }

/* ---- light mode ---- */
html[data-theme="light"] :is(.ba-crumbs a:last-child, .ba-prose ol > li::before, .ba-toc a.is-active i) { color: #b86a00; }
html[data-theme="light"] .ba-prose a { color: #b86a00; }
html[data-theme="light"] .ba-facts svg { color: #e39a2b; }

/* =====================================================================
   v6 refinements — readability, balanced grid, new sections, media
   ===================================================================== */

/* quick topic chips under the search box */
.bx-quick { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; margin-top: .9rem; font-size: .85rem; }
.bx-quick span { color: var(--muted); }
.bx-quick a { padding: .2rem .65rem; border-radius: 99px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); transition: color .2s ease, border-color .2s ease; }
.bx-quick a:hover { color: var(--ink); border-color: var(--volt); }

/* the cover story stays readable on any photo */
.bx-cover::before {
    background:
        linear-gradient(to top, rgba(14, 9, 32, .98) 0%, rgba(14, 9, 32, .9) 34%, rgba(14, 9, 32, .55) 62%, rgba(14, 9, 32, .1) 100%),
        linear-gradient(to left, rgba(14, 9, 32, .35), transparent 60%);
}
[dir="ltr"] .bx-cover::before {
    background:
        linear-gradient(to top, rgba(14, 9, 32, .98) 0%, rgba(14, 9, 32, .9) 34%, rgba(14, 9, 32, .55) 62%, rgba(14, 9, 32, .1) 100%),
        linear-gradient(to right, rgba(14, 9, 32, .35), transparent 60%);
}
.bx-cover h2 { text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }

/* card number: display face reads cleaner than the mono zero */
.bl-card__no { font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; }

/* wide cards: balanced image/text split and a sensible height */
.bl-card--wide .bl-card__media { flex: 1 1 0; min-height: 300px; max-height: 380px; }
.bl-card--wide .bl-card__body { flex: 1 1 0; }

/* most read */
.bx-popular { margin: 3.4rem 0 0; }
.bx-popular ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.bx-popular a {
    position: relative; display: flex; gap: .9rem; height: 100%; padding: 1.2rem 1.1rem; overflow: hidden;
    border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
    transition: border-color .3s ease, transform .5s var(--ease-out);
}
.bx-popular a:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.bx-popular__no {
    flex: 0 0 auto; font-family: var(--font-display); font-weight: 800; font-size: 2.3rem; line-height: .85;
    background: var(--signal); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bx-popular__body { display: grid; gap: .3rem; align-content: start; }
.bx-popular__body small { color: var(--volt); font-size: .75rem; font-weight: 600; }
.bx-popular__body b { font-size: .93rem; line-height: 1.6; }
.bx-popular__body em { font-style: normal; color: var(--muted); font-size: .8rem; }
@media (max-width: 1000px) { .bx-popular ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .bx-popular ol { grid-template-columns: 1fr; } }

/* call to action */
.bx-cta {
    --ink: #f3efff; --ink-2: #d7cff2;
    position: relative; isolation: isolate; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.4rem 2rem;
    margin: 3.4rem 0 1rem; padding: clamp(1.6rem, 4vw, 2.6rem); border-radius: var(--radius);
    background: linear-gradient(120deg, #2a1b5e, #3c2a7d 45%, #1b1238); border: 1px solid rgba(255, 255, 255, .12); color: var(--ink);
}
.bx-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--lattice); opacity: .6; }
.bx-cta::after { content: ""; position: absolute; z-index: -1; width: 26rem; height: 26rem; inset-inline-end: -6rem; top: -10rem; border-radius: 50%; background: rgba(255, 181, 71, .28); filter: blur(60px); }
.bx-cta h2 { margin: 0 0 .5rem; font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--ink); }
.bx-cta p { margin: 0; max-width: 40rem; color: var(--ink-2); line-height: 1.8; }
.bx-cta__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.bx-cta .btn-ghost-light { color: #f3efff; border-color: rgba(255, 255, 255, .3); display: inline-flex; align-items: center; gap: .4rem; }

/* ---- article media from the editor blocks ---- */
.bl-prose .bl-figure, .bl-prose .bl-gallery { margin: 2.2rem 0; }
.bl-prose .bl-figure img { display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: initial; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.bl-prose .bl-figure--narrow { max-width: 62%; margin-inline: auto; }
@media (min-width: 1101px) { .bl-prose .bl-figure--wide { margin-inline: -3rem; } }
.bl-gallery__grid { display: grid; gap: .6rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bl-gallery--2 .bl-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bl-prose .bl-gallery__grid img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
@media (max-width: 560px) { .bl-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bl-prose .bl-figure--narrow { max-width: 100%; } }
.bl-prose img.is-zoomable { cursor: zoom-in; transition: filter .3s ease; }
.bl-prose img.is-zoomable:hover { filter: brightness(1.06); }

.bl-lightbox {
    position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; align-content: center; gap: .9rem; padding: 4vh 4vw;
    background: rgba(8, 5, 20, .92); backdrop-filter: blur(6px); cursor: zoom-out; animation: blFade .25s ease both;
}
.bl-lightbox[hidden] { display: none; }
.bl-lightbox img { max-width: 100%; max-height: 82vh; border-radius: 12px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); cursor: default; }
.bl-lightbox p { margin: 0; max-width: 60rem; color: #d7cff2; text-align: center; font-size: .95rem; }
.bl-lightbox p:empty { display: none; }
.bl-lightbox__close {
    position: absolute; top: 1rem; inset-inline-end: 1rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.5rem; line-height: 1;
}
@keyframes blFade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) { .bx-mast__aura i { animation: none; } }
html[data-theme="light"] .bx-mast__aura i { opacity: .3; }
html[data-theme="light"] .bx-popular__body small { color: #b86a00; }

.bx-rail a::after { display: none; }
/* "our services" links at the end of an article */
.ba-services { position: static; margin-top: 2rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); }
.ba-services b { grid-column: 1 / -1; }
.ba-services a { min-height: 44px; display: flex; align-items: center; }
