/*
 * BananaBlocks resources hub: single posts, the Posts page, category, tag and date archives
 * (single.php, template-parts/blog/archive-hub.php, template-parts/resource-card.php, template-parts/related-posts.php).
 * Plain CSS on the bb-ui.css tokens (--bbx-*), so it works without a Tailwind rebuild. Every class is prefixed `bbr-`.
 * Loaded only on blog views (inc/blog.php).
 */

:root {
    --bbr-blue: #075dac;
    --bbr-gold-text: #8a6500;
    --bbr-header: 96px;
    --bbr-measure: 46rem;
}

.bbr-page { background: var(--bbx-paper); color: var(--bbx-text); }
.bbr-icon { width: 1em; height: 1em; flex: none; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.bbr-page a:focus-visible, .bbr-page button:focus-visible, .bbr-page summary:focus-visible, .bbr-page input:focus-visible {
    outline: 2px solid var(--bbx-yellow); outline-offset: 3px; border-radius: 0.4rem;
}

/* ── Reading progress ─────────────────────────────── */
.bbr-progress { position: fixed; inset: 0 0 auto; z-index: 60; height: 3px; pointer-events: none; }
.bbr-progress span { display: block; height: 100%; background: var(--bbx-yellow); transform: scaleX(0); transform-origin: 0 50%; }

/* ── Hero ─────────────────────────────────────────── */
.bbr-hero {
    position: relative; overflow: hidden; isolation: isolate;
    padding: calc(var(--bbr-header) + clamp(2rem, 5vw, 3.5rem)) 0 clamp(3rem, 6vw, 4.5rem);
    background: var(--bbx-ink); color: #fff;
}
.bbr-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background:
        radial-gradient(circle at 12% 0%, rgb(255 205 0 / 0.16), transparent 38%),
        radial-gradient(circle at 92% 100%, rgb(7 93 172 / 0.28), transparent 42%);
}
.bbr-hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.35;
    background-image: linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at top, #000 25%, transparent 72%);
    mask-image: radial-gradient(ellipse at top, #000 25%, transparent 72%);
}
.bbr-hero--post { padding-bottom: clamp(7rem, 14vw, 10rem); }
.bbr-hero__inner { max-width: 52rem; }
.bbr-hero--post .bbr-hero__inner { margin: 0 auto; text-align: center; }
.bbr-hero__title {
    margin: 1.1rem 0 0; font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.12;
    font-weight: 800; letter-spacing: -0.025em; color: #fff; text-wrap: balance;
}
.bbr-hero__lead, .bbr-hero__lead p { margin: 1.1rem 0 0; font-size: 1.125rem; line-height: 1.7; color: var(--bbx-slate-300); }
.bbr-hero__lead p:first-child { margin-top: 0; }
.bbr-hero--post .bbr-hero__lead { margin-left: auto; margin-right: auto; max-width: 42rem; }

.bbr-crumbs { margin-bottom: 1.75rem; font-size: 0.85rem; }
.bbr-hero--post .bbr-crumbs { display: flex; justify-content: center; }
.bbr-crumbs ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0; margin: 0; padding: 0; list-style: none; }
.bbr-crumbs li { display: inline-flex; align-items: center; color: var(--bbx-slate-400); }
.bbr-crumbs li + li::before { content: "/"; margin: 0 0.6rem; color: var(--bbx-slate-700); }
.bbr-crumbs a { color: var(--bbx-slate-400); text-decoration: none; transition: color 200ms; }
.bbr-crumbs a:hover { color: var(--bbx-yellow); }
.bbr-crumbs [aria-current] span { color: #e2e8f0; }

/* Byline */
.bbr-byline { display: inline-flex; align-items: center; gap: 0.85rem; margin-top: 2rem; text-align: left; }
.bbr-byline__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgb(255 205 0 / 0.6); background: var(--bbx-slate-800); }
.bbr-byline__text { display: grid; gap: 0.2rem; }
.bbr-byline__name { font-weight: 700; color: #fff; font-size: 0.95rem; }
.bbr-byline__meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.82rem; color: var(--bbx-slate-400); }
.bbr-byline__meta > span { display: inline-flex; align-items: center; gap: 0.35rem; }
.bbr-byline__meta .bbr-icon { color: var(--bbx-yellow); }

