/* SP4N blog presentation.
 *
 * Layered on top of /css/marketing-shell.css, which supplies the design
 * tokens, the type families, and the header/footer styling. Everything here is
 * editorial: the reading column, the block components a post is built from, and
 * the index cards. Structural colour comes from the shell's tokens
 * (--color-paper, --color-ink, --color-card, --color-line) so the blog follows
 * a site-wide design change without being touched.
 *
 * Colour note. The brand blue --color-sp4n (#2f6fed) measures 4.18:1 against
 * the light paper, which fails WCAG AA for body-size text. Long-form pages are
 * mostly body-size text, so the reading surface uses its own link and muted
 * tokens below, each measured against both themes' paper and card:
 *
 *   light  ink #161b22 15.9:1 · muted #55606f 5.87:1 · link #1d4ed8 6.16:1
 *   dark   ink #eef2f8 15.7:1 · muted #a8b2c0 8.25:1 · link #8db1ff 8.31:1
 *
 * Verified by `npm run audit:contrast`, which renders the real generated post
 * in both themes rather than a fixture.
 */

:root {
    --bp-muted: #55606f;
    --bp-link: #1d4ed8;
    --bp-link-hover: #143aa8;
    --bp-rule: #e2ded9;
    --bp-surface: #ffffff;
    --bp-surface-2: #f1efec;
    --bp-accent-quiet: #eef2fd;
    --bp-good: #0f5c3f;
    --bp-good-bg: #e7f3ec;
    --bp-warn: #8a4b00;
    --bp-warn-bg: #fbf1e0;
    --bp-shadow: 0 1px 2px rgb(22 27 34 / 6%), 0 12px 32px -18px rgb(22 27 34 / 22%);
    --bp-measure: 43rem;
    --bp-measure-wide: 54rem;
}

:root[data-theme="dark"] {
    --bp-muted: #a8b2c0;
    --bp-link: #8db1ff;
    --bp-link-hover: #b9cfff;
    --bp-rule: #26314a;
    --bp-surface: #182238;
    --bp-surface-2: #131c2f;
    --bp-accent-quiet: #16213a;
    --bp-good: #4ade9f;
    --bp-good-bg: #10291f;
    --bp-warn: #f2c268;
    --bp-warn-bg: #2d2312;
    --bp-shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 16px 40px -20px rgb(0 0 0 / 60%);
}

/* --- page frame ------------------------------------------------------- */

.bp-shell { min-height: 100vh; display: flex; flex-direction: column; }
.bp-main { flex: 1 0 auto; }

/* Reading progress. A 2px hairline under the sticky header — enough to answer
   "how much is left" without decorating the page. */
.bp-progress {
    position: fixed; inset: 0 auto auto 0; height: 2px; width: 0;
    background: var(--bp-link); z-index: 60;
    transition: width 90ms linear;
}

.bp-wrap { margin: 0 auto; width: 100%; max-width: 80rem; padding: 0 1.25rem; }
@media (min-width: 640px) { .bp-wrap { padding: 0 2rem; } }

/* --- article layout --------------------------------------------------- */

.bp-article { padding: 3rem 0 1rem; }
@media (min-width: 1024px) { .bp-article { padding-top: 4.5rem; } }

.bp-head { max-width: var(--bp-measure-wide); }

.bp-kicker {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-mono); font-size: .7rem; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase; color: var(--bp-link);
}
.bp-kicker::before {
    content: ""; width: 1.25rem; height: 1px; background: currentColor; opacity: .7;
}

.bp-title {
    margin-top: 1.125rem;
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(2.1rem, 5.2vw, 3.35rem); line-height: 1.06;
    letter-spacing: -.022em; color: var(--color-ink);
    font-stretch: 112%;
}

.bp-deck {
    margin-top: 1.25rem; max-width: var(--bp-measure);
    font-size: 1.1875rem; line-height: 1.6; color: var(--bp-muted);
}

/* Byline. No portrait: the author is a team, and a stock avatar would be a
   small lie on a page whose whole argument is about verifiable sourcing. */
