/* BFU Blog — single article reading layout (v1.1.1)
   Soft paper background, one white page for the article, Source Serif reading type,
   Cormorant Garamond headings in navy. Dark boxes (BFU Post CTA .bfu-cta, any <aside>,
   inline-styled callouts) keep their own colors. */

/* html + body beats BFU Member Nav's body.bfu-nav gradient (also !important). */
html body.single-post,
html body.single-post.bfu-nav {
    background: #FBF8F1 !important;
    background-image: none !important;
}
body.single-post #content,
body.single-post .site-content { background: transparent; }
/* The theme sets body and #page to overflow-x:hidden / overflow-y:auto, which makes them
   scroll containers that never scroll, so position:sticky pins to them and rides away.
   clip hides sideways overflow without creating a scroll container. */
html body.single-post,
html body.single-post #page.site,
html body.single-post #content,
html body.single-post .container,
html body.single-post .bb-grid.site-content-grid {
    overflow-x: visible !important; /* fallback where clip is unsupported */
    overflow-x: clip !important;
    overflow-y: visible !important;
}

.bfu-read {
    --r-paper: #FBF8F1;
    --r-sheet: #FFFFFF;
    --r-ink: #16181D;
    --r-navy: #001743;
    --r-navy-2: #1A3A6B;
    --r-gold: #A87C0E;
    --r-gold-hi: #F0C040;
    --r-muted: #5F5A4E;
    --r-hair: #E6DCC6;
    --r-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --r-read: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --r-ui: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 0 72px;
    color: var(--r-ink);
    font-family: var(--r-ui);
}
.bfu-read *, .bfu-read *::before, .bfu-read *::after { box-sizing: border-box; }
/* BuddyBoss caps single posts at 800px (.bb-grid max-width); lift it for the reading layout. */
html body.single-post .bb-grid.site-content-grid { max-width: 1280px; width: 100%; margin-left: auto; margin-right: auto; }
body.single-post .bb-grid > .bfu-read.content-area,
body.single-post .bfu-read.content-area { flex: 1 1 100%; width: 100%; max-width: 1280px; margin-left: auto; margin-right: auto; }
.bfu-read p { margin: 0; }

.bfu-read__back { margin-bottom: 16px !important; font: 700 14px/1 var(--r-ui); }
.bfu-read .bfu-read__back a { color: var(--r-navy-2); text-decoration: none; }
.bfu-read .bfu-read__back a:hover { color: var(--r-gold); }

/* The page */
.bfu-read__sheet {
    padding: 44px clamp(22px, 6vw, 64px) 36px;
    background: var(--r-sheet);
    border: 1px solid var(--r-hair);
    border-radius: 22px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 12px 30px rgba(40, 30, 5, .07);
}
.bfu-read__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px !important;
    font: 800 11.5px/1.4 var(--r-ui);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--r-gold);
}
.bfu-read__meta time { color: var(--r-navy-2); }
.bfu-read__meta span[aria-hidden] { color: var(--r-hair); }
.bfu-read .bfu-read__title {
    margin: 0 0 16px;
    font: 700 clamp(34px, 4.6vw, 50px)/1.06 var(--r-display);
    color: var(--r-navy);
    text-wrap: balance;
}
.bfu-read__dek {
    max-width: 70ch;
    margin-bottom: 28px !important;
    font: italic 400 19px/1.55 var(--r-read);
    color: var(--r-muted);
}
.bfu-read__hero { margin: 0 0 34px; }
.bfu-read .bfu-read__hero img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
}

/* The article */
.bfu-read .bfu-read__body {
    max-width: 76ch;
    font: 400 19px/1.78 var(--r-read);
    color: var(--r-ink);
}
.bfu-read .bfu-read__body p:not(.bfu-cta *):not(aside *) {
    margin: 0 0 1.1em;
    font: inherit;
    color: var(--r-ink);
}
.bfu-read .bfu-read__body li:not(.bfu-cta *):not(aside *) {
    font: inherit;
    color: var(--r-ink);
    margin-bottom: .45em;
}
.bfu-read .bfu-read__body ul:not(.bfu-cta *),
.bfu-read .bfu-read__body ol:not(.bfu-cta *) { margin: 0 0 1.2em; padding-left: 1.3em; }
.bfu-read .bfu-read__body h2:not(.bfu-cta *):not(aside *) {
    margin: 1.7em 0 .45em;
    font: 700 31px/1.18 var(--r-display);
    color: var(--r-navy);
    text-wrap: balance;
}
.bfu-read .bfu-read__body h3:not(.bfu-cta *):not(aside *):not([style]),
.bfu-read .bfu-read__body h4:not(.bfu-cta *):not(aside *):not([style]) {
    margin: 1.4em 0 .35em;
    font: 700 23px/1.3 var(--r-display);
    color: var(--r-navy);
}
.bfu-read .bfu-read__body strong:not(.bfu-cta *):not(aside *),
.bfu-read .bfu-read__body b:not(.bfu-cta *):not(aside *) { font-weight: 700; color: #000; }
.bfu-read .bfu-read__body a:not([style]):not(.bfu-cta *):not(aside *) {
    color: var(--r-navy-2);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--r-gold-hi);
    text-underline-offset: 3px;
}
.bfu-read .bfu-read__body a:not([style]):not(.bfu-cta *):not(aside *):hover { color: var(--r-gold); }
.bfu-read .bfu-read__body blockquote:not(.bfu-cta *) {
    margin: 1.5em 0;
    padding: 2px 0 2px 22px;
    border-left: 4px solid var(--r-gold-hi);
    background: none;
    font-style: italic;
    color: var(--r-navy);
}
.bfu-read .bfu-read__body blockquote p { color: var(--r-navy) !important; margin: 0 0 .4em; }
.bfu-read .bfu-read__body img { max-width: 100%; height: auto; border-radius: 12px; }
.bfu-read .bfu-read__body div[style] { max-width: 100%; }
.bfu-read .bfu-read__body div[style] p:last-child { margin-bottom: 0; }