/* Chips */
.bbr-chip {
    position: relative; z-index: 2; display: inline-flex; align-items: center; width: fit-content;
    padding: 0.3rem 0.75rem; border-radius: 999px; background: rgb(255 205 0 / 0.16); color: var(--bbr-gold-text);
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
    transition: background 200ms;
}
.bbr-chip:hover { background: rgb(255 205 0 / 0.3); }
.bbr-chip--dark { background: rgb(255 205 0 / 0.1); border: 1px solid rgb(255 205 0 / 0.35); color: var(--bbx-yellow); }
.bbr-chip--dark:hover { background: rgb(255 205 0 / 0.2); }

/* ── Featured image ───────────────────────────────── */
.bbr-cover { margin-top: clamp(-8rem, -11vw, -5rem); position: relative; z-index: 1; }
.bbr-cover__frame {
    max-width: 64rem; margin: 0 auto; overflow: hidden; aspect-ratio: 1200 / 630;
    border-radius: var(--bbx-radius-lg); background: var(--bbx-slate-800);
    box-shadow: 0 30px 60px -20px rgb(15 23 42 / 0.45); border: 1px solid rgb(255 255 255 / 0.08);
}
.bbr-cover__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── Article layout ───────────────────────────────── */
.bbr-body { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem); }
.bbr-layout { display: grid; gap: 3rem; }
.bbr-article { min-width: 0; width: 100%; max-width: var(--bbr-measure); margin: 0 auto; }
.bbr-rail { display: none; }
@media (min-width: 1024px) {
    .bbr-layout { grid-template-columns: 14rem minmax(0, var(--bbr-measure)); justify-content: center; }
    .bbr-layout--no-toc { grid-template-columns: minmax(0, var(--bbr-measure)); }
    .bbr-rail--toc { display: block; }
    .bbr-toc-mobile { display: none; }
}
@media (min-width: 1280px) {
    .bbr-layout { grid-template-columns: 14rem minmax(0, var(--bbr-measure)) 17rem; }
    .bbr-layout--no-toc { grid-template-columns: minmax(0, var(--bbr-measure)) 17rem; }
    .bbr-rail--cta { display: block; }
    .bbr-cta.bbr-cta--compact { display: none; }
}

/* Table of contents */
.bbr-toc { position: sticky; top: calc(var(--bbr-header) + 1.5rem); max-height: calc(100vh - var(--bbr-header) - 3rem); overflow-y: auto; padding-right: 0.5rem; }
.bbr-toc__title, .bbr-toc-mobile summary {
    display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.9rem;
    font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bbx-text);
}
.bbr-toc ol, .bbr-toc-mobile ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--bbx-line); }
.bbr-toc__item a, .bbr-toc-mobile li a {
    display: block; margin-left: -2px; padding: 0.4rem 0 0.4rem 0.9rem; border-left: 2px solid transparent;
    font-size: 0.85rem; line-height: 1.45; color: var(--bbx-text-muted); text-decoration: none;
    transition: color 200ms, border-color 200ms;
}
.bbr-toc__item--h3 a, .bbr-toc-mobile .bbr-toc__item--h3 a { padding-left: 1.75rem; font-size: 0.8rem; }
.bbr-toc__item a:hover, .bbr-toc-mobile li a:hover { color: var(--bbx-text); }
.bbr-toc__item a.is-active { color: var(--bbx-text); font-weight: 700; border-left-color: var(--bbx-yellow); }

