/* =========================================================
   The Shelf (blog) — blog.php and blog-post.php
   All classes use the bl- prefix. Font files are shared from assets/fonts.
   ========================================================= */

@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../../fonts/bricolage-grotesque.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../../fonts/inter.woff2') format('woff2');
}

:root {
    --bl-ink: #191B1A;
    --bl-ink-2: #2C302E;
    --bl-white: #FFFFFF;
    --bl-slate: #354A50;
    --bl-muted: #4F5B55;
    --bl-on-dark: #C9D1CC;
    --bl-sky: #D9EDFA;
    --bl-sky-strong: #A8DDF7;
    --bl-mist: #F4F8FB;
    --bl-line: #E5E8E4;
    --bl-field: #CBD3CE;
    --bl-blue: #2A78B5;
    --bl-orange: #C4861C;

    --bl-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
    --bl-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --bl-max: 1232px;
    --bl-gutter: 24px;
}

/* ---------- Base (zero-specificity resets so components always win) ---------- */
.bl-body *, .bl-body *::before, .bl-body *::after { box-sizing: border-box; }
.bl-body {
    margin: 0;
    font-family: var(--bl-sans);
    font-size: 17px;
    line-height: 1.5;
    color: var(--bl-ink);
    background: var(--bl-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
:where(.bl-body) :where(h1, h2, h3, p, ul, ol, figure, blockquote) { margin: 0; padding: 0; }
:where(.bl-body) :where(ul, ol) { list-style: none; }
:where(.bl-body) :where(img, svg) { display: block; max-width: 100%; }
:where(.bl-body) :where(a) { color: inherit; text-decoration: none; }
:where(.bl-body) :where(button, input) { font: inherit; color: inherit; }

.bl-i { width: 1em; height: 1em; flex-shrink: 0; }
.bl-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.bl-wrap {
    width: 100%;
    max-width: calc(var(--bl-max) + var(--bl-gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--bl-gutter);
}

.bl-display {
    font-family: var(--bl-display);
    font-weight: 800;
    letter-spacing: -0.045em;
}
.bl-kicker {
    font-size: 14px;
    font-weight: 600;
    line-height: 21px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--bl-slate);
}
.bl-mark { position: relative; z-index: 0; white-space: nowrap; }
.bl-mark::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 0;
    right: 0;
    bottom: 0;
    height: .41em;
    background: var(--bl-sky-strong);
}

/* ---------- Buttons, tags, pills ---------- */
.bl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    font-family: var(--bl-sans);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.bl-btn .bl-i { width: 20px; height: 20px; }
.bl-btn--dark { background: var(--bl-ink); color: var(--bl-white); }
.bl-btn--sky { background: var(--bl-sky-strong); color: var(--bl-ink); }
.bl-btn--outline { background: var(--bl-white); border: 2px solid var(--bl-ink); color: var(--bl-ink); }
.bl-btn--head { height: 48px; padding: 0 23px; font-size: 17px; margin-top: 2px; }
.bl-btn--lg { height: 54px; padding: 0 25px; font-size: 17px; }

.bl-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13.3px; color: var(--bl-muted); }
.bl-tag {
    display: inline-flex;
    align-items: center;
    height: 25px;
    padding: 0 10px;
    border: 1px solid var(--bl-line);
    border-radius: 999px;
    background: var(--bl-mist);
    font-size: 13.3px;
    font-weight: 600;
    color: var(--bl-ink);
}
.bl-tag--featured { height: 26px; padding: 0 9.5px; border-color: var(--bl-sky-strong); background: var(--bl-sky-strong); }
.bl-tag--white { height: 26px; padding: 0 11px; background: var(--bl-white); }

.bl-pill {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--bl-field);
    border-radius: 999px;
    background: var(--bl-white);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}
.bl-pill.is-active { border-color: var(--bl-ink); background: var(--bl-ink); color: var(--bl-white); }
.bl-pill:not(.is-active):hover { border-color: var(--bl-ink); }

/* =========================================================
   Header
   ========================================================= */
