/* =====================================================
   BILIPEDIA - BLOG ARTICLE
   -----------------------------------------------------
   The reading experience: a measured content column,
   a sticky table of contents, proper typographic rhythm,
   responsive video embeds, a share bar and related posts
   — the layout professional publications use.
===================================================== */

.bp-article-page { max-width: 1180px; margin-inline: auto; }

/* -----------------------------------------------------
   READING PROGRESS BAR
----------------------------------------------------- */
.bp-read-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1030;
    background: transparent;
    pointer-events: none;
}

.bp-read-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--gradient, linear-gradient(135deg, #fe3372, #fe3372));
    transition: width .1s linear;
}

/* -----------------------------------------------------
   ARTICLE HEADER
----------------------------------------------------- */
.bp-article-head {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
}

.bp-article-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--pink, #fe3372);
    background: var(--pink-dim, rgba(254, 51, 114, .1));
    padding: 6px 13px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.bp-article-title {
    font-size: clamp(28px, 4.2vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: var(--text, #14151a);
    margin: 0 0 16px;
}

.bp-article-standfirst {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-2, #52525b);
    margin: 0 0 22px;
    max-width: 660px;
    margin-inline: auto;
}

/* Byline row */
.bp-article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13.5px;
    color: var(--text-3, #8b8b96);
    padding-top: 20px;
    border-top: 1px solid var(--border, rgba(20, 21, 26, .09));
}

.bp-article-author { display: flex; align-items: center; gap: 10px; text-align: left; }

.bp-article-avatar {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient, linear-gradient(135deg, #fe3372, #fe3372));
    color: #fff;
    font-weight: 800;
    font-size: 15px;
}

.bp-article-author strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text, #14151a);
    line-height: 1.4;
}

.bp-article-author time { display: block; font-size: 12.5px; color: var(--text-3, #8b8b96); }

.bp-article-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border, rgba(20, 21, 26, .2));
}

.bp-article-readtime,
.bp-article-updated { display: inline-flex; align-items: center; gap: 5px; }

/* -----------------------------------------------------
   ASK AI / TL;DR WIDGET
----------------------------------------------------- */
.bp-ai-tldr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin: 0 0 34px;
    padding: 22px 26px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, rgba(20, 21, 26, .09));
    border-radius: var(--radius-lg, 18px);
    box-shadow: var(--shadow, 0 4px 24px rgba(20, 21, 26, .06));
}

.bp-ai-tldr-copy { flex: 1 1 240px; min-width: 0; }

.bp-ai-tldr-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text, #14151a);
    letter-spacing: -0.2px;
    margin: 0 0 4px;
}

.bp-ai-tldr-sub {
    font-size: 13.5px;
    color: var(--text-2, #52525b);
    line-height: 1.6;
    margin: 0;
    max-width: 46ch;
}

.bp-ai-tldr-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1 1 320px;
    justify-content: flex-end;
}

.bp-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--bg, #f7f7fa);
    color: var(--text, #14151a);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--ease, all .2s ease);
}

.bp-ai-icon { display: inline-flex; font-size: 14px; line-height: 1; }

.bp-ai-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow, 0 4px 24px rgba(20, 21, 26, .06)); }