.bbr-toc-mobile { margin-bottom: 2rem; padding: 1rem 1.25rem; border: 1px solid var(--bbx-line); border-radius: var(--bbx-radius); background: var(--bbx-paper-2); }
.bbr-toc-mobile summary { margin: 0; cursor: pointer; list-style: none; }
.bbr-toc-mobile summary::-webkit-details-marker { display: none; }
.bbr-toc-mobile summary span { color: var(--bbx-text-muted); font-weight: 600; }
.bbr-toc-mobile summary::after { content: "+"; margin-left: auto; font-size: 1.1rem; }
.bbr-toc-mobile[open] summary { margin-bottom: 0.9rem; }
.bbr-toc-mobile[open] summary::after { content: "–"; }

/* CTA rail */
.bbr-rail__sticky { position: sticky; top: calc(var(--bbr-header) + 1.5rem); display: grid; gap: 1.5rem; }
.bbr-rail__share { padding: 1.25rem; border: 1px solid var(--bbx-line); border-radius: var(--bbx-radius); }

/* ── Prose ────────────────────────────────────────── */
.bbr-prose { font-size: 1.075rem; line-height: 1.8; color: #334155; overflow-wrap: break-word; }
.bbr-prose > * + * { margin-top: 1.35rem; }
.bbr-prose > :first-child { margin-top: 0; }
.bbr-prose h2, .bbr-prose h3, .bbr-prose h4 { color: var(--bbx-text); font-weight: 800; line-height: 1.25; letter-spacing: -0.015em; scroll-margin-top: calc(var(--bbr-header) + 1.5rem); }
.bbr-prose h2 { margin-top: 3rem; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.bbr-prose h3 { margin-top: 2.25rem; font-size: clamp(1.2rem, 2vw, 1.45rem); }
.bbr-prose h4 { margin-top: 1.75rem; font-size: 1.1rem; }
.bbr-prose h2 + *, .bbr-prose h3 + *, .bbr-prose h4 + * { margin-top: 0.85rem; }
.bbr-prose strong { color: var(--bbx-text); font-weight: 700; }
.bbr-prose a { color: var(--bbr-blue); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgb(7 93 172 / 0.35); transition: text-decoration-color 200ms, color 200ms; }
.bbr-prose a:hover { color: #054a8a; text-decoration-color: currentColor; }
.bbr-prose ul, .bbr-prose ol { padding-left: 1.4rem; }
.bbr-prose ul { list-style: disc; }
.bbr-prose ol { list-style: decimal; }
.bbr-prose li + li { margin-top: 0.45rem; }
.bbr-prose li::marker { color: var(--bbr-gold-text); font-weight: 700; }
.bbr-prose blockquote {
    margin-left: 0; margin-right: 0; padding: 1.25rem 1.5rem; border-left: 4px solid var(--bbx-yellow);
    border-radius: 0 var(--bbx-radius) var(--bbx-radius) 0; background: #fffbea; color: var(--bbx-text); font-size: 1.1rem;
}
.bbr-prose blockquote p { margin: 0; }
.bbr-prose code { padding: 0.15rem 0.4rem; border-radius: 0.375rem; background: #f1f5f9; color: #0f172a; font-size: 0.9em; }
.bbr-prose pre { overflow-x: auto; padding: 1.1rem 1.25rem; border-radius: 0.75rem; background: var(--bbx-ink); color: #e2e8f0; font-size: 0.9rem; line-height: 1.65; }
.bbr-prose pre code { padding: 0; background: transparent; color: inherit; }
.bbr-prose img, .bbr-prose .wp-block-image img { height: auto; border-radius: var(--bbx-radius); }
.bbr-prose figure { margin-left: 0; margin-right: 0; }
.bbr-prose figcaption { margin-top: 0.6rem; font-size: 0.85rem; color: var(--bbx-text-muted); text-align: center; }
.bbr-prose hr { border: 0; border-top: 1px solid var(--bbx-line); margin: 2.5rem 0; }
.bbr-prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.bbr-prose th, .bbr-prose td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--bbx-line); text-align: left; vertical-align: top; }
.bbr-prose th { background: var(--bbx-paper-2); color: var(--bbx-text); font-weight: 700; }
.bbr-prose .wp-block-table { overflow-x: auto; }

/* ── Article footer: tags + share ─────────────────── */
.bbr-article__footer { display: grid; gap: 1.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--bbx-line); }
.bbr-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.bbr-tags__label, .bbr-share__label { margin-right: 0.5rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bbx-text); }
.bbr-tag { padding: 0.35rem 0.8rem; border: 1px solid var(--bbx-line); border-radius: 999px; font-size: 0.85rem; color: var(--bbx-text-muted); text-decoration: none; transition: border-color 200ms, color 200ms; }
.bbr-tag:hover { border-color: var(--bbx-text); color: var(--bbx-text); }
.bbr-share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.bbr-share__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.bbr-rail__share .bbr-share__label { display: block; margin: 0 0 0.75rem; }
.bbr-share__btn {
    display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem;
    border: 1px solid var(--bbx-line); border-radius: 50%; background: var(--bbx-paper); color: var(--bbx-text);
    font-size: 1rem; cursor: pointer; transition: background 200ms, border-color 200ms, transform 200ms var(--bbx-ease);
}
.bbr-share__btn:hover { background: var(--bbx-yellow); border-color: var(--bbx-yellow); transform: translateY(-2px); }
.bbr-share__status { font-size: 0.8rem; color: var(--bbx-text-muted); }

/* ── CTA boxes ────────────────────────────────────── */
.bbr-cta {
    position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 0.75rem;
    margin: 3rem 0; padding: clamp(1.75rem, 4vw, 2.5rem); border-radius: var(--bbx-radius-lg);
    background: var(--bbx-ink); color: var(--bbx-slate-300);
}
.bbr-cta::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(circle at 100% 0%, rgb(255 205 0 / 0.22), transparent 45%), radial-gradient(circle at 0% 100%, rgb(7 93 172 / 0.3), transparent 50%);
}
.bbr-cta__eyebrow { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bbx-yellow); }
.bbr-cta__title { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.65rem); font-weight: 800; line-height: 1.25; letter-spacing: -0.015em; color: #fff; }
.bbr-cta__text { margin: 0; max-width: 34rem; line-height: 1.65; }
.bbr-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 0.75rem; }
.bbr-cta__link { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgb(255 255 255 / 0.35); }
.bbr-cta__link:hover { color: var(--bbx-yellow); }
.bbr-cta--rail { margin: 0; padding: 1.5rem; }
.bbr-cta--rail .bbr-cta__title { font-size: 1.2rem; }
.bbr-cta--rail .bbr-cta__text { font-size: 0.9rem; }
.bbr-cta--rail .bbx-btn { width: 100%; }
.bbr-cta--compact { margin: 2.5rem 0; padding: 1.5rem 1.75rem; }
.bbr-cta--compact .bbr-cta__title { font-size: 1.2rem; }
.bbr-cta--banner { margin: 0; }
@media (min-width: 900px) {
    .bbr-cta--banner { grid-template-columns: 1fr auto; column-gap: 3rem; align-items: center; padding: 2.5rem 3rem; }
    .bbr-cta--banner .bbr-cta__eyebrow, .bbr-cta--banner .bbr-cta__title, .bbr-cta--banner .bbr-cta__text { grid-column: 1; }
    .bbr-cta--banner .bbr-cta__actions { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
}

/* ── Author box ───────────────────────────────────── */
.bbr-author { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; padding: 1.75rem; border: 1px solid var(--bbx-line); border-radius: var(--bbx-radius-lg); background: var(--bbx-paper-2); }
.bbr-author__avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--bbx-yellow); background: var(--bbx-line); }
.bbr-author__kicker { margin: 0; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bbr-gold-text); }
.bbr-author__name { margin: 0.2rem 0 0; font-size: 1.2rem; font-weight: 800; color: var(--bbx-text); }
.bbr-author__bio { margin: 0.5rem 0 0.75rem; line-height: 1.65; color: var(--bbx-text-muted); }