.bl-header { position: relative; z-index: 20; background: var(--bl-white); }
.bl-header__inner { display: flex; align-items: center; gap: 32px; height: 90px; }
.bl-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding-left: 8px;
    margin-top: 2px;
    font-size: 27.8px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}
.bl-brand__mark { width: 14px; height: 18px; margin-top: 2px; }
/* Same position as the home page header nav */
.bl-menu { margin-left: clamp(24px, 12vw, 175px); margin-right: auto; padding-top: 4px; }
.bl-menu ul { display: flex; gap: 28px; }
.bl-menu a { position: relative; display: inline-block; font-size: 16px; font-weight: 500; line-height: 24px; }
.bl-menu a.is-active { font-weight: 600; }
.bl-menu a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 3px;
    background: var(--bl-sky-strong);
}
.bl-menu a:not(.is-active):hover { text-decoration: underline; text-underline-offset: 4px; }
.bl-burger {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: var(--bl-mist);
    cursor: pointer;
}
.bl-burger span { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--bl-ink); }
.bl-burger span:first-child { top: 17px; }
.bl-burger span:last-child { top: 25px; }

/* =========================================================
   Listing — intro
   ========================================================= */
.bl-intro { padding: 37.6px 0 47px; }
.bl-intro__title { margin-top: 12.5px; font-size: 99.7px; line-height: 90px; }
.bl-intro__lead { margin-top: 12px; max-width: 600px; font-size: 22.4px; line-height: 32px; color: var(--bl-muted); }
.bl-intro--missing .bl-btn { margin-top: 28px; }
.bl-intro--missing { padding-bottom: 96px; }

/* ---------- Featured ---------- */
.bl-featured { padding-bottom: 64px; }
.bl-featured__box {
    display: grid;
    grid-template-columns: 614px minmax(0, 1fr);
    align-items: center;
    gap: 49px;
    padding: 39.5px 40px;
    border-radius: 40px;
    background: var(--bl-mist);
}
.bl-featured__art > img { width: 100%; border-radius: 24px; }
.bl-featured__body { max-width: 489px; }
.bl-featured__body .bl-meta { gap: 10px; }
.bl-featured__body .bl-meta > span:last-child { margin-left: 1px; font-size: 13.9px; }
.bl-featured__title { margin-top: 15.5px; font-size: 54.8px; line-height: 52px; }
.bl-featured__excerpt { margin-top: 16.7px; font-size: 18px; line-height: 27px; color: var(--bl-muted); }
.bl-featured__body .bl-btn { margin-top: 16px; }

/* ---------- Chart ---------- */
.bl-chart { background: var(--bl-white); border-radius: 24px; }
.bl-chart__title { font-size: 13.1px; font-weight: 600; line-height: 16px; color: var(--bl-slate); }
.bl-chart__scroll { overflow-x: auto; }
.bl-chart__plot { width: 100%; height: auto; overflow: visible; }
.bl-chart__plot--narrow { display: none; }
.bl-chart__plot text { font-family: var(--bl-sans); }
.bl-chart__grid { stroke: #E9ECE8; stroke-width: 1; }
.bl-chart__axis { fill: var(--bl-muted); }
.bl-chart__label { fill: var(--bl-ink); font-weight: 600; }
.bl-chart__point { fill: var(--bl-ink); font-weight: 700; }
.bl-chart__fee { stroke: var(--bl-ink); }
.bl-chart__app30 { stroke: var(--bl-blue); }
.bl-chart__app15 { stroke: var(--bl-orange); }
.bl-chart__dot--app30 { fill: var(--bl-blue); }
.bl-chart__dot--app15 { fill: var(--bl-orange); }
.bl-chart__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; line-height: 16px; color: var(--bl-ink); }
.bl-chart__legend li { display: flex; align-items: center; gap: 8px; }
.bl-chart__key { display: block; width: 14px; height: 3px; border-radius: 2px; }
.bl-chart__key--app30 { background: var(--bl-blue); }
.bl-chart__key--app15 { background: var(--bl-orange); }
.bl-chart__key--fee { height: 2px; background: linear-gradient(90deg, var(--bl-ink) 0 5px, transparent 5px 9px, var(--bl-ink) 9px 14px); }

