/* ── RowFold library (blog) ───────────────────────────────────────────────────
   Loaded only by /blog, /blog/topic/{t} and /blog/{slug}. Uses the marketing
   token set (tokens.css) so the library reads as part of the same site. */

/* ── Shared shell ─────────────────────────────────────────────────────────── */
.bl-wrap { max-width: 940px; margin: 0 auto; padding: 56px 24px 100px; }
.bl-eyebrow {
    font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px;
}
.bl-head { margin-bottom: 44px; }
.bl-head h1 {
    font-family: var(--font-display); font-weight: 400; font-size: 48px; line-height: 1.03;
    letter-spacing: -0.025em; margin: 0 0 16px; max-width: 16ch;
}
.bl-lead { font-size: 18.5px; color: var(--text-2); line-height: 1.55; margin: 0; max-width: 62ch; }
.bl-sectionlabel {
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px;
}

/* ── Topic chips ──────────────────────────────────────────────────────────── */
.bl-topicnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.bl-topicchip {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--card);
    font-size: 13.5px; font-weight: 600; color: var(--text-2);
    transition: border-color 140ms, color 140ms;
}
.bl-topicchip:hover { border-color: var(--accent-deep); color: var(--accent-deep); }
.bl-topicchip i { font-style: normal; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); }

/* ── Featured cards ───────────────────────────────────────────────────────── */
.bl-featured { margin-bottom: 64px; }
.bl-featgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bl-featcard {
    display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 20px;
    border: 1px solid var(--border); border-radius: 16px; background: var(--card);
    transition: border-color 160ms, transform 160ms, box-shadow 160ms;
}
.bl-featcard:hover { border-color: var(--accent-deep); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.bl-cardtopic {
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--text-faint);
}
.bl-featcard h2 {
    font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.2;
    letter-spacing: -0.012em; margin: 0;
}
.bl-featcard p { font-size: 14.5px; color: var(--text-2); line-height: 1.55; margin: 0; flex: 1; }
.bl-cardmeta { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }

/* ── Topic sections + post list ───────────────────────────────────────────── */
.bl-topic { margin-bottom: 56px; scroll-margin-top: 100px; }
.bl-topichead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.bl-topichead h2 {
    font-family: var(--font-display); font-weight: 400; font-size: 30px;
    letter-spacing: -0.018em; margin: 0;
}
.bl-topiclink { flex: none; font-size: 13.5px; font-weight: 600; color: var(--accent-deep); }
.bl-topicblurb { font-size: 15.5px; color: var(--text-2); line-height: 1.55; margin: 8px 0 0; max-width: 64ch; }
.bl-list { margin-top: 18px; border-top: 1px solid var(--border-soft); }
.bl-item {
    display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
    padding: 17px 12px 17px 0; border-bottom: 1px solid var(--border-soft);
    transition: background 140ms, padding-left 140ms;
}
.bl-item:hover { background: var(--paper-2); padding-left: 12px; }
.bl-item-main h3 {
    font-family: var(--font-display); font-weight: 400; font-size: 20.5px;
    letter-spacing: -0.01em; margin: 0 0 4px; line-height: 1.25;
}
.bl-item:hover .bl-item-main h3 { color: var(--accent-deep); }
.bl-item-main p { font-size: 14.5px; color: var(--text-2); line-height: 1.55; margin: 0; max-width: 68ch; }
.bl-item-meta { flex: none; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.bl-list-lg .bl-item { padding-top: 21px; padding-bottom: 21px; }
.bl-othertopics { margin: 64px 0 0; }
.bl-empty { color: var(--text-muted); }

/* ── Bottom CTA ───────────────────────────────────────────────────────────── */
.bl-cta {
    margin-top: 72px; padding: 38px 36px; border-radius: 20px;
    border: 1px solid var(--border); background: var(--paper-2);
}
.bl-cta h2 {
    font-family: var(--font-display); font-weight: 400; font-size: 30px;
    letter-spacing: -0.018em; margin: 0 0 10px;
}
.bl-cta p { font-size: 16px; color: var(--text-2); line-height: 1.6; margin: 0 0 22px; max-width: 60ch; }
.bl-cta-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.bl-cta-alt { font-size: 14.5px; font-weight: 600; color: var(--accent-deep); }

/* ── Article ──────────────────────────────────────────────────────────────── */
.bp-wrap { max-width: 940px; margin: 0 auto; padding: 40px 24px 100px; }
.bp-crumbs {
    display: flex; align-items: center; gap: 9px; margin-bottom: 30px;
    font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.05em; color: var(--text-faint);
}
.bp-crumbs a { color: var(--text-muted); }
.bp-crumbs a:hover { color: var(--accent-deep); }

.bp-head { max-width: 720px; margin-bottom: 40px; }
.bp-head h1 {
    font-family: var(--font-display); font-weight: 400; font-size: 46px; line-height: 1.06;
    letter-spacing: -0.026em; margin: 0 0 18px;
}
.bp-standfirst { font-size: 19.5px; color: var(--text-2); line-height: 1.5; margin: 0 0 20px; }
.bp-meta {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.05em; color: var(--text-faint);
}
.bp-meta a { color: var(--text-muted); }
.bp-meta a:hover { color: var(--accent-deep); }

.bp-body { display: grid; grid-template-columns: 1fr 216px; gap: 52px; align-items: start; }
.bp-toc {
    order: 2; position: sticky; top: 100px;
    padding: 18px 18px 16px; border-left: 2px solid var(--border);
}
.bp-toc-label {
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--text-faint); margin-bottom: 12px;
}
.bp-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.bp-toc a { font-size: 13px; line-height: 1.4; color: var(--text-muted); }
.bp-toc a:hover { color: var(--accent-deep); }