/* Previous / next */
.bbr-postnav { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 640px) { .bbr-postnav { grid-template-columns: 1fr 1fr; } }
.bbr-postnav__link { display: grid; gap: 0.4rem; padding: 1.25rem; border: 1px solid var(--bbx-line); border-radius: var(--bbx-radius); text-decoration: none; transition: border-color 200ms, box-shadow 200ms; }
.bbr-postnav__link:hover { border-color: var(--bbx-text); box-shadow: var(--bbx-shadow); }
.bbr-postnav__link--next { text-align: right; }
.bbr-postnav__dir { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bbx-text-muted); }
.bbr-postnav__link--next .bbr-postnav__dir { justify-content: flex-end; }
.bbr-postnav__title { font-weight: 700; line-height: 1.4; color: var(--bbx-text); }

/* ── Section heads, links ─────────────────────────── */
.bbr-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
.bbr-section-head--center { justify-content: center; text-align: center; }
.bbr-kicker { display: block; margin-bottom: 0.4rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bbr-gold-text); }
.bbr-section-title { margin: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; color: var(--bbx-text); }
.bbr-more { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; color: var(--bbx-text); text-decoration: none; }
.bbr-more .bbr-icon { transition: transform 200ms var(--bbx-ease); }
.bbr-more:hover { color: var(--bbr-blue); }
.bbr-more:hover .bbr-icon { transform: translateX(3px); }