.bl-chart--featured { padding: 23px 23px 17.6px; }
.bl-chart--featured .bl-chart__scroll { margin: 21px -23px 0; }
.bl-chart--featured .bl-chart__legend { margin-top: 10.4px; }

.bl-chart--article { margin: 28px 0 0; padding: 24px 23px 19.6px; border: 1px solid var(--bl-line); }
.bl-chart--article .bl-chart__title { font-size: 15.2px; line-height: 18px; color: var(--bl-ink); }
.bl-chart--article .bl-chart__scroll { margin: 27px -24px 0; }
.bl-chart--article .bl-chart__plot { min-width: 560px; }
.bl-chart--article .bl-chart__legend { margin-top: 13.4px; }

/* ---------- Filters + search ---------- */
.bl-browse { padding-bottom: 89px; }
.bl-filters { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; }
.bl-filters__list { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-search {
    position: relative;
    flex: 0 0 280px;
    color: var(--bl-muted);
}
.bl-search .bl-i { position: absolute; left: 16px; top: 50%; width: 19px; height: 19px; margin-top: -9.5px; pointer-events: none; }
.bl-search__input {
    width: 100%;
    height: 44px;
    padding: 0 18px 0 45px;
    border: 1px solid var(--bl-field);
    border-radius: 999px;
    background: var(--bl-white);
    font-size: 15.2px;
    color: var(--bl-ink);
    -webkit-appearance: none;
    appearance: none;
}
.bl-search__input::placeholder { color: var(--bl-muted); opacity: 1; }
.bl-search__input:focus,
.bl-news__input:focus { outline: none; border-color: #7FC4E8; box-shadow: 0 0 0 3px rgba(168, 221, 247, .55); }
.bl-results { margin-top: 24px; font-size: 16px; color: var(--bl-muted); }
.bl-results a, .bl-empty a { font-weight: 600; color: var(--bl-ink); text-decoration: underline; text-underline-offset: 3px; }
.bl-empty { margin-top: 32px; padding: 48px 24px; border: 1px dashed var(--bl-field); border-radius: 24px; text-align: center; font-size: 17px; color: var(--bl-muted); }

/* ---------- Cards ---------- */
.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 43.2px 32px; margin-top: 31.5px; }
.bl-card__cover {
    display: block;
    height: 210px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bl-mist);
}
.bl-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.bl-card__cover--chart { display: flex; align-items: center; justify-content: center; }
.bl-card__cover--chart .bl-chart { zoom: .56; }
.bl-card .bl-meta { margin-top: 15px; }
.bl-card__title { margin-top: 14.6px; font-family: var(--bl-display); font-size: 26.9px; font-weight: 800; line-height: 27px; letter-spacing: -0.045em; }
.bl-card__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.bl-card__excerpt { margin-top: 13.2px; font-size: 16px; line-height: 24px; color: var(--bl-muted); }

.bl-pager { display: flex; justify-content: center; gap: 12px; margin-top: 31.2px; }
.bl-pager .bl-btn { height: 54px; padding: 0 29px; font-size: 17.2px; }

/* =========================================================
   Article
   ========================================================= */
.bl-article__head { max-width: calc(932px + var(--bl-gutter) * 2); padding-top: 38.5px; }
.bl-crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.bl-crumbs__home { font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.bl-crumbs__sep { color: var(--bl-muted); }
.bl-crumbs .bl-tag { height: 27px; padding: 0 11px; font-size: 14px; }
.bl-article__title { margin-top: 25.8px; font-size: 75.9px; line-height: 69.5px; }
.bl-article__lead { margin-top: 19.9px; max-width: 760px; font-size: 24px; line-height: 33px; color: var(--bl-muted); }

.bl-byline { display: flex; align-items: center; gap: 14px; margin-top: 19.8px; }
.bl-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bl-sky);
    font-size: 16px;
    font-weight: 700;
}
.bl-byline__name { font-size: 16px; font-weight: 600; line-height: 22px; }
.bl-byline__meta { font-size: 14px; line-height: 21px; color: var(--bl-muted); }
.bl-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    margin-left: auto;
    padding: 0 16px 0 17px;
    border: 1px solid var(--bl-field);
    border-radius: 999px;
    background: var(--bl-white);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.bl-copy .bl-i { width: 15px; height: 15px; }