/* ── Prose ────────────────────────────────────────────────────────────────── */
.bp-prose { order: 1; min-width: 0; max-width: 68ch; font-size: 17px; line-height: 1.72; color: var(--text); }
.bp-prose > p { margin: 0 0 22px; color: var(--text-2); }
.bp-prose h2 {
    font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.18;
    letter-spacing: -0.018em; margin: 46px 0 14px; scroll-margin-top: 100px;
}
.bp-prose h3 {
    font-family: var(--font-sans); font-weight: 650; font-size: 19px; line-height: 1.3;
    letter-spacing: -0.008em; margin: 32px 0 10px;
}
.bp-prose ul, .bp-prose ol { margin: 0 0 22px; padding-left: 22px; color: var(--text-2); }
.bp-prose li { margin-bottom: 9px; padding-left: 4px; }
.bp-prose li::marker { color: var(--text-faint); }
.bp-prose strong { font-weight: 650; color: var(--text); }
.bp-prose a { color: var(--accent-deep); font-weight: 550; text-decoration: underline; text-underline-offset: 2.5px; text-decoration-thickness: 1px; }
.bp-prose a:hover { text-decoration-thickness: 2px; }
.bp-prose code {
    font-family: var(--font-mono); font-size: 0.87em; padding: 2px 6px; border-radius: 5px;
    background: var(--paper-2); border: 1px solid var(--border-soft); color: var(--text);
}
.bp-prose pre {
    margin: 0 0 22px; padding: 18px 20px; border-radius: 12px; overflow-x: auto;
    background: var(--ink-950); border: 1px solid var(--border);
}
.bp-prose pre code { background: none; border: 0; padding: 0; color: var(--paper); font-size: 13.5px; line-height: 1.6; }
.bp-prose blockquote {
    margin: 0 0 22px; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent-deep);
}
.bp-prose blockquote p { margin: 0; font-size: 17px; color: var(--text); }
.bp-prose hr { border: 0; border-top: 1px solid var(--border-soft); margin: 40px 0; }

.bp-tablewrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--border); border-radius: 12px; }
.bp-tablewrap table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.bp-tablewrap th {
    text-align: left; padding: 12px 16px; background: var(--paper-2);
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-muted); font-weight: 600;
    border-bottom: 1px solid var(--border); white-space: nowrap;
}
.bp-tablewrap td { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); color: var(--text-2); vertical-align: top; }
.bp-tablewrap tr:last-child td { border-bottom: 0; }

/* ── Inline CTA + related ─────────────────────────────────────────────────── */
.bp-inlinecta {
    margin: 52px 0 0; padding: 28px 30px; border-radius: 16px;
    border: 1px solid var(--border); background: var(--paper-2);
}
.bp-inlinecta h3 { font-family: var(--font-display); font-weight: 400; font-size: 23px; letter-spacing: -0.014em; margin: 0 0 8px; }
.bp-inlinecta p { font-size: 15px; color: var(--text-2); line-height: 1.6; margin: 0 0 18px; }

.bp-related { margin-top: 72px; padding-top: 34px; border-top: 1px solid var(--border-soft); }
.bp-related-label {
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--text-faint); margin-bottom: 18px;
}
.bp-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bp-related-card {
    display: flex; flex-direction: column; gap: 8px; padding: 20px;
    border: 1px solid var(--border); border-radius: 14px; background: var(--card);
    transition: border-color 160ms, transform 160ms;
}
.bp-related-card:hover { border-color: var(--accent-deep); transform: translateY(-2px); }
.bp-related-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 18.5px; line-height: 1.25; letter-spacing: -0.01em; margin: 0; }
.bp-related-card p { font-size: 13.5px; color: var(--text-2); line-height: 1.5; margin: 0; flex: 1; }
.bp-related-card span { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .bl-featgrid { grid-template-columns: 1fr; }
    .bp-related-grid { grid-template-columns: 1fr; }
    .bp-body { grid-template-columns: 1fr; gap: 0; }
    .bp-toc {
        order: 0; position: static; margin-bottom: 34px; padding: 18px 20px;
        border-left: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--paper-2);
    }
}
@media (max-width: 720px) {
    .bl-head h1 { font-size: 36px; max-width: none; }
    .bp-head h1 { font-size: 34px; }
    .bp-standfirst { font-size: 17.5px; }
    .bp-prose { font-size: 16.5px; }
    .bp-prose h2 { font-size: 25px; }
    .bl-item { flex-direction: column; gap: 6px; }
    .bl-item-meta { order: -1; }
    .bl-cta { padding: 28px 24px; }
    .bl-cta h2 { font-size: 25px; }
}