/* Older posts carry their own title banner and author box inside the text */
.bfu-read .bfu-read__body .header-banner,
.bfu-read .bfu-read__body .author-box { display: none; }

/* Author */
.bfu-read__foot { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--r-hair); }
.bfu-read__author { display: flex; align-items: center; gap: 14px; }
.bfu-read__author img { width: 56px; height: 56px; border-radius: 50%; }
.bfu-read__author-name { font: 700 22px/1.2 var(--r-display); color: var(--r-navy); }
.bfu-read__author-role { font: 600 13px/1.4 var(--r-ui); color: var(--r-muted); }

/* Previous / next */
.bfu-read__more { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.bfu-read .bfu-read__nav {
    display: grid;
    gap: 6px;
    padding: 18px 20px;
    background: var(--r-sheet);
    border: 1px solid var(--r-hair);
    border-radius: 16px;
    text-decoration: none;
    color: var(--r-ink);
}
.bfu-read .bfu-read__nav:hover { border-color: var(--r-gold-hi); }
.bfu-read__nav--next { text-align: right; grid-column: 2; }
.bfu-read__nav-k { font: 800 11.5px/1 var(--r-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--r-gold); }
.bfu-read__nav-t { font: 700 19px/1.25 var(--r-display); color: var(--r-navy); }
.bfu-read__comments { margin-top: 32px; }

.bfu-read a:focus-visible { outline: 3px solid var(--r-gold-hi); outline-offset: 2px; border-radius: 6px; }

/* Article + sticky Freedom Quiz rail */
.bfu-read__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: start;
}
.bfu-read__main { min-width: 0; }
.bfu-read__rail {
    position: sticky;
    top: 110px;
    padding-top: 30px; /* lines the card up with the white page, below the back link */
}
/* Tall vertical panel: about three-quarters of the screen, always in view while scrolling. */
.bfu-read .bfu-quiz--rail {
    min-height: min(75vh, calc(100vh - 150px));
    height: auto;
    gap: 13px;
    align-content: space-between;
    grid-template-rows: auto auto auto 1fr auto auto;
    padding: 34px 26px 28px;
}
.bfu-read .bfu-quiz {
    display: grid;
    gap: 14px;
    padding: 28px 24px 24px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 85% 0%, rgba(240, 192, 64, .22), transparent 55%),
        linear-gradient(165deg, #001743 0%, #0a2d5e 100%);
    border-top: 4px solid var(--r-gold-hi);
    box-shadow: 0 14px 34px rgba(0, 23, 67, .22);
    color: #fff;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}
.bfu-read .bfu-quiz:hover,
.bfu-read .bfu-quiz:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 20px 44px rgba(0, 23, 67, .32), 0 0 0 3px rgba(240, 192, 64, .55);
}
.bfu-quiz__eyebrow { font: 800 11.5px/1 var(--r-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--r-gold-hi); }
.bfu-quiz__title { font: 700 30px/1.08 var(--r-display); color: #fff; }
.bfu-read .bfu-quiz--rail .bfu-quiz__title { font-size: 31px; }
.bfu-quiz__title em { font-style: italic; color: var(--r-gold-hi); }
.bfu-quiz__sub { font: 400 15.5px/1.55 var(--r-read); color: rgba(255, 255, 255, .85); }
.bfu-quiz__btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 50px;
    margin-top: 4px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--r-gold-hi);
    color: #001743;
    font: 800 15px/1 var(--r-ui);
    transition: background-color .15s ease;
}
.bfu-read .bfu-quiz:hover .bfu-quiz__btn { background: #FBE066; }
.bfu-quiz__points { display: grid; gap: 14px; align-content: center; padding: 18px 0; border-top: 1px solid rgba(240, 192, 64, .25); border-bottom: 1px solid rgba(240, 192, 64, .25); }
.bfu-quiz__pt { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font: 600 15px/1.4 var(--r-ui); color: #fff; }
.bfu-quiz__lead { font: 800 12px/1 var(--r-ui); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.bfu-quiz__pt strong { color: var(--r-gold-hi); font-weight: 800; }
.bfu-quiz__ck { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(240, 192, 64, .18); color: var(--r-gold-hi); font-size: 13px; font-weight: 800; }
.bfu-read .bfu-quiz--inline .bfu-quiz__points { padding: 12px 0; }
.bfu-quiz__note { text-align: center; font: 600 12.5px/1 var(--r-ui); color: rgba(255, 255, 255, .6); }
.bfu-read .bfu-quiz--inline { display: none; margin-top: 24px; }

@media (max-width: 1100px) {
    .bfu-read__layout { grid-template-columns: minmax(0, 1fr); }
    .bfu-read__rail { display: none; }
    .bfu-read .bfu-quiz--inline { display: grid; }
    .bfu-read { max-width: 920px; }
}
@media (prefers-reduced-motion: reduce) {
    .bfu-read .bfu-quiz, .bfu-read .bfu-quiz:hover { transition: none; transform: none; }
}

@media (max-width: 700px) {
    .bfu-read { padding: 16px 0 56px; }
    .bfu-read__sheet { border-radius: 16px; padding-top: 30px; }
    .bfu-read .bfu-read__body { font-size: 18px; }
    .bfu-read__more { grid-template-columns: 1fr; }
    .bfu-read__nav--next { grid-column: auto; text-align: left; }
}