/* ── Cards ────────────────────────────────────────── */
.bbr-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .bbr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .bbr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bbr-grid__cta { grid-column: 1 / -1; }

.bbr-card {
    position: relative; display: flex; flex-direction: column; overflow: hidden; height: 100%;
    border: 1px solid var(--bbx-line); border-radius: var(--bbx-radius-lg); background: var(--bbx-paper);
    transition: transform 300ms var(--bbx-ease), box-shadow 300ms var(--bbx-ease), border-color 300ms;
}
.bbr-card:hover { transform: translateY(-4px); box-shadow: var(--bbx-shadow-lift); border-color: transparent; }
.bbr-card__media { display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: var(--bbx-paper-2); }
.bbr-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--bbx-ease); }
.bbr-card:hover .bbr-card__media img { transform: scale(1.05); }
.bbr-card__body { display: flex; flex: 1; flex-direction: column; gap: 0.75rem; padding: 1.4rem 1.5rem 1.5rem; }
.bbr-card__title { margin: 0; font-size: 1.125rem; font-weight: 800; line-height: 1.35; letter-spacing: -0.01em; color: var(--bbx-text); }
.bbr-card__title a { color: inherit; text-decoration: none; }
.bbr-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bbr-card:hover .bbr-card__title a { color: var(--bbr-blue); }
.bbr-card__excerpt { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--bbx-text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bbr-card__meta { display: flex; align-items: center; gap: 0.6rem; margin-top: auto; padding-top: 0.5rem; font-size: 0.8rem; color: var(--bbx-text-muted); }
.bbr-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.bbr-card[hidden] { display: none; }

/* ── Related resources ────────────────────────────── */
.bbr-related { padding: clamp(3.5rem, 7vw, 5.5rem) 0; background: var(--bbx-paper-2); border-top: 1px solid var(--bbx-line); }

/* ── Hub hero ─────────────────────────────────────── */
.bbr-hero__grid { display: grid; gap: 2.5rem; align-items: end; }
@media (min-width: 1024px) { .bbr-hero__grid { grid-template-columns: minmax(0, 1fr) auto; } }
.bbr-hero--hub .bbr-hero__title { margin-top: 0; }
.bbr-hero .bbx-eyebrow { color: var(--bbx-yellow); border: 1px solid rgb(255 205 0 / 0.3); background: rgb(255 205 0 / 0.08); }
.bbr-search {
    display: flex; align-items: center; gap: 0.5rem; max-width: 34rem; margin-top: 2rem; padding: 0.4rem 0.4rem 0.4rem 1rem;
    border: 1px solid rgb(255 255 255 / 0.14); border-radius: 0.9rem; background: rgb(255 255 255 / 0.06);
    transition: border-color 200ms, background 200ms;
}
.bbr-search:focus-within { border-color: var(--bbx-yellow); background: rgb(255 255 255 / 0.09); }
.bbr-search > .bbr-icon { color: var(--bbx-slate-400); font-size: 1.1rem; }
.bbr-search input { flex: 1; min-width: 0; height: 2.75rem; border: 0; background: transparent; color: #fff; font: inherit; font-size: 0.95rem; outline: none; }
.bbr-search input::placeholder { color: var(--bbx-slate-400); }
.bbr-search .bbx-btn { min-height: 2.75rem; padding: 0 1.25rem; }
.bbr-search input:focus-visible { outline: none; }
.bbr-hero__stats { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.bbr-hero__stats li {
    display: grid; gap: 0.15rem; min-width: 7.5rem; padding: 1rem 1.25rem;
    border: 1px solid rgb(255 255 255 / 0.1); border-radius: var(--bbx-radius); background: rgb(30 41 59 / 0.5);
}
.bbr-hero__stats strong { font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--bbx-yellow); }
.bbr-hero__stats span { font-size: 0.8rem; color: var(--bbx-slate-400); }

/* Sticky category bar */
.bbr-filterbar { position: sticky; top: var(--bbr-header); z-index: 40; background: rgb(255 255 255 / 0.92); border-bottom: 1px solid var(--bbx-line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.bbr-filterbar__row { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.85rem 0; scrollbar-width: none; scroll-snap-type: x proximity; }
.bbr-filterbar__row::-webkit-scrollbar { display: none; }
.bbr-pill {
    flex: none; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.5rem 1rem; scroll-snap-align: start;
    border: 1px solid var(--bbx-line); border-radius: 999px; background: var(--bbx-paper);
    font: inherit; font-size: 0.875rem; font-weight: 600; color: var(--bbx-text-muted); text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: border-color 200ms, color 200ms, background 200ms;
}
.bbr-pill:hover { border-color: var(--bbx-text); color: var(--bbx-text); }
.bbr-pill[aria-current="page"], .bbr-pill[aria-pressed="true"] { background: var(--bbx-ink-2); border-color: var(--bbx-ink-2); color: #fff; }
.bbr-pill__count { padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--bbx-paper-2); font-size: 0.72rem; color: var(--bbx-text-muted); }
.bbr-pill[aria-current="page"] .bbr-pill__count { background: var(--bbx-yellow); color: var(--bbx-ink-2); }
.bbr-levels { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ── Hub body ─────────────────────────────────────── */
.bbr-hub { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem); }
.bbr-hub > .bbx-wrap { display: grid; gap: clamp(3rem, 7vw, 4.5rem); }

.bbr-featured { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .bbr-featured { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); } }
.bbr-feature { position: relative; display: grid; overflow: hidden; border-radius: var(--bbx-radius-lg); background: var(--bbx-ink); color: var(--bbx-slate-300); box-shadow: var(--bbx-shadow); }
.bbr-feature__media { display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: var(--bbx-slate-800); }
.bbr-feature__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--bbx-ease); }
.bbr-feature:hover .bbr-feature__media img { transform: scale(1.04); }
.bbr-feature__body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; padding: clamp(1.75rem, 3vw, 2.25rem); }
.bbr-feature__badge { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bbx-slate-400); }
.bbr-feature .bbr-chip { background: rgb(255 205 0 / 0.12); color: var(--bbx-yellow); }
.bbr-feature__title { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; color: #fff; }
.bbr-feature__title a { color: inherit; text-decoration: none; }
.bbr-feature__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bbr-feature:hover .bbr-feature__title a { color: var(--bbx-yellow); }
.bbr-feature__excerpt { margin: 0; line-height: 1.65; color: var(--bbx-slate-400); }
.bbr-feature .bbr-card__meta { margin-top: 0; padding-top: 0; color: var(--bbx-slate-400); }
.bbr-feature .bbr-more { color: var(--bbx-yellow); margin-top: auto; }

.bbr-featured__side { display: grid; align-content: start; gap: 1rem; }
.bbr-featured__side .bbr-kicker { margin: 0; }
.bbr-mini { position: relative; display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; align-items: center; padding: 0.75rem; border: 1px solid var(--bbx-line); border-radius: var(--bbx-radius); background: var(--bbx-paper); transition: border-color 200ms, box-shadow 300ms var(--bbx-ease); }
.bbr-mini:hover { border-color: transparent; box-shadow: var(--bbx-shadow-lift); }
.bbr-mini__media { display: block; aspect-ratio: 1200 / 630; overflow: hidden; border-radius: 0.6rem; background: var(--bbx-paper-2); }
.bbr-mini__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bbr-mini__cat { display: block; margin-bottom: 0.25rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bbr-gold-text); }
.bbr-mini__title { margin: 0; font-size: 0.95rem; font-weight: 700; line-height: 1.35; color: var(--bbx-text); }
.bbr-mini__title a { color: inherit; text-decoration: none; }
.bbr-mini__title a::after { content: ""; position: absolute; inset: 0; }
.bbr-mini:hover .bbr-mini__title a { color: var(--bbr-blue); }
.bbr-mini__meta { display: block; margin-top: 0.3rem; font-size: 0.75rem; color: var(--bbx-text-muted); }