.bl-copy:hover { border-color: var(--bl-ink); }

.bl-article__layout {
    display: grid;
    grid-template-columns: 760px 280px;
    justify-content: center;
    gap: 64px;
    max-width: calc(1104px + var(--bl-gutter) * 2);
    margin-top: 36px;
    padding-bottom: 88px;
    align-items: start;
}

/* ---------- The short version ---------- */
.bl-short { padding: 25.7px 28px 26px; border-radius: 24px; background: var(--bl-mist); }
.bl-short__title { font-size: 13px; font-weight: 600; line-height: 20px; letter-spacing: .12em; text-transform: uppercase; color: var(--bl-slate); }
.bl-short__list { display: grid; gap: 10px; margin-top: 13.3px; }
.bl-short__list li { display: flex; align-items: flex-start; gap: 13px; font-size: 18px; line-height: 27px; }
.bl-short__tick {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    margin-top: .5px;
    border-radius: 50%;
    background: var(--bl-sky-strong);
}
.bl-short__tick .bl-i { width: 14px; height: 14px; }

/* ---------- Prose ---------- */
.bl-prose { margin-top: 39px; font-size: 19px; line-height: 30px; }
.bl-prose > * + * { margin-top: 23px; }
.bl-prose h2,
.bl-h2 { font-family: var(--bl-display); font-size: 34.8px; font-weight: 800; line-height: 38.3px; letter-spacing: -0.045em; }
.bl-prose > * + h2 { margin-top: 44px; }
.bl-prose > h2 + * { margin-top: 18.9px; }
.bl-prose > ul + h2 { margin-top: 39.3px; }
.bl-prose > blockquote + h2 { margin-top: 52px; }
.bl-prose a { text-decoration: underline; text-underline-offset: 3px; }
.bl-prose strong { font-weight: 700; }
.bl-prose > ul { display: grid; gap: 8px; }
.bl-prose > ul > li { position: relative; padding-left: 24px; line-height: 29.5px; }
.bl-prose > ul > li::before { content: ""; position: absolute; left: 5px; top: 12.5px; width: 6px; height: 6px; border-radius: 50%; background: var(--bl-ink); }
.bl-prose > p + ul { margin-top: 23.2px; }
.bl-prose > * + .bl-chart { margin-top: 29.5px; }
.bl-prose > .bl-chart + h2 { margin-top: 44px; }

.bl-prose blockquote { padding-left: 23px; border-left: 5px solid var(--bl-sky-strong); }
.bl-prose > * + blockquote { margin-top: 34.4px; }
.bl-prose blockquote p { font-family: var(--bl-display); font-size: 34.8px; font-weight: 800; line-height: 35px; letter-spacing: -0.045em; }

.bl-formula { padding: 19px 24px 18px; border-radius: 20px; background: var(--bl-ink); color: var(--bl-white); }
.bl-prose > * + .bl-formula { margin-top: 23.5px; }
.bl-formula__sum { font-family: var(--bl-display); font-size: 23.5px; font-weight: 700; line-height: 28px; letter-spacing: -0.01em; }
.bl-formula__sum b { color: var(--bl-sky-strong); font-weight: 700; }
.bl-formula__note { margin-top: 4px; font-size: 15px; line-height: 22px; color: var(--bl-on-dark); }

