/* Shared BB Life article typography; never targets other editors or site modules. */
body.bblife-page .bblife-detail-body { display: block; }
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) {
    color: #242236;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.72;
    overflow-wrap: anywhere;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) p,
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) div {
    font-size: 1em;
    font-weight: 400;
    line-height: 1.72;
    margin: 0 0 1em;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) h2 {
    color: #161426;
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1.3;
    margin: 1.1em 0 .55em;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) h3 {
    color: #161426;
    font-size: 1.25em;
    font-weight: 700;
    line-height: 1.35;
    margin: 1em 0 .5em;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) h4 {
    font-size: 1.1em;
    font-weight: 700;
    line-height: 1.4;
    margin: 1em 0 .5em;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) ul {
    display: block;
    list-style: disc outside;
    margin: .5em 0 1em;
    padding-inline-start: 1.65em;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) ol {
    display: block;
    list-style: decimal outside;
    margin: .5em 0 1em;
    padding-inline-start: 1.65em;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) li {
    display: list-item;
    margin: .2em 0;
    font-size: 1em;
    line-height: 1.72;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) li > :is(ul, ol) { margin-block: .25em; }
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) li > p { margin: 0; }
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) a { color: #5141d8; text-decoration: underline; }
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin-block: 1em;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) blockquote { margin: 1em 0; border-inline-start: 3px solid #ff6b2c; padding-inline-start: 1em; }
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) figure { max-width: 100%; margin: 1em auto; }
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) figure[data-align="left"] { margin-inline: 0 auto; }
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) figure[data-align="right"] { margin-inline: auto 0; }
[data-bblife-editor] { overflow: visible; min-width: 0; }
[data-bblife-editor] > .rich-toolbar {
    position: sticky;
    top: var(--bblife-toolbar-top, 0px);
    z-index: 15;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 3px 8px #17132a12;
    overscroll-behavior-x: contain;
    max-width: 100%;
}
[data-bblife-news-editor] { min-height: 360px; max-height: 68vh; overflow-y: auto; scroll-padding-block: 20px; }
[data-bblife-editor] [aria-pressed="true"] { background: #eeeaff; color: #4933c9; border-color: #c2b5fa; }
[data-bblife-editor-status] { min-height: 1.4em; margin: 0; padding: 4px 12px; color: #6f397a; font-size: 13px; }
.bblife-editor-dialog { border: 1px solid #e1dfeb; border-radius: 16px; padding: 24px; width: min(540px, calc(100vw - 28px)); max-height: 85dvh; overflow-y: auto; color: #242236; background: white; }
.bblife-editor-dialog::backdrop { background: #18122b88; }
.bblife-editor-dialog h2 { font-size: 22px; margin: 0 0 18px; }
.bblife-editor-dialog label { display: grid; gap: 6px; margin: 12px 0; }
.bblife-editor-dialog input { border: 1px solid #dcd7ea; border-radius: 8px; padding: 10px; width: 100%; min-width: 0; }
.bblife-editor-dialog input[type="checkbox"] { width: 22px; height: 22px; }
.bblife-editor-dialog button { border: 1px solid #dcd7ea; border-radius: 8px; padding: 9px 12px; margin: 4px; background: #fff; color: #242236; cursor: pointer; }
.bblife-editor-dialog footer { display: flex; flex-wrap: wrap; justify-content: end; margin-top: 18px; }
.bblife-editor-dialog [data-bblife-link-apply] { background: #ff6b2c; color: white; }
.bblife-editor-dialog [role="alert"] { color: #a51630; }
@media (max-width: 600px) {
    :is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) { font-size: 17px; }
    [data-bblife-news-editor] { padding: 12px; min-height: 300px; max-height: 60vh; }
    [data-bblife-editor] > .rich-toolbar { gap: 6px; padding: 8px; }
    [data-bblife-editor] > .rich-toolbar select { flex-basis: 140px; max-width: 140px; }
}
/* overflow-x:hidden on the panel otherwise creates a non-scrolling sticky ancestor. */
body.panel-page:has([data-panel-view="bblife"]:not([hidden]) [data-bblife-news-form]:not([hidden])),
.panel-main:has([data-panel-view="bblife"]:not([hidden]) [data-bblife-news-form]:not([hidden])) {
    overflow-x: clip;
    overflow-y: visible;
}

:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) figcaption { color: #777184; font-size: 13px; line-height: 1.4; text-align: center; }

.bblife-tag-picker { display: grid; gap: 10px; }
.bblife-tag-bank button[aria-pressed="true"] { background: #ff6b2c; border-color: #ff6b2c; color: white; }

.bblife-tag-field { display: grid; gap: 8px; align-content: start; }
.bblife-tag-entry-row { display: flex; gap: 8px; }
.bblife-tag-entry-row input { flex: 1; min-width: 0; }
.bblife-tag-entry-row button { border: 1px solid #ff6b2c; border-radius: 10px; padding: 0 14px; background: #fff4ee; color: #a83d13; cursor: pointer; }
.bblife-selected-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.bblife-selected-tags button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #ffc2a7; border-radius: 999px; padding: 6px 12px; background: #fff4ee; color: #a83d13; cursor: pointer; }

/* Article text is not a form label: every semantic block has one fixed scale. */
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-size: 18px !important;
    font-weight: 400;
    line-height: 1.72;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) :is(p, div, li, blockquote) {
    font-size: 18px !important;
    line-height: 1.72 !important;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) :is(p, div) {
    display: block !important;
    font-weight: 400;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) :is(h1, h2, h3, h4, h5, h6) {
    display: block !important;
    font-family: inherit !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 1em 0 .5em;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) :is(h1, h2) { font-size: 28px !important; }
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) h3 { font-size: 24px !important; }
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) :is(h4, h5, h6) { font-size: 20px !important; }
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) :is(span, strong, b, em, i, a, u, s, del, font, small) {
    font-size: inherit !important;
    font-family: inherit !important;
    line-height: inherit !important;
}
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) :is(span, a, font) { font-weight: inherit !important; }
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) :is(strong, b) { font-weight: 700 !important; }
/* Override the panel's label color for ordinary text spans, but retain inline chosen colors. */
:is([data-bblife-news-editor], body.bblife-page .bblife-detail-body) span { color: inherit; }