.bp-byline {
    display: flex; flex-wrap: wrap; align-items: center; gap: .625rem 1rem;
    margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--bp-rule);
    font-size: .875rem; color: var(--bp-muted);
}
.bp-byline-mark {
    display: grid; place-items: center; width: 2.25rem; height: 2.25rem;
    border-radius: .25rem; background: var(--bp-accent-quiet); color: var(--bp-link);
    font-family: var(--font-display); font-weight: 800; font-size: .8125rem;
    letter-spacing: .02em; flex: none;
}
.bp-byline-author { color: var(--color-ink); font-weight: 600; }
.bp-byline-role { display: block; font-weight: 400; color: var(--bp-muted); font-size: .8125rem; }
.bp-byline-sep { width: 1px; height: 1.25rem; background: var(--bp-rule); }
.bp-byline time { font-variant-numeric: tabular-nums; }

/* Two columns above 1180px: the reading measure, and a rail that holds the
   contents list and the share controls. Below that the rail's contents move
   inline, above the body, where they are still useful on a phone. */
.bp-body-grid { display: grid; gap: 3rem; margin-top: 2.75rem; }
@media (min-width: 1180px) {
    .bp-body-grid {
        grid-template-columns: minmax(0, var(--bp-measure)) minmax(14rem, 1fr);
        gap: 4.5rem; align-items: start;
    }
}

.bp-rail { display: none; }
@media (min-width: 1180px) {
    .bp-rail { display: block; position: sticky; top: 6rem; }
}

/* --- prose ------------------------------------------------------------ */

.bp-prose {
    max-width: var(--bp-measure);
    font-size: 1.0625rem; line-height: 1.75; color: var(--color-ink);
}
.bp-prose > * + * { margin-top: 1.375rem; }

.bp-lead {
    font-size: 1.1875rem; line-height: 1.65; color: var(--color-ink);
}
.bp-lead::first-letter { /* no drop cap: it reads as a magazine, not a technical note */ }

.bp-prose p { text-wrap: pretty; }

.bp-h2 {
    position: relative;
    margin-top: 3.25rem !important;
    font-family: var(--font-display); font-weight: 750;
    font-size: 1.6875rem; line-height: 1.22; letter-spacing: -.015em;
    color: var(--color-ink); scroll-margin-top: 6rem;
}
.bp-h3 {
    margin-top: 2.25rem !important;
    font-family: var(--font-display); font-weight: 700;
    font-size: 1.1875rem; line-height: 1.35; letter-spacing: -.008em;
    color: var(--color-ink);
}

/* The anchor sits in the gutter and only appears on hover, so the heading
   itself is never visually interrupted by punctuation. */
.bp-anchor {
    position: absolute; left: -1.35rem; top: .1em;
    color: var(--bp-muted); opacity: 0; text-decoration: none;
    font-weight: 500; transition: opacity 120ms ease;
}
.bp-h2:hover .bp-anchor, .bp-anchor:focus-visible { opacity: .65; }
@media (max-width: 1023px) { .bp-anchor { display: none; } }