.bl-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 17px; line-height: 24px; font-variant-numeric: tabular-nums; }
.bl-prose > * + .bl-table { margin-top: 28px; }
.bl-table th, .bl-table td { padding: 14px 12px 16px; text-align: right; }
.bl-table th:first-child { width: 24.2%; text-align: left; }
.bl-table thead th { padding-top: 12px; padding-bottom: 14.8px; border-bottom: 2px solid var(--bl-ink); font-weight: 600; }
.bl-table tbody th { font-weight: 700; }
.bl-table tbody tr { border-bottom: 1px solid var(--bl-line); }
.bl-table td.is-best { position: relative; isolation: isolate; font-weight: 700; }
.bl-table td.is-best::before { content: ""; position: absolute; inset: 4px -1px 4px 7px; z-index: -1; border-radius: 8px; background: var(--bl-sky); }
.bl-prose > .bl-table + .bl-table-note { margin-top: 22.6px; }
.bl-table-note { font-size: 14px; line-height: 21px; color: var(--bl-muted); }

.bl-numbers {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px 25px;
    border-radius: 24px;
    background: var(--bl-sky);
}
.bl-prose > * + .bl-numbers { margin-top: 32px; }
.bl-numbers__title { font-family: var(--bl-display); font-size: 28.7px; font-weight: 800; line-height: 31.6px; letter-spacing: -0.045em; }
.bl-numbers__text { max-width: 440px; margin-top: 4.2px; font-size: 16px; line-height: 24px; color: var(--bl-slate); }
.bl-numbers__btn { flex-shrink: 0; height: 54px; padding: 0 25px; font-size: 17px; text-decoration: none !important; }

.bl-soon { margin-top: 38px; padding: 28px; border: 1px dashed var(--bl-field); border-radius: 24px; font-size: 18px; color: var(--bl-muted); }

/* ---------- FAQ + sources ---------- */
.bl-faq { margin-top: 40px; }
.bl-faq__item { padding: 18px 20px 19.3px 19.5px; border: 1px solid var(--bl-line); border-radius: 16px; }
.bl-faq .bl-h2 + .bl-faq__item { margin-top: 18.7px; }
.bl-faq__item + .bl-faq__item { margin-top: 12px; }
.bl-faq__item h3 { font-size: 19.2px; font-weight: 600; line-height: 26px; }
.bl-faq__item p { margin-top: 7.7px; font-size: 17px; line-height: 25px; color: var(--bl-muted); }
.bl-sources { margin-top: 32px; padding-top: 16.6px; border-top: 1px solid var(--bl-line); font-size: 14px; line-height: 21px; color: var(--bl-muted); }

/* ---------- Sidebar ---------- */
.bl-article__aside { position: sticky; top: 24px; display: grid; gap: 20px; }
.bl-toc { padding: 17.7px 21px 17px; border: 1px solid var(--bl-line); border-radius: 20px; }
.bl-toc__title { font-size: 13px; font-weight: 600; line-height: 20px; letter-spacing: .12em; text-transform: uppercase; color: var(--bl-slate); }
.bl-toc ul { display: grid; gap: 8px; margin-top: 6.3px; }
.bl-toc li { min-height: 30px; }
.bl-toc a { display: block; font-size: 15px; line-height: 23px; }
.bl-toc a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bl-promo { padding: 20px 22px 22px; border-radius: 24px; background: var(--bl-ink); color: var(--bl-white); }
.bl-promo__title { font-size: 26.8px; line-height: 26px; }
.bl-promo__text { margin-top: 13px; font-size: 15px; line-height: 23px; color: var(--bl-on-dark); }
.bl-promo__btn { width: 100%; height: 48px; margin-top: 12px; font-size: 17px; }

/* ---------- Keep reading ---------- */
.bl-more { padding: 71.5px 0 72px; background: var(--bl-mist); }
.bl-more__title { font-size: 48.4px; line-height: 46px; }
.bl-more .bl-grid { margin-top: 28.5px; }

/* =========================================================
   Newsletter + footer
   ========================================================= */