.bp-ai-btn-chatgpt { background: #0f0f10; color: #fff; }
.bp-ai-btn-chatgpt:hover { background: #202123; }

.bp-ai-btn-claude { background: var(--pink-dim, rgba(254, 51, 114, .1)); color: var(--pink-dark, #d91f5a); }
.bp-ai-btn-claude:hover { background: var(--pink, #fe3372); color: #fff; }

.bp-ai-btn-perplexity { background: var(--blue-dim, rgba(37, 99, 235, .1)); color: var(--blue, #2563eb); }
.bp-ai-btn-perplexity:hover { background: var(--blue, #2563eb); color: #fff; }

.bp-ai-btn-google {
    background: var(--bg-card, #fff);
    border-color: var(--border, rgba(20, 21, 26, .09));
    color: var(--text-2, #52525b);
}
.bp-ai-btn-google:hover { border-color: var(--border-pink, rgba(254, 51, 114, .35)); color: var(--pink, #fe3372); }

@media (max-width: 640px) {
    .bp-ai-tldr { flex-direction: column; align-items: stretch; padding: 18px 18px 20px; gap: 16px; }
    .bp-ai-tldr-btns { justify-content: flex-start; }
    .bp-ai-btn { flex: 1 1 calc(50% - 5px); justify-content: center; }
}

@media (max-width: 380px) {
    .bp-ai-btn { flex: 1 1 100%; }
}

/* -----------------------------------------------------
   FEATURED IMAGE
----------------------------------------------------- */
.bp-article-hero { margin: 0 0 34px; }

.bp-article-hero img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-lg, 18px);
    display: block;
    box-shadow: var(--shadow, 0 4px 24px rgba(20, 21, 26, .06));
}

.bp-article-hero figcaption {
    font-size: 12.5px;
    color: var(--text-3, #8b8b96);
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

/* -----------------------------------------------------
   BODY LAYOUT: content column (left) + sticky sidebar (right)
----------------------------------------------------- */
.bp-article-body-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 44px;
    align-items: start;
    max-width: 1060px;
    margin-inline: auto;
}

.bp-article-body { min-width: 0; }

/* -----------------------------------------------------
   RIGHT SIDEBAR: TOC + Google source card + latest PDFs
----------------------------------------------------- */
.bp-article-sidebar {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.bp-article-toc {
    background: var(--bg-card, #fff);
    border: 1.5px solid var(--border, rgba(20, 21, 26, .09));
    border-radius: var(--radius-lg, 14px);
    padding: 18px 20px 20px;
}

.bp-toc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--pink, #fe3372);
}

.bp-toc-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--text, #14151a);
    margin: 0;
}

.bp-toc-social { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.bp-toc-social a {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(20, 21, 26, .05);
    color: var(--text-2, #52525b);
    font-size: 12.5px;
    text-decoration: none;
    transition: var(--ease, .2s ease);
}

.bp-toc-social a:hover { background: var(--pink, #fe3372); color: #fff; }

.bp-toc-link {
    position: relative;
    display: block;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-2, #52525b);
    text-decoration: none;
    padding: 6px 0 6px 18px;
    transition: color .2s ease;
}

.bp-toc-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 13px;
    width: 6px;
    height: 6px;
    background: var(--pink, #fe3372);
}

.bp-toc-link:hover { color: var(--pink, #fe3372); }

.bp-toc-link.active {
    color: var(--pink, #fe3372);
    font-weight: 600;
}

.bp-toc-l3 { padding-left: 30px; font-size: 13px; opacity: .88; }
.bp-toc-l3::before { left: 12px; }

/* -----------------------------------------------------
   CONTENT TYPOGRAPHY
   Overrides the compact defaults in style.css with a
   proper long-form reading rhythm.
----------------------------------------------------- */
.bp-article-content {
    font-size: 17px !important;
    line-height: 1.85 !important;
    color: #2c2c35 !important;
}

.bp-article-content > *:first-child { margin-top: 0 !important; }

/* Opening paragraph gets a little more presence */
.bp-article-content > p:first-of-type {
    font-size: 18.5px;
    line-height: 1.8;
    color: #1f1f28;
}

.bp-article-content p { margin-bottom: 22px !important; }

.bp-article-content h2 {
    font-size: 27px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    letter-spacing: -.01em;
    color: var(--text, #14151a) !important;
    margin: 44px 0 16px !important;
    scroll-margin-top: 90px;
}

.bp-article-content h3 {
    font-size: 21px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: var(--text, #14151a) !important;
    margin: 34px 0 12px !important;
    scroll-margin-top: 90px;
}

.bp-article-content h4 {
    font-size: 17.5px;
    font-weight: 700;
    color: var(--text, #14151a);
    margin: 26px 0 10px;
    scroll-margin-top: 90px;
}

.bp-article-content ul,
.bp-article-content ol { margin: 0 0 22px 24px !important; }

.bp-article-content li { margin-bottom: 10px !important; padding-left: 4px; }

.bp-article-content li::marker { color: var(--pink, #fe3372); }

.bp-article-content a {
    color: var(--pink, #fe3372) !important;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(254, 51, 114, .3);
    transition: border-color .2s ease, background .2s ease;
}

.bp-article-content a:hover {
    border-bottom-color: var(--pink, #fe3372);
    background: rgba(254, 51, 114, .06);
}

.bp-article-content strong { color: var(--text, #14151a); font-weight: 700; }

/* Images inside the article */
.bp-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius, 12px) !important;
    margin: 28px 0 !important;
    display: block;
    box-shadow: 0 2px 16px rgba(20, 21, 26, .07);
}

/* Blockquote */
.bp-article-content blockquote {
    position: relative;
    border-left: 4px solid var(--pink, #fe3372) !important;
    background: rgba(254, 51, 114, .045);
    padding: 20px 24px !important;
    margin: 30px 0 !important;
    border-radius: 0 var(--radius, 12px) var(--radius, 12px) 0;
    font-size: 17.5px;
    line-height: 1.75;
    font-style: italic;
    color: #3a3a45;
}

.bp-article-content blockquote p:last-child { margin-bottom: 0 !important; }

/* Code */
.bp-article-content pre,
.bp-article-content pre.ql-syntax {
    background: #14151a;
    color: #e6e6eb;
    border-radius: var(--radius, 12px);
    padding: 18px 20px;
    margin: 26px 0;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre;
}

.bp-article-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .9em;
    background: rgba(20, 21, 26, .06);
    padding: 2px 6px;
    border-radius: 5px;
    color: #c2185b;
}

.bp-article-content pre code { background: none; padding: 0; color: inherit; }

/* =====================================================
   TABLES — fully responsive, mobile-first
   Outer scroll wrapper injected by PHP (bp-table-wrap).
   On ≤640 px the table switches to a stacked card layout
   using CSS data-label attributes written by JS.
===================================================== */

/* Scroll wrapper — PHP injects this around every <table> */
.bp-table-wrap {
    position: relative;
    margin: 32px 0;
    border-radius: var(--radius-lg, 18px);
    border: 1.5px solid var(--border, rgba(20, 21, 26, .09));
    box-shadow: 0 2px 20px rgba(20, 21, 26, .06);
    overflow: hidden;  /* clips child border-radius */
}

/* Horizontal scroll container */
.bp-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Fade-right hint that there's more content to scroll */
    background:
        linear-gradient(to right, #fff 30%, rgba(255,255,255,0)),
        linear-gradient(to right, rgba(255,255,255,0), #fff 70%) 100% 0,
        radial-gradient(farthest-side at 0 50%, rgba(20,21,26,.08), transparent),
        radial-gradient(farthest-side at 100% 50%, rgba(20,21,26,.08), transparent) 100% 0;
    background-repeat: no-repeat;
    background-color: #fff;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
}

/* The actual <table> */
.bp-article-content table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 14.5px;
    margin: 0;
    display: table; /* override previous display:block */
    min-width: 480px; /* force scroll before cells get too tight */
}

/* Header row */
.bp-article-content thead {
    background: linear-gradient(135deg, #f8f8fb 0%, #f2f2f7 100%);
    position: sticky;
    top: 0;
    z-index: 1;
}

.bp-article-content th {
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-3, #8b8b96);
    padding: 12px 18px;
    text-align: left;
    border-bottom: 1.5px solid var(--border, rgba(20, 21, 26, .09));
    white-space: nowrap;
}

/* First header cell is darker — acts as row-label column marker */
.bp-article-content thead th:first-child {
    color: var(--text, #14151a);
    font-size: 11.5px;
}

/* Body cells */
.bp-article-content td {
    padding: 13px 18px;
    text-align: left;
    color: var(--text-2, #52525b);
    border-bottom: 1px solid var(--border, rgba(20, 21, 26, .06));
    vertical-align: middle;
    line-height: 1.6;
}

.bp-article-content tbody tr:last-child td { border-bottom: none; }

/* Zebra rows */
.bp-article-content tbody tr:nth-child(even) td { background: rgba(20, 21, 26, .017); }

/* Row hover */
.bp-article-content tbody tr:hover td {
    background: rgba(254, 51, 114, .04);
    color: var(--text, #14151a);
    transition: background .15s ease, color .15s ease;
}

/* First column = bold row label */
.bp-article-content td:first-child {
    font-weight: 600;
    color: var(--text, #14151a);
}

/* "Best" / highlighted row — add class="bp-table-highlight" to <tr> */
.bp-article-content tr.bp-table-highlight td {
    background: rgba(254, 51, 114, .05);
}
.bp-article-content tr.bp-table-highlight td:first-child {
    border-left: 3px solid var(--pink, #fe3372);
    padding-left: 15px;
}

/* ---- Caption / footnote ---- */
.bp-article-content .bp-table-caption {
    font-size: 12px;
    color: var(--text-3, #8b8b96);
    padding: 10px 18px;
    border-top: 1px solid var(--border, rgba(20, 21, 26, .07));
    background: rgba(20, 21, 26, .015);
    font-style: italic;
}

/* ---- Mobile stacked layout (≤ 560 px) ----
   JS writes data-label on every <td> from the <th> text.
   The table then becomes a series of card-rows. */
@media (max-width: 560px) {
    .bp-table-scroll { overflow-x: unset; background: none; }

    .bp-article-content table,
    .bp-article-content thead,
    .bp-article-content tbody,
    .bp-article-content th,
    .bp-article-content td,
    .bp-article-content tr {
        display: block;
    }

    /* Hide desktop header row — labels come from data-label */
    .bp-article-content thead tr { display: none; }

    /* Each <tr> becomes a card */
    .bp-article-content tbody tr {
        border: 1px solid var(--border, rgba(20, 21, 26, .09));
        border-radius: var(--radius, 12px);
        margin-bottom: 12px;
        overflow: hidden;
        background: var(--bg-card, #fff);
    }
    .bp-article-content tbody tr:nth-child(even) td { background: transparent; }
    .bp-article-content tbody tr:hover td { background: transparent; }

    /* Each <td> shows its label above the value */
    .bp-article-content td {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        border-bottom: 1px solid var(--border, rgba(20, 21, 26, .06));
        padding: 10px 14px;
        font-size: 13.5px;
    }
    .bp-article-content tbody tr td:last-child { border-bottom: none; }

    /* The label pill — content from JS data-label */
    .bp-article-content td::before {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: var(--pink, #fe3372);
        background: var(--pink-dim, rgba(254, 51, 114, .1));
        border-radius: 5px;
        padding: 2px 7px;
        white-space: nowrap;
        flex-shrink: 0;
        margin-top: 2px;
        min-width: 60px;
        text-align: center;
    }
    .bp-article-content td:first-child { font-weight: 700; }

    /* Highlighted row on mobile */
    .bp-article-content tr.bp-table-highlight {
        border-color: var(--border-pink, rgba(254, 51, 114, .4));
        box-shadow: 0 2px 12px rgba(254, 51, 114, .08);
    }
    .bp-article-content tr.bp-table-highlight td:first-child {
        border-left: none;
        padding-left: 14px;
    }
}

.bp-article-content hr {
    border: none;
    border-top: 1px solid var(--border, rgba(20, 21, 26, .09));
    margin: 40px 0;
}

/* Quill alignment classes, so alignment set in the editor survives */
.bp-article-content .ql-align-center { text-align: center; }
.bp-article-content .ql-align-right  { text-align: right; }
.bp-article-content .ql-align-justify { text-align: justify; }
.bp-article-content .ql-indent-1 { padding-left: 3em; }
.bp-article-content .ql-indent-2 { padding-left: 6em; }
.bp-article-content .ql-indent-3 { padding-left: 9em; }

/* -----------------------------------------------------
   VIDEO EMBED
----------------------------------------------------- */
.bp-video-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;              /* 16:9 */
    margin: 0 0 34px;
    border-radius: var(--radius-lg, 18px);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow, 0 4px 24px rgba(20, 21, 26, .06));
}

.bp-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* TikTok is a vertical format, so it gets its own ratio and
   a capped width rather than a full-bleed 16:9 box. */
.bp-video-tiktok {
    padding-top: 0;
    height: 740px;
    max-width: 340px;
    margin-inline: auto;
}

/* Videos that Quill's own video button inserted into the content */
.bp-article-content iframe.ql-video,
.bp-article-content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: var(--radius, 12px);
    margin: 28px 0;
    display: block;
}

/* -----------------------------------------------------
   SHARE BAR
----------------------------------------------------- */
.bp-article-share {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px 0;
    margin-top: 34px;
    border-top: 1px solid var(--border, rgba(20, 21, 26, .09));
    border-bottom: 1px solid var(--border, rgba(20, 21, 26, .09));
}

.bp-share-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text, #14151a);
}

.bp-share-btns { display: flex; gap: 9px; flex-wrap: wrap; }

.bp-share-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border, rgba(20, 21, 26, .09));
    border-radius: 50%;
    background: var(--bg-card, #fff);
    color: var(--text-2, #52525b);
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--ease, all .2s ease);
}

.bp-share-btn:hover { transform: translateY(-2px); color: #fff; border-color: transparent; }

.bp-share-fb:hover { background: #1877f2; }
.bp-share-wa:hover { background: #25d366; }
.bp-share-li:hover { background: #0a66c2; }
.bp-share-tg:hover { background: #26a5e4; }
.bp-share-copy:hover { background: var(--pink, #fe3372); }
.bp-share-copy.copied { background: #16a34a; color: #fff; border-color: transparent; }

/* -----------------------------------------------------
   RELATED POSTS
----------------------------------------------------- */
.bp-related {
    max-width: 1000px;
    margin: 56px auto 0;
    padding-top: 40px;
    border-top: 1px solid var(--border, rgba(20, 21, 26, .09));
}

.bp-related-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text, #14151a);
    margin: 0 0 22px;
}

.bp-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.bp-related-card {
    display: block;
    text-decoration: none;
    border: 1px solid var(--border, rgba(20, 21, 26, .09));
    border-radius: var(--radius-lg, 18px);
    overflow: hidden;
    background: var(--bg-card, #fff);
    transition: var(--ease, all .2s ease);
}

.bp-related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow, 0 4px 24px rgba(20, 21, 26, .1));
    border-color: var(--border-pink, rgba(254, 51, 114, .35));
}

.bp-related-img {
    height: 148px;
    background-size: cover;
    background-position: center;
    background-color: #f2f2f6;
}

.bp-related-img-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-3, #8b8b96);
}

.bp-related-body { padding: 16px 18px 20px; }

.bp-related-date {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-3, #8b8b96);
    margin-bottom: 7px;
}

.bp-related-body h3 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text, #14151a);
    margin: 0;
}

.bp-related-card:hover h3 { color: var(--pink, #fe3372); }

/* -----------------------------------------------------
   RESPONSIVE
----------------------------------------------------- */
@media (max-width: 992px) {
    /* The sticky sidebar becomes a collapsible block above
       the article, which is how mobile news sites handle it. */
    .bp-article-body-wrap { grid-template-columns: 1fr; gap: 0; max-width: 760px; }

    .bp-article-sidebar {
        position: static;
        max-height: none;
        overflow: visible;
        margin-top: 32px;
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .bp-article-content { font-size: 16.5px !important; }
    .bp-article-content > p:first-of-type { font-size: 17px; }
    .bp-article-content h2 { font-size: 23px !important; margin-top: 36px !important; }
    .bp-article-content h3 { font-size: 19px !important; }
    .bp-article-hero img { max-height: 220px; }
    .bp-article-meta { justify-content: flex-start; }
    .bp-article-head { text-align: left; }
    .bp-article-standfirst { margin-inline: 0; }
    .bp-video-tiktok { height: 620px; max-width: 100%; }
}

/* =====================================================
   BLOG ARTICLE — FAQ / ACCORDION
   - Scoped to blog post and tool-page article contexts
   - <details> / <summary> progressive disclosure
   - Schema.org FAQPage JSON-LD is injected by PHP (post.php)
     so these items are indexed by Google and AI crawlers
===================================================== */

/* ---- FAQ section header (optional <h2> before items) ---- */
.bp-article-content .bp-faq-heading,
.bp-calc-article .bp-faq-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text, #14151a);
    margin: 44px 0 20px;
    letter-spacing: -.02em;
}
.bp-article-content .bp-faq-heading::before,
.bp-calc-article .bp-faq-heading::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    border-radius: 2px;
    background: var(--gradient, linear-gradient(135deg, #fe3372, #fe7043));
    flex-shrink: 0;
}

/* ---- Individual FAQ item (<details class="bp-faq-item">) ---- */
.bp-article-content .bp-faq-item,
.bp-calc-article .bp-faq-item {
    background: var(--bg-card, #fff);
    border: 1.5px solid var(--border, rgba(20, 21, 26, .09));
    border-radius: var(--radius-lg, 18px);
    padding: 0;
    margin-bottom: 10px;
    transition: border-color .2s ease, box-shadow .2s ease;
    overflow: hidden;
}

.bp-article-content .bp-faq-item:hover,
.bp-calc-article .bp-faq-item:hover {
    border-color: var(--border-pink, rgba(254, 51, 114, .35));
    box-shadow: 0 4px 18px rgba(254, 51, 114, .07);
}

.bp-article-content .bp-faq-item[open],
.bp-calc-article .bp-faq-item[open] {
    border-color: var(--border-pink, rgba(254, 51, 114, .4));
    box-shadow: 0 4px 24px rgba(254, 51, 114, .10);
}

/* ---- Summary / question row ---- */
.bp-article-content .bp-faq-item > summary,
.bp-calc-article .bp-faq-item > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text, #14151a);
    cursor: pointer;
    user-select: none;
    /* smooth background on open */
    transition: background .15s ease;
}

.bp-article-content .bp-faq-item[open] > summary,
.bp-calc-article .bp-faq-item[open] > summary {
    background: rgba(254, 51, 114, .03);
    border-bottom: 1px solid var(--border, rgba(20, 21, 26, .07));
}

.bp-article-content .bp-faq-item > summary::-webkit-details-marker,
.bp-calc-article .bp-faq-item > summary::-webkit-details-marker { display: none; }

/* ---- Toggle icon (SVG + / − via inline data URI) ---- */
.bp-article-content .bp-faq-item > summary::after,
.bp-calc-article .bp-faq-item > summary::after {
    content: '';
    flex-shrink: 0;
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--pink-dim, rgba(254, 51, 114, .10));
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23fe3372' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
    transition: background-color .2s ease, background-image .2s ease, transform .25s ease;
}

.bp-article-content .bp-faq-item[open] > summary::after,
.bp-calc-article .bp-faq-item[open] > summary::after {
    background-color: var(--pink, #fe3372);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
    transform: rotate(180deg);
}

/* ---- Answer body ---- */
.bp-article-content .bp-faq-item > p,
.bp-article-content .bp-faq-item > div,
.bp-calc-article .bp-faq-item > p,
.bp-calc-article .bp-faq-item > div {
    font-size: 14.5px !important;
    color: var(--text-2, #52525b) !important;
    line-height: 1.78 !important;
    margin: 0 !important;
    padding: 16px 22px 20px !important;
    animation: bp-faq-in .2s ease both;
}

@keyframes bp-faq-in {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Nested links inside answers */
.bp-article-content .bp-faq-item > p a,
.bp-calc-article .bp-faq-item > p a {
    color: var(--pink, #fe3372) !important;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(254, 51, 114, .3);
}

/* ---- Optional FAQ group wrapper ---- */
.bp-faq-group {
    margin: 36px 0;
}
.bp-faq-group + .bp-faq-group {
    margin-top: 0;
}

/* ---- Responsive ---- */
@media (max-width: 560px) {
    .bp-article-content .bp-faq-item > summary,
    .bp-calc-article .bp-faq-item > summary {
        font-size: 14px;
        padding: 15px 16px;
        gap: 12px;
    }
    .bp-article-content .bp-faq-item > summary::after,
    .bp-calc-article .bp-faq-item > summary::after {
        width: 26px;
        height: 26px;
        background-size: 12px 12px;
    }
    .bp-article-content .bp-faq-item > p,
    .bp-calc-article .bp-faq-item > p {
        padding: 12px 16px 16px !important;
        font-size: 13.5px !important;
    }
}