.bp-link {
    color: var(--bp-link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
    text-decoration-color: color-mix(in srgb, var(--bp-link) 40%, transparent);
    transition: color 120ms ease, text-decoration-color 120ms ease;
}
.bp-link:hover { color: var(--bp-link-hover); text-decoration-color: currentColor; }

.bp-prose strong { font-weight: 650; color: var(--color-ink); }

.bp-code {
    font-family: var(--font-mono); font-size: .875em;
    padding: .1em .36em; border-radius: .25rem;
    background: var(--bp-surface-2); border: 1px solid var(--bp-rule);
    color: var(--color-ink);
}

.bp-ref { font-size: .7em; line-height: 1; margin-left: .1em; }
.bp-ref a {
    color: var(--bp-link); text-decoration: none; font-weight: 600;
    font-family: var(--font-mono); padding: 0 .1em;
}
.bp-ref a:hover { text-decoration: underline; }

/* --- lists ------------------------------------------------------------ */

.bp-list { padding-left: 1.25rem; }
.bp-list li + li { margin-top: .5rem; }
.bp-list { list-style: none; }
.bp-list > li { position: relative; }
.bp-list > li::before {
    content: ""; position: absolute; left: -1rem; top: .72em;
    width: .3125rem; height: .3125rem; border-radius: 50%;
    background: var(--bp-muted); opacity: .6;
}
.bp-list-ordered { counter-reset: bp-ol; }
.bp-list-ordered > li::before {
    counter-increment: bp-ol; content: counter(bp-ol) ".";
    left: -1.35rem; top: 0; width: auto; height: auto; border-radius: 0;
    background: none; opacity: 1;
    font-family: var(--font-mono); font-size: .8125rem; font-weight: 600;
    color: var(--bp-link); font-variant-numeric: tabular-nums;
}

.bp-checklist { list-style: none; padding: 0; }
.bp-checklist > li {
    display: flex; gap: .75rem; align-items: flex-start;
}
.bp-checklist > li + li { margin-top: .625rem; }
.bp-check {
    flex: none; display: grid; place-items: center;
    width: 1.25rem; height: 1.25rem; margin-top: .28em;
    border-radius: .25rem; background: var(--bp-good-bg); color: var(--bp-good);
}
.bp-check svg { width: .8125rem; height: .8125rem; }

/* --- figures, diagrams, tables ---------------------------------------- */

.bp-figure, .bp-table-figure { margin: 2.5rem 0 !important; }
@media (min-width: 1180px) {
    /* Figures breathe past the reading measure without becoming full-bleed. */
    .bp-figure, .bp-table-figure { width: calc(100% + 5.5rem); margin-left: -2.75rem !important; }
}

.bp-image {
    display: block; width: 100%; height: auto;
    border: 1px solid var(--bp-rule); border-radius: .5rem;
    background: var(--bp-surface-2);
}

.bp-diagram {
    border: 1px solid var(--bp-rule); border-radius: .5rem;
    background: var(--bp-surface); padding: 1.5rem;
    overflow-x: auto;
}
.bp-diagram svg { display: block; width: 100%; height: auto; max-width: 100%; }

.bp-figcaption {
    margin-top: .75rem; font-size: .8125rem; line-height: 1.55;
    color: var(--bp-muted); max-width: var(--bp-measure);
}

.bp-table-scroll { overflow-x: auto; border: 1px solid var(--bp-rule); border-radius: .5rem; }
.bp-table-scroll:focus-visible { outline: 2px solid var(--bp-link); outline-offset: 2px; }
.bp-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.bp-table thead th {
    background: var(--bp-surface-2);
    font-family: var(--font-mono); font-size: .6875rem; font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase; color: var(--bp-muted);
    text-align: left; padding: .75rem 1rem; white-space: nowrap;
    border-bottom: 1px solid var(--bp-rule);
}
.bp-table tbody th {
    text-align: left; font-weight: 600; color: var(--color-ink);
    padding: .8125rem 1rem; vertical-align: top;
}
.bp-table td { padding: .8125rem 1rem; color: var(--color-ink); vertical-align: top; }
.bp-table tbody tr + tr th, .bp-table tbody tr + tr td { border-top: 1px solid var(--bp-rule); }
.bp-table thead th.bp-num, .bp-table td.bp-num { font-variant-numeric: tabular-nums; }

/* --- emphasis blocks -------------------------------------------------- */

.bp-pull {
    margin: 2.5rem 0 !important; padding-left: 1.25rem;
    border-left: 2px solid var(--bp-link);
    font-family: var(--font-display); font-weight: 600;
    font-size: 1.375rem; line-height: 1.38; letter-spacing: -.012em;
    color: var(--color-ink);
}

.bp-quote {
    margin: 2.5rem 0 !important; padding: 1.5rem 1.625rem;
    border: 1px solid var(--bp-rule); border-radius: .5rem;
    background: var(--bp-surface);
}
.bp-quote p { font-size: 1.0625rem; line-height: 1.7; color: var(--color-ink); }
.bp-quote cite {
    display: block; margin-top: .875rem; font-style: normal;
    font-family: var(--font-mono); font-size: .75rem; letter-spacing: .06em;
    text-transform: uppercase; color: var(--bp-muted);
}

.bp-callout {
    display: grid; gap: .875rem; margin: 2.25rem 0 !important;
    padding: 1.25rem 1.375rem; border-radius: .5rem;
    border: 1px solid var(--bp-rule); background: var(--bp-surface);
    border-left-width: 3px;
}
.bp-callout-note { border-left-color: var(--bp-link); }
.bp-callout-method { border-left-color: var(--bp-good); }
.bp-callout-warning { border-left-color: var(--bp-warn); background: var(--bp-warn-bg); }
.bp-callout-label {
    font-family: var(--font-mono); font-size: .6875rem; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase;
}
.bp-callout-note .bp-callout-label { color: var(--bp-link); }
.bp-callout-method .bp-callout-label { color: var(--bp-good); }
.bp-callout-warning .bp-callout-label { color: var(--bp-warn); }
.bp-callout-body { font-size: .9375rem; line-height: 1.7; }
.bp-callout-title { font-weight: 650; color: var(--color-ink); }
.bp-callout-body p + p { margin-top: .5rem; color: var(--color-ink); }

.bp-stats {
    display: grid; gap: 1px; margin: 2.5rem 0 !important;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    background: var(--bp-rule); border: 1px solid var(--bp-rule);
    border-radius: .5rem; overflow: hidden;
}
.bp-stat { background: var(--bp-surface); padding: 1.25rem 1.25rem 1.375rem; }
.bp-stat-value {
    font-family: var(--font-display); font-weight: 800;
    font-size: 1.75rem; line-height: 1.1; letter-spacing: -.02em;
    color: var(--color-ink); font-variant-numeric: tabular-nums;
}
.bp-stat-label { margin-top: .5rem; font-size: .8125rem; line-height: 1.5; color: var(--bp-muted); }

.bp-divider { margin: 3rem 0 !important; border: 0; border-top: 1px solid var(--bp-rule); }

.bp-pre {
    margin: 2rem 0 !important; padding: 1.125rem 1.25rem;
    border: 1px solid var(--bp-rule); border-radius: .5rem;
    background: var(--bp-surface-2); overflow-x: auto;
    font-family: var(--font-mono); font-size: .8125rem; line-height: 1.7;
    color: var(--color-ink);
}

/* --- takeaways, FAQ, sources ------------------------------------------ */

.bp-takeaways {
    margin: 3rem 0 !important; padding: 1.625rem 1.75rem;
    border: 1px solid var(--bp-rule); border-radius: .625rem;
    background: var(--bp-accent-quiet);
}
.bp-takeaways-title {
    font-family: var(--font-mono); font-size: .6875rem; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase; color: var(--bp-link);
    margin: 0 0 1rem;
}
.bp-takeaways-list { list-style: none; padding: 0; counter-reset: bp-take; }
.bp-takeaways-list > li {
    position: relative; padding-left: 2rem;
    font-size: .9375rem; line-height: 1.65; color: var(--color-ink);
}
.bp-takeaways-list > li + li { margin-top: .8125rem; }
.bp-takeaways-list > li::before {
    counter-increment: bp-take; content: counter(bp-take, decimal-leading-zero);
    position: absolute; left: 0; top: .1em;
    font-family: var(--font-mono); font-size: .75rem; font-weight: 600;
    color: var(--bp-link); font-variant-numeric: tabular-nums;
}

.bp-faq { margin-top: 3.25rem !important; }
.bp-faq-item {
    border-bottom: 1px solid var(--bp-rule);
}
.bp-faq-item:first-of-type { border-top: 1px solid var(--bp-rule); }
.bp-faq-item summary {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
    padding: 1.125rem 0; cursor: pointer; list-style: none;
    font-family: var(--font-display); font-weight: 650; font-size: 1.0625rem;
    line-height: 1.45; color: var(--color-ink);
}
.bp-faq-item summary::-webkit-details-marker { display: none; }
.bp-faq-item summary:focus-visible { outline: 2px solid var(--bp-link); outline-offset: 3px; }
.bp-faq-marker { position: relative; flex: none; width: .875rem; height: .875rem; margin-top: .32em; }
.bp-faq-marker::before, .bp-faq-marker::after {
    content: ""; position: absolute; background: var(--bp-link);
    transition: transform 160ms ease, opacity 160ms ease;
}
.bp-faq-marker::before { inset: 45% 0 45% 0; }
.bp-faq-marker::after { inset: 0 45% 0 45%; }
.bp-faq-item[open] .bp-faq-marker::after { transform: scaleY(0); opacity: 0; }
.bp-faq-answer { padding: 0 0 1.25rem; font-size: .9375rem; line-height: 1.72; color: var(--bp-muted); max-width: 40rem; }
.bp-faq-answer p { color: var(--bp-muted); }

.bp-sources { margin-top: 3.25rem !important; padding-top: 2rem; border-top: 1px solid var(--bp-rule); }
.bp-sources-title {
    font-family: var(--font-mono); font-size: .6875rem; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase; color: var(--bp-muted);
    margin: 0 0 1.25rem;
}
.bp-source-list { list-style: none; padding: 0; }
.bp-source-list > li { display: flex; gap: .875rem; scroll-margin-top: 6rem; }
.bp-source-list > li + li { margin-top: .875rem; }
.bp-source-list > li:target .bp-source-n { background: var(--bp-link); color: #fff; border-color: var(--bp-link); }
.bp-source-n {
    flex: none; display: grid; place-items: center; min-width: 1.5rem; height: 1.5rem;
    border: 1px solid var(--bp-rule); border-radius: .25rem;
    background: var(--bp-surface-2); color: var(--bp-muted);
    font-family: var(--font-mono); font-size: .75rem; font-weight: 600;
    font-variant-numeric: tabular-nums; transition: background 140ms ease, color 140ms ease;
}
.bp-source-body { display: grid; gap: .1875rem; font-size: .875rem; line-height: 1.55; }
.bp-source-meta { color: var(--bp-muted); font-size: .8125rem; }
.bp-source-note { color: var(--bp-muted); font-size: .8125rem; }

/* --- rail: contents + share ------------------------------------------- */

.bp-rail-title {
    font-family: var(--font-mono); font-size: .6875rem; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase; color: var(--bp-muted);
    margin-bottom: .875rem;
}
.bp-toc { list-style: none; padding: 0; border-left: 1px solid var(--bp-rule); }
.bp-toc a {
    display: block; padding: .375rem 0 .375rem 1rem; margin-left: -1px;
    border-left: 2px solid transparent;
    font-size: .84375rem; line-height: 1.45; color: var(--bp-muted);
    text-decoration: none; transition: color 120ms ease, border-color 120ms ease;
}
.bp-toc a:hover { color: var(--color-ink); }
.bp-toc a[aria-current="true"] { color: var(--bp-link); border-left-color: var(--bp-link); font-weight: 600; }

/* Inline contents card, for viewports without the rail. */
.bp-toc-inline {
    margin: 2rem 0 2.75rem; padding: 1.25rem 1.375rem;
    border: 1px solid var(--bp-rule); border-radius: .5rem; background: var(--bp-surface);
}
@media (min-width: 1180px) { .bp-toc-inline { display: none; } }
.bp-toc-inline .bp-toc { border-left: 0; }
.bp-toc-inline .bp-toc a { padding-left: 0; border-left: 0; }

.bp-share { margin-top: 2rem; }
.bp-share-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.bp-share-btn {
    display: inline-flex; align-items: center; gap: .4375rem;
    padding: .5rem .75rem; border: 1px solid var(--bp-rule); border-radius: .25rem;
    background: var(--bp-surface); color: var(--bp-muted);
    font-family: var(--font-mono); font-size: .6875rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
    cursor: pointer; transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
.bp-share-btn:hover { color: var(--color-ink); border-color: var(--bp-muted); }
.bp-share-btn:focus-visible { outline: 2px solid var(--bp-link); outline-offset: 2px; }
.bp-share-btn svg { width: .875rem; height: .875rem; flex: none; }
.bp-share-btn[data-copied="true"] { color: var(--bp-good); border-color: var(--bp-good); }

/* Share row that sits under the article on narrow screens. */
.bp-share-inline {
    margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--bp-rule);
    display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem;
}
.bp-share-inline .bp-rail-title { margin: 0; }

/* --- conversion + related -------------------------------------------- */

.bp-cta {
    margin: 4rem 0 0; padding: 2.25rem 2rem;
    border-radius: .75rem; background: var(--color-navy); color: #fff;
    position: relative; overflow: hidden;
}
.bp-cta-kicker {
    font-family: var(--font-mono); font-size: .6875rem; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase; color: var(--color-cyan-bp);
}
.bp-cta-title {
    margin-top: .875rem; font-family: var(--font-display); font-weight: 800;
    font-size: clamp(1.5rem, 3vw, 1.9375rem); line-height: 1.2; letter-spacing: -.018em;
}
.bp-cta-copy { margin-top: .875rem; max-width: 34rem; font-size: .9375rem; line-height: 1.7; color: rgb(255 255 255 / 76%); }
.bp-cta-actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.bp-cta-primary, .bp-cta-secondary {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .75rem 1.125rem; border-radius: .25rem;
    font-family: var(--font-mono); font-size: .75rem; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.bp-cta-primary { background: #fff; color: #10182b; }
.bp-cta-primary:hover { background: var(--color-cyan-bp); color: #10182b; }
.bp-cta-secondary { border: 1px solid rgb(255 255 255 / 28%); color: #fff; }
.bp-cta-secondary:hover { border-color: #fff; background: rgb(255 255 255 / 8%); }
.bp-cta-primary:focus-visible, .bp-cta-secondary:focus-visible { outline: 2px solid var(--color-cyan-bp); outline-offset: 3px; }
.bp-cta-fine { margin-top: 1.25rem; font-size: .75rem; line-height: 1.6; color: rgb(255 255 255 / 60%); }

.bp-related { margin-top: 4rem; padding-top: 2.5rem; border-top: 1px solid var(--bp-rule); }
.bp-related-title {
    font-family: var(--font-mono); font-size: .6875rem; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase; color: var(--bp-muted);
}
.bp-related-grid { margin-top: 1.5rem; display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .bp-related-grid { grid-template-columns: 1fr 1fr; } }

/* --- index page ------------------------------------------------------- */

.bp-index-hero { padding: 3.5rem 0 2.5rem; }
@media (min-width: 1024px) { .bp-index-hero { padding: 5rem 0 3rem; } }
.bp-index-title {
    margin-top: 1.125rem; font-family: var(--font-display); font-weight: 800;
    font-size: clamp(2.25rem, 5.5vw, 3.5rem); line-height: 1.05; letter-spacing: -.024em;
    color: var(--color-ink); font-stretch: 112%;
}
.bp-index-deck { margin-top: 1.25rem; max-width: 40rem; font-size: 1.125rem; line-height: 1.65; color: var(--bp-muted); }

.bp-topics { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.bp-topic {
    display: inline-flex; align-items: center; gap: .4375rem;
    padding: .4375rem .75rem; border: 1px solid var(--bp-rule); border-radius: 999px;
    background: var(--bp-surface); color: var(--bp-muted);
    font-family: var(--font-mono); font-size: .6875rem; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
}
.bp-topic:hover { color: var(--color-ink); border-color: var(--bp-muted); }

/* Lead card: the newest post, given more room than the rest. */
.bp-feature {
    display: grid; gap: 0; margin-top: 1rem;
    border: 1px solid var(--bp-rule); border-radius: .75rem;
    background: var(--bp-surface); overflow: hidden; box-shadow: var(--bp-shadow);
}
@media (min-width: 900px) { .bp-feature { grid-template-columns: 1.05fr 1fr; } }
.bp-feature-art {
    background: var(--bp-surface-2); border-bottom: 1px solid var(--bp-rule);
    display: flex; align-items: center; padding: 1.5rem; overflow: hidden;
}
@media (min-width: 900px) {
    .bp-feature-art { border-bottom: 0; border-right: 1px solid var(--bp-rule); padding: 2rem; }
}
/* Contained rather than cropped. An `object-fit: cover` crop cut the axis off
   the chart, which turns a diagram that means something into decoration. */
.bp-feature-art svg, .bp-feature-art img {
    display: block; width: 100%; height: auto; max-height: 100%;
}
.bp-feature-body { padding: 1.875rem; display: flex; flex-direction: column; }
@media (min-width: 900px) { .bp-feature-body { padding: 2.25rem; } }
.bp-feature-title {
    margin-top: .875rem; font-family: var(--font-display); font-weight: 750;
    font-size: clamp(1.375rem, 2.6vw, 1.75rem); line-height: 1.22; letter-spacing: -.016em;
}
.bp-feature-title a { color: var(--color-ink); text-decoration: none; }
.bp-feature-title a:hover { color: var(--bp-link); }
.bp-feature-summary { margin-top: .875rem; font-size: .9375rem; line-height: 1.7; color: var(--bp-muted); }
.bp-feature-meta { margin-top: auto; padding-top: 1.5rem; }

/* `auto-fit` rather than a fixed column count so the row fills the width at
   any post count. A hard `repeat(3, 1fr)` left a visible empty slot whenever
   the number of cards was not a multiple of three. */
.bp-card-list {
    margin-top: 2.5rem; display: grid; gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
}

.bp-card {
    display: flex; flex-direction: column;
    border: 1px solid var(--bp-rule); border-radius: .625rem;
    background: var(--bp-surface); padding: 1.5rem;
    transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.bp-card:hover { border-color: var(--bp-muted); transform: translateY(-2px); box-shadow: var(--bp-shadow); }
.bp-card-topic {
    font-family: var(--font-mono); font-size: .6875rem; font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase; color: var(--bp-link);
}
.bp-card-title {
    margin-top: .75rem; font-family: var(--font-display); font-weight: 700;
    font-size: 1.125rem; line-height: 1.32; letter-spacing: -.01em;
}
.bp-card-title a { color: var(--color-ink); text-decoration: none; }
.bp-card-title a:hover { color: var(--bp-link); }
.bp-card-summary { margin-top: .75rem; font-size: .875rem; line-height: 1.65; color: var(--bp-muted); }
.bp-card-meta {
    margin-top: auto; padding-top: 1.25rem;
    display: flex; align-items: center; gap: .5rem;
    font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .06em;
    text-transform: uppercase; color: var(--bp-muted);
}
.bp-card-meta time { font-variant-numeric: tabular-nums; }
.bp-card-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

/* Whole-card hit area without nesting interactive elements. */
.bp-card-link-cover { position: absolute; inset: 0; }
.bp-card, .bp-feature-body { position: relative; }

/* --- follow / subscribe ---------------------------------------------- */

.bp-follow {
    margin-top: 4rem; padding: 2rem;
    border: 1px solid var(--bp-rule); border-radius: .75rem;
    background: var(--bp-surface-2);
}
.bp-follow-grid { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 860px) { .bp-follow-grid { grid-template-columns: 1.2fr 1fr; gap: 2.5rem; } }
.bp-follow-title {
    font-family: var(--font-display); font-weight: 750; font-size: 1.375rem;
    line-height: 1.25; letter-spacing: -.014em; color: var(--color-ink);
}
.bp-follow-copy { margin-top: .625rem; font-size: .9375rem; line-height: 1.65; color: var(--bp-muted); }
.bp-follow-actions { display: flex; flex-wrap: wrap; gap: .625rem; }
.bp-follow-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .6875rem 1rem; border-radius: .25rem; text-decoration: none;
    font-family: var(--font-mono); font-size: .71875rem; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase;
    border: 1px solid var(--bp-rule); background: var(--bp-surface); color: var(--color-ink);
    transition: border-color 140ms ease, color 140ms ease;
}
.bp-follow-btn:hover { border-color: var(--bp-link); color: var(--bp-link); }
.bp-follow-btn:focus-visible { outline: 2px solid var(--bp-link); outline-offset: 2px; }
.bp-follow-btn svg { width: .9375rem; height: .9375rem; flex: none; }

/* --- accessibility --------------------------------------------------- */

.bp-skip {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    padding: .75rem 1rem; background: var(--bp-link); color: #fff;
    font-family: var(--font-mono); font-size: .75rem; text-decoration: none;
}
.bp-skip:focus { left: .5rem; top: .5rem; }

@media (prefers-reduced-motion: reduce) {
    .bp-progress { transition: none; }
    .bp-card:hover { transform: none; }
    * { scroll-behavior: auto !important; }
}

/* --------------------------------------------------------------------------
   Review-draft marker. Drafts are generated and reviewable at their URL but
   noindex and unlisted; the badge keeps a reviewer from mistaking one for a
   published page. Warn tokens are the AA-checked pair documented above.
   -------------------------------------------------------------------------- */
.bp-draft-badge {
    display: inline-block; padding: .1875rem .5625rem;
    border: 1px solid var(--bp-warn); border-radius: 999px;
    background: var(--bp-warn-bg); color: var(--bp-warn);
    font-size: .6875rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; white-space: nowrap; vertical-align: middle;
}