.bl-news { padding: 72.5px 0 72px; background: var(--bl-sky); }
.bl-news__grid { display: grid; grid-template-columns: minmax(0, 1fr) 520px; align-items: center; gap: 48px; }
.bl-news__title { max-width: 560px; font-size: 48.4px; line-height: 45px; }
.bl-news__text { max-width: 620px; margin-top: 9.5px; font-size: 17px; line-height: 26px; color: var(--bl-muted); }
.bl-news__label { display: block; font-size: 14px; font-weight: 600; line-height: 20px; }
.bl-news__row { display: flex; gap: 11px; margin-top: 10px; }
.bl-news__input {
    flex: 1;
    min-width: 0;
    height: 56px;
    padding: 0 20px;
    border: 1px solid var(--bl-field);
    border-radius: 999px;
    background: var(--bl-white);
    font-size: 16px;
}
.bl-news__input::placeholder { color: var(--bl-muted); opacity: 1; }
.bl-news__btn { flex: 0 0 160px; height: 56px; font-size: 17px; }

/* Footer: shared by every page — see assets/css/site-footer.css */

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1240px) {
    .bl-featured__box { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 40px; }
    .bl-featured__art { max-width: 614px; }
    .bl-featured__body { max-width: 640px; }
    .bl-article__layout { grid-template-columns: minmax(0, 760px) 280px; gap: 40px; }
    .bl-news__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .bl-news__form { max-width: 520px; }
}

@media (max-width: 1080px) {
    .bl-btn--head { display: none; }
    .bl-burger { display: block; }

    /* Mobile menu: always in the page and revealed by growing its grid row
       from 0fr to 1fr, so it slides open and closed instead of popping in */
    .bl-menu {
        position: absolute;
        top: 90px;
        left: 0;
        right: 0;
        display: grid;
        grid-template-rows: 0fr;
        margin: 0;
        padding: 0;
        background: var(--bl-white);
        border-bottom: 1px solid transparent;
        box-shadow: 0 24px 32px -24px rgba(25, 27, 26, 0);
        visibility: hidden;
        transition: grid-template-rows .34s cubic-bezier(.22, .8, .24, 1),
                    border-color .34s ease, box-shadow .34s ease, visibility 0s linear .34s;
    }
    .bl-menu ul {
        flex-direction: column;
        gap: 4px;
        min-height: 0;
        overflow: hidden;
        padding: 0 var(--bl-gutter);
        opacity: 0;
        transform: translateY(-8px);
        transition: transform .34s cubic-bezier(.22, .8, .24, 1), opacity .16s ease;
    }
    .bl-menu li:first-child { margin-top: 12px; }
    .bl-menu li:last-child { margin-bottom: 24px; }
    .bl-menu a { padding: 10px 0; font-size: 18px; }
    .bl-menu a.is-active::after { bottom: 4px; width: 40px; right: auto; }
    .bl-header.is-open .bl-menu {
        grid-template-rows: 1fr;
        visibility: visible;
        border-bottom-color: var(--bl-line);
        box-shadow: 0 24px 32px -24px rgba(25, 27, 26, .18);
        transition: grid-template-rows .34s cubic-bezier(.22, .8, .24, 1),
                    border-color .34s ease, box-shadow .34s ease, visibility 0s;
    }
    .bl-header.is-open .bl-menu ul { opacity: 1; transform: none; transition: transform .34s cubic-bezier(.22, .8, .24, 1), opacity .26s ease .06s; }

    /* Hamburger turns into a cross while the menu is open */
    .bl-burger span { transition: transform .3s cubic-bezier(.22, .8, .24, 1); }
    .bl-header.is-open .bl-burger span:first-child { transform: translateY(4px) rotate(45deg); }
    .bl-header.is-open .bl-burger span:last-child { transform: translateY(-4px) rotate(-45deg); }
    .bl-filters { flex-direction: column; align-items: stretch; }
    .bl-search { flex-basis: auto; max-width: 420px; }
    .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bl-article__layout { grid-template-columns: minmax(0, 1fr); max-width: calc(760px + var(--bl-gutter) * 2); }
    /* Sidebar boxes join the single column: contents list first, promo after the article */
    .bl-article__layout { gap: 0; }
    .bl-article__aside { display: contents; }
    .bl-toc { order: -1; margin-bottom: 32px; }
    .bl-article__main { order: 0; }
    .bl-promo { order: 1; margin-top: 40px; }
    .bl-promo__title br { display: none; }
}

