/*
 * A blog post (resources/views/blog/show.blade.php, 9 Nov 2026): three
 * columns on a wide screen — the reading time, a progress bar and the
 * contents on the left; the post; the card of what is sold on the right —
 * and one column on a phone. Only the site's own tokens, so both themes
 * follow. The bar and the marking of the section being read are
 * public/js/blog-post.js; without it the contents are open and there is no bar.
 */

.bp-layout { display: grid; gap: 28px; align-items: start; }
.bp-layout > * { min-width: 0; }

/* The header: the trail and the title start where the post does. */
.bp-head .phead { padding-block: 124px 52px; gap: 16px; }
.bp-head h1 { max-width: 26ch; }
.bp-head .blog-trail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; min-width: 0; }
.bp-head .blog-trail li { display: inline-flex; align-items: center; min-width: 0; }
.bp-head .blog-trail li + li::before { content: "›"; margin: 0 10px; color: var(--deep-fg-3); }
.bp-head .blog-trail .here { flex: 0 1 auto; min-width: 0; }
.bp-head .blog-trail .here span { display: block; max-width: 48ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--deep-fg); }
/* On a phone the title is right below: the trail stops at its section. */
@media (max-width: 699px) {
    .bp-head .blog-trail .here { display: none; }
}

/* Left: reading time, progress, contents. */
.bp-left { display: grid; gap: 14px; align-content: start; }
.bp-read { margin: 0; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--fg); }
.bp-progress { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bp-progress span { display: block; height: 100%; background: var(--primary); transform-origin: left center; transform: scaleX(0); }
.bp-toc-box { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.bp-toc-box summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; }
.bp-toc-box summary::-webkit-details-marker { display: none; }
.bp-toc-box summary h2 { margin: 0; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary-text); }
.bp-toc-box summary .pm svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.bp-toc-box[open] summary .pm svg { transform: rotate(45deg); }
.bp-toc-box .blog-toc { border: 0; border-radius: 0; background: none; padding: 0 18px 16px; max-width: none; }
.bp-toc-box .blog-toc ol { gap: 0; }
.bp-toc-box .blog-toc a { display: block; padding: 7px 0 7px 12px; border-left: 2px solid transparent; line-height: 1.45; }
.bp-toc-box .blog-toc a[aria-current] { color: var(--primary-text); border-left-color: var(--primary); font-weight: 600; }

/* The key points: the answer first, in a box of its own. */
.bp-main .blog-points { max-width: none; padding: 26px 30px; border-radius: 22px; gap: 14px; }
.bp-main .blog-points h2 { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--fg); }
.bp-spark { width: 24px; height: 24px; flex: none; fill: var(--primary); }
.bp-main .blog-points ul { gap: 12px; }
.bp-main .blog-points li { font-weight: 400; line-height: 1.6; color: var(--fg); }
.bp-main .blog-points li::before { width: 6px; height: 6px; left: 6px; top: 0.7em; background: var(--fg-2); }

/* Right: what is sold. Dark in both themes, like the site's own bands. */
.bp-promo { border-radius: 22px; overflow: hidden; background: var(--deep); color: var(--deep-fg); border: 1px solid var(--deep-line-2); }
.bp-promo-art { position: relative; height: 150px; display: grid; place-items: center; background: radial-gradient(120% 90% at 85% 0%, rgb(45 212 191 / 0.55), transparent 60%), linear-gradient(160deg, var(--deep-3), var(--deep)); }
.bp-mock { width: 76%; display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: rgb(255 255 255 / 0.08); border: 1px solid rgb(255 255 255 / 0.14); box-shadow: 0 18px 40px -20px rgb(0 0 0 / 0.6); }
.bp-mock-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--deep-fg-2); }
.bp-mock-row b { font-weight: 600; }
.bp-mock-row i { display: block; width: 42%; height: 8px; border-radius: 999px; background: rgb(255 255 255 / 0.25); }
.bp-mock-row.on { color: var(--mint); }
.bp-mock-row.on i { background: var(--jade); }
.bp-promo-body { display: grid; gap: 14px; padding: 20px 22px 24px; }
.bp-promo-badge { justify-self: start; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--jade); color: var(--jade-2); font-size: 13px; }
.bp-promo h2 { margin: 0; font-family: var(--font-display); font-size: 1.45rem; line-height: 1.25; color: var(--deep-fg); }
.bp-promo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bp-promo li { display: flex; align-items: center; gap: 10px; color: var(--deep-fg); font-size: 15px; }
.bp-promo .ck { margin: 0; flex: none; background: rgb(45 212 191 / 0.18); color: var(--jade-2); }
.bp-promo .btn { width: 100%; box-sizing: border-box; }
.bp-promo-alt { justify-self: center; font-size: 14px; color: var(--deep-fg-2); text-decoration: underline; text-underline-offset: 3px; }
.bp-promo-alt:hover { color: var(--jade-2); }

@media (min-width: 1100px) {
    .bp-layout { grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 56px; }
    .bp-head > .phead { grid-column: 2 / 4; }
    .bp-left, .bp-right { position: sticky; top: 100px; }
    .bp-left { max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: thin; }
    /* Beside the post the contents are always open: the heading is a label. */
    .bp-toc-box { border: 0; background: none; }
    .bp-toc-box summary { padding: 6px 0 8px; cursor: default; pointer-events: none; }
    .bp-toc-box summary .pm { display: none; }
    .bp-toc-box .blog-toc { padding: 0; }
}

@media (prefers-reduced-motion: no-preference) {
    .bp-progress span { transition: transform 0.12s linear; }
}

/* Bengali: the key points' heading is a heading here, not the small label
   site.css draws it as; and the contents' label is spaced as Bengali is. */
html:lang(bn) .bp-main .blog-points h2 { font-size: 1.35rem; letter-spacing: 0; }
html:lang(bn) .bp-toc-box summary h2 { letter-spacing: 0.02em; font-size: 12.5px; text-transform: none; }