.bbr-empty, .bbr-empty-filter { padding: 3rem 1.5rem; border: 1px dashed var(--bbx-line); border-radius: var(--bbx-radius-lg); text-align: center; color: var(--bbx-text-muted); }
.bbr-empty a { color: var(--bbr-blue); font-weight: 700; }
.bbr-empty-filter { margin-top: 1.5rem; }
.bbr-empty-filter[hidden] { display: none; }

/* Pagination (bb_blog_pagination) */
.bbr-pager { display: grid; justify-items: center; gap: 1.1rem; padding-top: 0.5rem; }
.bbr-pager__status { margin: 0; font-size: 0.9rem; color: var(--bbx-text-muted); }
.bbr-pager__status strong { color: var(--bbx-text); }
.bbr-pager__bar {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem;
    border: 1px solid var(--bbx-line); border-radius: 999px; background: var(--bbx-paper); box-shadow: var(--bbx-shadow);
}
.bbr-pager__step {
    display: inline-flex; align-items: center; gap: 0.5rem; height: 2.75rem; padding: 0 1.15rem; border-radius: 999px;
    font-weight: 700; font-size: 0.9rem; color: var(--bbx-text); text-decoration: none;
    transition: background 200ms, color 200ms, transform 200ms var(--bbx-ease);
}
.bbr-pager__step--next { background: var(--bbx-ink-2); color: #fff; }
a.bbr-pager__step:hover { background: var(--bbx-paper-2); }
a.bbr-pager__step--next:hover { background: var(--bbx-yellow); color: var(--bbx-ink-2); }
a.bbr-pager__step:hover .bbr-icon { transform: translateX(-3px); }
a.bbr-pager__step--next:hover .bbr-icon { transform: translateX(3px); }
.bbr-pager__step .bbr-icon { transition: transform 200ms var(--bbx-ease); }
.bbr-pager__step.is-disabled { opacity: 0.35; cursor: default; }
.bbr-pager__step--next.is-disabled { background: var(--bbx-paper-2); color: var(--bbx-text); }
.bbr-pager__pages { display: flex; align-items: center; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.bbr-pager__num {
    display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; height: 2.75rem; padding: 0 0.6rem;
    border-radius: 999px; font-weight: 700; font-size: 0.9rem; color: var(--bbx-text-muted); text-decoration: none;
    transition: background 200ms, color 200ms;
}
a.bbr-pager__num:hover { background: var(--bbx-paper-2); color: var(--bbx-text); }
.bbr-pager__num.is-current { background: var(--bbx-yellow); color: var(--bbx-ink-2); box-shadow: 0 8px 20px -8px rgb(255 205 0 / 0.8); }
.bbr-pager__gap { min-width: 1.5rem; text-align: center; color: var(--bbx-text-muted); }
.bbr-pager__compact { display: none; padding: 0 0.75rem; font-size: 0.875rem; font-weight: 700; color: var(--bbx-text); white-space: nowrap; }
.bbr-pager__progress { width: min(16rem, 70%); height: 4px; border-radius: 999px; background: var(--bbx-line); overflow: hidden; }
.bbr-pager__progress span { display: block; height: 100%; border-radius: inherit; background: var(--bbx-yellow); }
@media (max-width: 639px) {
    .bbr-pager__pages { display: none; }
    .bbr-pager__compact { display: inline; }
    .bbr-pager__step { padding: 0 0.9rem; }
    .bbr-pager__step:not(.bbr-pager__step--next) span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bbr-pager__step .bbr-icon { transition: none; } }

/* Topics */
.bbr-topics__list { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .bbr-topics__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .bbr-topics__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bbr-topics__list a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.15rem 1rem; padding: 1rem 1.25rem; border: 1px solid var(--bbx-line); border-radius: var(--bbx-radius); text-decoration: none; transition: border-color 200ms, background 200ms; }
.bbr-topics__list a:hover { border-color: var(--bbx-text); background: var(--bbx-paper-2); }
.bbr-topics__name { font-weight: 700; color: var(--bbx-text); }
.bbr-topics__count { grid-column: 1; font-size: 0.8rem; color: var(--bbx-text-muted); }
.bbr-topics__list .bbr-icon { grid-column: 2; grid-row: 1 / span 2; color: var(--bbx-text-muted); }

/* About this category + FAQ */
.bbr-about { padding: clamp(3.5rem, 7vw, 5rem) 0; border-top: 1px solid var(--bbx-line); }
.bbr-about__grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .bbr-about__grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 4rem; align-items: start; } }
.bbr-about .bbr-prose h2 { margin-top: 0; }
.bbr-proof { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.bbr-proof li { display: flex; gap: 0.9rem; padding: 1.25rem; border-radius: var(--bbx-radius); background: var(--bbx-paper-2); border: 1px solid var(--bbx-line); }
.bbr-proof .bbr-icon { width: 1.6rem; height: 1.6rem; padding: 0.3rem; border-radius: 50%; background: var(--bbx-yellow); color: var(--bbx-ink-2); }
.bbr-proof strong { display: block; color: var(--bbx-text); }
.bbr-proof span { display: block; margin-top: 0.2rem; font-size: 0.9rem; line-height: 1.55; color: var(--bbx-text-muted); }
.bbr-faq { padding: clamp(3.5rem, 7vw, 5rem) 0; background: var(--bbx-paper-2); }

@media (prefers-reduced-motion: reduce) {
    .bbr-card, .bbr-card__media img, .bbr-feature__media img, .bbr-share__btn, .bbr-more .bbr-icon { transition: none; }
    .bbr-card:hover, .bbr-share__btn:hover { transform: none; }
    .bbr-card:hover .bbr-card__media img, .bbr-feature:hover .bbr-feature__media img { transform: none; }
}