/* People who turn off motion in their phone settings get an instant menu */
@media (prefers-reduced-motion: reduce) {
    .bl-menu, .bl-menu ul, .bl-burger span { transition: none !important; }
}

@media (max-width: 760px) {
    :root { --bl-gutter: 16px; }
    .bl-header__inner { height: 72px; }
    .bl-menu { top: 72px; }
    .bl-brand { font-size: 24px; gap: 10px; }

    .bl-intro { padding: 24px 0 36px; }
    .bl-intro__title { font-size: 64px; line-height: 60px; }
    .bl-intro__lead { font-size: 18px; line-height: 27px; }

    .bl-featured { padding-bottom: 40px; }
    .bl-featured__box { padding: 16px 16px 24px; border-radius: 28px; gap: 24px; }
    .bl-featured__body { padding: 0 4px; }

    /* Phones get the narrow chart drawing: fits the screen, no sideways scrolling */
    .bl-chart__plot--wide { display: none; }
    .bl-chart__plot--narrow { display: block; min-width: 0 !important; }
    .bl-card__cover--chart .bl-chart__plot--wide { display: block; }
    .bl-card__cover--chart .bl-chart__plot--narrow { display: none; }
    .bl-chart--featured { padding: 18px 14px 16px; }
    .bl-chart--featured .bl-chart__scroll { margin: 14px 0 0; }
    .bl-chart__legend { gap: 6px 16px; font-size: 12.5px; }
    .bl-featured__title { font-size: 38px; line-height: 38px; }
    .bl-featured__excerpt { font-size: 17px; line-height: 26px; }

    .bl-filters__list { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--bl-gutter) * -1); padding: 0 var(--bl-gutter) 4px; scrollbar-width: none; }
    .bl-filters__list::-webkit-scrollbar { display: none; }
    .bl-search__input { font-size: 16px; }   /* 16px+ stops iPhone Safari zooming in on focus */

    /* Even line breaks on narrow screens */
    .bl-intro__title, .bl-featured__title, .bl-article__title, .bl-prose h2, .bl-h2,
    .bl-more__title, .bl-news__title, .bl-card__title { text-wrap: balance; }
    .bl-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .bl-card__title { font-size: 24px; line-height: 26px; }
    .bl-browse { padding-bottom: 56px; }

    .bl-article__head { padding-top: 24px; }
    .bl-article__title { font-size: 42px; line-height: 42px; }
    .bl-article__lead { font-size: 19px; line-height: 28px; }
    .bl-byline { flex-wrap: wrap; }
    .bl-copy { margin-left: 62px; }
    .bl-short { padding: 22px 20px; }
    .bl-short__list li { font-size: 17px; line-height: 25px; }
    .bl-prose { font-size: 17.5px; line-height: 28px; }
    .bl-prose h2, .bl-h2 { font-size: 28px; line-height: 31px; }
    .bl-prose blockquote p { font-size: 26px; line-height: 29px; }
    .bl-chart--article { padding: 18px 14px 16px; }
    .bl-chart--article .bl-chart__title { font-size: 15px; line-height: 20px; }
    .bl-chart--article .bl-chart__scroll { margin: 14px 0 0; padding: 0; }
    .bl-table { font-size: 15px; }
    .bl-table th, .bl-table td { padding: 10px 8px 12px; }
    .bl-numbers { flex-direction: column; align-items: flex-start; padding: 22px 20px; }
    .bl-article__layout { padding-bottom: 56px; }

    .bl-more { padding: 56px 0; }
    .bl-more__title, .bl-news__title { font-size: 36px; line-height: 36px; }
    .bl-news { padding: 56px 0; }
    .bl-news__row { flex-direction: column; }
    .bl-news__input { flex: none; width: 100%; height: 54px; }
    .bl-news__btn { flex: none; width: 100%; height: 54px; }
}
