/* SermonWave Bible: scripture links, the verse bubble, and the /bible study reader.
   Loaded by sermon pages, the /listen archive and /bible. Mobile first. */

:root {
    --swb-bg: #FFFFFF;
    --swb-bg-soft: #F7F4EE;
    --swb-text: #1A1A2E;
    --swb-muted: #6B7280;
    --swb-border: #E2E6EC;
    --swb-accent: #1244C4;
    --swb-accent-soft: rgba(18, 68, 196, 0.08);
    --swb-link: #0E7490;
    --swb-highlight: #FFF4CC;
    --swb-highlight-edge: #E8A317;
    --swb-shadow: 0 12px 40px rgba(13, 27, 62, 0.18);
    --swb-radius: 12px;
    --swb-serif: 'Bitter', Georgia, 'Times New Roman', serif;
    --swb-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------------------------------------------------------------- scripture links */
a.sw-scripture {
    color: var(--swb-link);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    cursor: pointer;
    border-radius: 3px;
}
a.sw-scripture:hover, a.sw-scripture[aria-expanded="true"] {
    text-decoration-style: solid;
    background: var(--swb-accent-soft);
}
a.sw-scripture:focus-visible { outline: 2px solid var(--swb-accent); outline-offset: 2px; }
.sw-scripture-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.sw-scripture-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border: 1px solid var(--swb-border); border-radius: 999px;
    font-family: var(--swb-sans); font-size: 0.85rem; font-weight: 600;
    text-decoration: none !important; color: var(--swb-text) !important; background: var(--swb-bg);
}
.sw-scripture-chip::before { content: ''; width: 14px; height: 14px; background: currentColor; opacity: 0.55;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E") center / contain no-repeat; }
.sw-scripture-chip:hover { border-color: var(--swb-link); background: var(--swb-accent-soft); }
.sw-bible-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- the bubble */
.sw-bible-pop {
    position: absolute; z-index: 10050;
    width: min(420px, calc(100vw - 16px));
    max-height: min(70vh, 520px); overflow-y: auto;
    background: var(--swb-bg); color: var(--swb-text);
    border: 1px solid var(--swb-border); border-radius: var(--swb-radius);
    box-shadow: var(--swb-shadow);
    font-family: var(--swb-sans); font-size: 15px; line-height: 1.5;
    text-align: left;
    animation: swb-pop-in 140ms ease-out;
}
.sw-bible-pop:focus { outline: none; }
.sw-bible-pop[hidden], .sw-bible-pop-backdrop[hidden] { display: none; }
@keyframes swb-pop-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.sw-bible-pop__grip { display: none; }
.sw-bible-pop__head {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px 8px;
    position: sticky; top: 0; background: var(--swb-bg);
}
.sw-bible-pop__ref {
    flex: 1; font-weight: 700; font-size: 1.02rem; color: var(--swb-text) !important; text-decoration: none !important;
}
.sw-bible-pop__ref:hover { color: var(--swb-accent) !important; }
.sw-bible-pop__tr { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: var(--swb-muted); }
.sw-bible-pop__fallback { display: inline-block; margin-left: 6px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.sw-bible-pop__select {
    font: inherit; font-size: 0.78rem; font-weight: 700; color: var(--swb-text);
    border: 1px solid var(--swb-border); border-radius: 6px; padding: 3px 6px; background: var(--swb-bg-soft);
}
.sw-bible-pop__close {
    width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--swb-muted);
    font-size: 22px; line-height: 1; cursor: pointer;
}
.sw-bible-pop__close:hover { background: var(--swb-accent-soft); color: var(--swb-text); }
.sw-bible-pop__body { padding: 0 16px 6px; }
.sw-bible-pop__text { font-family: var(--swb-serif); font-size: 1.04rem; line-height: 1.65; margin: 0 0 8px; }
.sw-bible-pop__vn { font-family: var(--swb-sans); font-size: 0.66em; font-weight: 700; color: var(--swb-accent); margin-right: 3px; }
.sw-bible-pop__omit, .sw-bible-pop__status { color: var(--swb-muted); }
.sw-bible-pop__more a { font-weight: 600; color: var(--swb-accent); }
.sw-bible-pop__foot { padding: 6px 16px 14px; border-top: 1px solid var(--swb-border); }
.sw-bible-pop__actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.sw-bible-pop__btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 36px;
    padding: 6px 14px; border: 1px solid var(--swb-border); border-radius: 999px; background: var(--swb-bg);
    font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--swb-text) !important; text-decoration: none !important; cursor: pointer;
}
.sw-bible-pop__btn:hover { border-color: var(--swb-accent); }
.sw-bible-pop__btn--primary { background: var(--swb-accent); border-color: var(--swb-accent); color: #fff !important; margin-left: auto; }
.sw-bible-pop__btn--primary:hover { background: #0f39a4; }
.sw-bible-pop__copyright { margin: 10px 0 0; font-size: 0.72rem; color: var(--swb-muted); }

/* bottom sheet (touch / narrow screens) */
.sw-bible-pop-backdrop { position: fixed; inset: 0; z-index: 10040; background: rgba(13, 27, 62, 0.35); }
.sw-bible-pop--sheet {
    position: fixed; left: 0 !important; right: 0; bottom: 0; top: auto !important;
    width: 100%; max-height: 78vh; border-radius: 18px 18px 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
    animation: swb-sheet-in 180ms ease-out;
}
.sw-bible-pop--sheet .sw-bible-pop__grip { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--swb-border); margin: 8px auto 0; }
@keyframes swb-sheet-in { from { transform: translateY(30px); opacity: 0.6; } to { transform: none; opacity: 1; } }

/* dark pages (/listen) */
[data-bs-theme="dark"] a.sw-scripture { color: #fbbf24; }
[data-bs-theme="dark"] a.sw-scripture:hover, [data-bs-theme="dark"] a.sw-scripture[aria-expanded="true"] { background: rgba(245, 158, 11, 0.14); }
[data-bs-theme="dark"] .sw-scripture-chip { background: #16161f; border-color: rgba(255, 255, 255, 0.12); color: #e8e8e8 !important; }
[data-bs-theme="dark"] .sw-bible-pop,
.sw-bible-pop--dark {
    --swb-bg: #16161f; --swb-bg-soft: #1c1c28; --swb-text: #e8e8e8; --swb-muted: #8a8a9a; --swb-border: rgba(255, 255, 255, 0.12);
    --swb-accent: #f59e0b; --swb-accent-soft: rgba(245, 158, 11, 0.12);
}
[data-bs-theme="dark"] .sw-bible-pop .sw-bible-pop__btn--primary,
.sw-bible-pop--dark .sw-bible-pop__btn--primary { color: #111 !important; }
[data-bs-theme="dark"] .sw-bible-pop .sw-bible-pop__btn--primary:hover,
.sw-bible-pop--dark .sw-bible-pop__btn--primary:hover { background: #fbbf24; }

@media (prefers-reduced-motion: reduce) { .sw-bible-pop, .sw-bible-pop--sheet { animation: none; } }

/* ---------------------------------------------------------------- /bible study pages */
.bible-page { background: var(--swb-bg-soft); }
.bible-hero { background: #0D1B3E; color: #fff; padding: calc(var(--header-height, 72px) + 24px) 0 28px; }
.bible-hero .seo-breadcrumbs__item, .bible-hero .seo-breadcrumbs__item a { color: rgba(255, 255, 255, 0.7); }
.bible-hero__title { font-family: var(--swb-sans); font-weight: 800; font-size: clamp(1.7rem, 5vw, 2.6rem); margin: 8px 0 6px; color: #fff; }
.bible-hero__sub { color: rgba(255, 255, 255, 0.75); margin: 0; max-width: 640px; }
.bible-wrap { max-width: 1140px; margin: 0 auto; padding: 20px 16px 56px; }
.bible-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 980px) { .bible-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }

.bible-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.bible-toolbar__nav { display: flex; gap: 8px; margin-left: auto; }
.bible-btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px;
    border: 1px solid var(--swb-border); border-radius: 999px; background: var(--swb-bg);
    font-family: var(--swb-sans); font-size: 0.85rem; font-weight: 600; color: var(--swb-text); text-decoration: none; cursor: pointer;
}
.bible-btn:hover { border-color: var(--swb-accent); color: var(--swb-accent); }
.bible-btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.bible-select {
    min-height: 40px; padding: 6px 10px; border: 1px solid var(--swb-border); border-radius: 8px; background: var(--swb-bg);
    font-family: var(--swb-sans); font-size: 0.85rem; font-weight: 600; color: var(--swb-text);
}
.bible-toggle { display: inline-flex; align-items: center; gap: 8px; font-family: var(--swb-sans); font-size: 0.85rem; font-weight: 600; color: var(--swb-text); cursor: pointer; }
.bible-toggle input { width: 18px; height: 18px; accent-color: var(--swb-accent); }

.bible-reader {
    background: var(--swb-bg); border: 1px solid var(--swb-border); border-radius: var(--swb-radius);
    padding: 22px 18px 28px; box-shadow: 0 1px 3px rgba(13, 27, 62, 0.06);
}
@media (min-width: 640px) { .bible-reader { padding: 34px 44px 40px; } }
.bible-reader__title { font-family: var(--swb-sans); font-size: 1.35rem; font-weight: 800; margin: 0 0 4px; color: var(--swb-text); }
.bible-reader__meta { font-family: var(--swb-sans); font-size: 0.8rem; color: var(--swb-muted); margin: 0 0 18px; }
.bible-text { font-family: var(--swb-serif); font-size: 1.12rem; line-height: 1.85; color: var(--swb-text); }
.bible-v { padding: 2px 0; border-radius: 4px; scroll-margin-top: calc(var(--header-height, 72px) + 16px); transition: background 0.4s; }
.bible-v--hl { background: var(--swb-highlight); box-shadow: -6px 0 0 var(--swb-highlight), 6px 0 0 var(--swb-highlight); }
.bible-v--sel .bible-vn { background: var(--swb-accent); color: #fff; }
.bible-vn {
    display: inline-block; font-family: var(--swb-sans); font-size: 0.62em; font-weight: 700; color: var(--swb-accent);
    vertical-align: 0.55em; line-height: 1; padding: 2px 4px; margin: 0 2px 0 4px; border: 0; border-radius: 4px;
    background: transparent; cursor: pointer;
}
.bible-vn:hover, .bible-vn:focus-visible { background: var(--swb-accent-soft); outline: none; }
.bible-omit { color: var(--swb-muted); font-style: italic; font-size: 0.9em; }
.bible-w[data-s] { cursor: pointer; border-radius: 3px; }
.bible-text--strongs .bible-w[data-s] { text-decoration: underline; text-decoration-color: rgba(18, 68, 196, 0.35); text-underline-offset: 4px; }
.bible-w[data-s]:hover, .bible-w--active { background: var(--swb-accent-soft); color: var(--swb-accent); }
.bible-strongs-num { font-family: var(--swb-sans); font-size: 0.55em; color: var(--swb-muted); vertical-align: super; display: none; }
.bible-text--strongs .bible-strongs-num { display: inline; }
.bible-hint { font-family: var(--swb-sans); font-size: 0.8rem; color: var(--swb-muted); margin: 14px 0 0; }

.bible-panel {
    background: var(--swb-bg); border: 1px solid var(--swb-border); border-radius: var(--swb-radius);
    padding: 18px; margin-bottom: 16px;
}
.bible-panel h2 { font-family: var(--swb-sans); font-size: 0.95rem; font-weight: 800; margin: 0 0 12px; color: var(--swb-text); }
.bible-panel__empty { font-size: 0.9rem; color: var(--swb-muted); margin: 0; }
.bible-xrefs, .bible-sermons { list-style: none; margin: 0; padding: 0; }
.bible-xrefs li, .bible-sermons li { padding: 10px 0; border-top: 1px solid var(--swb-border); }
.bible-xrefs li:first-child, .bible-sermons li:first-child { border-top: 0; padding-top: 0; }
.bible-xrefs__text { display: block; font-family: var(--swb-serif); font-size: 0.9rem; color: var(--swb-muted); margin-top: 2px; }
.bible-attribution { font-size: 0.72rem; color: var(--swb-muted); margin: 12px 0 0; }
.bible-attribution a { color: inherit; }
.bible-sermons a { font-family: var(--swb-sans); font-weight: 700; font-size: 0.92rem; color: var(--swb-text); text-decoration: none; }
.bible-sermons a:hover { color: var(--swb-accent); }
.bible-sermons__meta { display: block; font-size: 0.78rem; color: var(--swb-muted); margin-top: 2px; }

.bible-strongs-card { position: relative; }
.bible-strongs-card[hidden] { display: none; }
.bible-strongs__lemma { font-size: 1.9rem; line-height: 1.2; margin: 0 0 2px; font-family: 'SBL Hebrew', 'Ezra SIL', 'Times New Roman', serif; }
.bible-strongs__xlit { font-family: var(--swb-sans); font-weight: 700; margin: 0; }
.bible-strongs__dl { margin: 10px 0 0; font-size: 0.88rem; }
.bible-strongs__dl dt { font-family: var(--swb-sans); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--swb-muted); margin-top: 8px; }
.bible-strongs__dl dd { margin: 2px 0 0; }
.bible-strongs__close { position: absolute; top: 10px; right: 10px; }

.bible-books { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 760px) { .bible-books { grid-template-columns: 1fr 1fr; } }
.bible-books h2 { font-family: var(--swb-sans); font-size: 1rem; font-weight: 800; margin: 0 0 10px; }
.bible-book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; list-style: none; margin: 0; padding: 0; }
.bible-book-grid a {
    display: block; padding: 9px 12px; border: 1px solid var(--swb-border); border-radius: 8px; background: var(--swb-bg);
    font-family: var(--swb-sans); font-size: 0.86rem; font-weight: 600; color: var(--swb-text); text-decoration: none;
}
.bible-book-grid a:hover { border-color: var(--swb-accent); color: var(--swb-accent); }
.bible-chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; list-style: none; margin: 0; padding: 0; }
.bible-chapter-grid a {
    display: flex; align-items: center; justify-content: center; height: 44px; border: 1px solid var(--swb-border); border-radius: 8px;
    background: var(--swb-bg); font-family: var(--swb-sans); font-weight: 700; color: var(--swb-text); text-decoration: none;
}
.bible-chapter-grid a:hover, .bible-chapter-grid a[aria-current="page"] { background: var(--swb-accent); border-color: var(--swb-accent); color: #fff; }
.bible-chapters-details summary { cursor: pointer; font-family: var(--swb-sans); font-weight: 700; font-size: 0.9rem; margin-bottom: 10px; }

/* ================================================================ agent D: parallel view, church branding, notes (sw-bible-2) */
/* ---- toolbar: screen-reader-only labels (prev / next chapter) + wrapping so phones never scroll sideways */
.bible-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bible-toolbar__nav { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.bible-toolbar > * { min-width: 0; }
/* ---- translation picker + compare */
.bible-trpick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.bible-trpick__label { font-family: var(--swb-sans); font-size: 0.78rem; font-weight: 700; color: var(--swb-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.bible-trpick .bible-select { max-width: 220px; }
@media (max-width: 639px) {
    /* phones: label | select rows, the swap button beside "compare with" */
    .bible-trpick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; width: 100%; gap: 8px 10px; }
    .bible-trpick__label { grid-column: 1; }
    .bible-trpick .bible-select { grid-column: 2; max-width: none; width: 100%; }
    .bible-trpick #bible-reader-swap { grid-column: 3; grid-row: 2; }
}
.bible-btn--icon { min-width: 40px; justify-content: center; padding: 8px 10px; font-size: 1rem; }
.bible-btn--icon[hidden] { display: none; }
.bible-btn--primary { background: var(--swb-accent); border-color: var(--swb-accent); color: #fff; }
.bible-btn--primary:hover { color: #fff; filter: brightness(0.92); }
.bible-btn--danger { border-color: #B42318; color: #B42318; }
.bible-btn:focus-visible, .bible-select:focus-visible { outline: 2px solid var(--swb-accent); outline-offset: 2px; }

/* ---- parallel rows: two columns on desktop, stacked per verse on phones; rows are aligned on the standard vkey */
.bible-text--parallel { line-height: 1.7; }
.bible-phead { display: none; }
.bible-prow { padding: 8px 0; border-top: 1px solid var(--swb-border); }
.bible-prow:first-of-type { border-top: 0; }
.bible-text--parallel .bible-v { display: block; padding: 2px 6px; margin: 0 -6px; box-shadow: none; }
.bible-ptag { display: inline-block; margin: 6px 0 0; font-family: var(--swb-sans); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; color: var(--swb-muted); }
.bible-text--parallel .bible-v--cmp { font-size: 0.97em; border-left: 3px solid var(--swb-accent-soft); padding-left: 10px; margin-left: 0; }
.bible-v--empty { color: var(--swb-muted); }
.bible-v__none { font-family: var(--swb-sans); font-size: 0.75rem; font-style: italic; color: var(--swb-muted); }
.bible-vn--static { cursor: default; color: var(--swb-muted); }
/* standard verse 0 = a Psalm title a translation numbers as a verse (LSG Ps 3:1): shown as a title line, never "0" */
.bible-v--title { display: block; font-style: italic; font-size: 0.92em; color: var(--swb-muted); margin: 0 0 6px; }
.bible-v--title .bible-vn--static { font-style: normal; font-size: 0.7em; vertical-align: super; margin-right: 4px; }
.bible-toggle[hidden], #bible-reader-strongs-hint[hidden], .bible-btn[hidden] { display: none; }
/* a selected verse number keeps its filled look under the mouse / keyboard focus (white on pale was unreadable) */
.bible-v--sel .bible-vn:hover, .bible-v--sel .bible-vn:focus-visible { background: var(--swb-accent); color: #fff; outline: 2px solid var(--swb-accent-soft); }
.bible-renum { font-family: var(--swb-sans); font-size: 0.82rem; color: var(--swb-text); background: var(--swb-bg-soft); border-left: 3px solid var(--swb-highlight-edge); border-radius: 6px; padding: 8px 12px; margin: 0 0 12px; }
.bible-renum--error { border-left-color: #B42318; }
.bible-text[aria-busy="true"] { opacity: 0.55; transition: opacity 0.2s; }
@media (min-width: 700px) {
    .bible-phead { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; position: sticky; top: calc(var(--header-height, 72px) + 20px); z-index: 2; /* the fixed site header is ~92px tall */
        background: var(--swb-bg); padding: 6px 0; border-bottom: 2px solid var(--swb-border);
        font-family: var(--swb-sans); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; color: var(--swb-muted); }
    .bible-prow { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: start; }
    .bible-prow:first-of-type { border-top: 0; }
    .bible-ptag { display: none; }
    .bible-text--parallel .bible-v--cmp { border-left: 0; padding-left: 6px; margin-left: -6px; font-size: 1em; }
}
@media (min-width: 980px) { .bible-layout--parallel { grid-template-columns: minmax(0, 1fr) 300px; } }

/* ---- highlights, note / bookmark markers */
.bible-v--mark-yellow { background: #FFEFA0; }
.bible-v--mark-green { background: #CDEFD3; }
.bible-v--mark-blue { background: #D3E4FF; }
.bible-v--mark-pink { background: #FFD8E8; }
.bible-note-ico {
    display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: 0 0 0 4px; padding: 0;
    vertical-align: middle; border: 1px solid var(--swb-border); border-radius: 50%; background: var(--swb-bg); color: var(--swb-accent); cursor: pointer;
}
.bible-note-ico--bookmark { color: var(--swb-highlight-edge); }
.bible-note-ico:hover, .bible-note-ico:focus-visible { border-color: var(--swb-accent); outline: none; }

/* ---- notes panel (reader) + "My notes" page */
.bible-notes-panel[hidden] { display: none; }
.bible-notes__sel { font-family: var(--swb-sans); font-weight: 700; margin: 0 0 10px; }
.bible-notes__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.bible-notes__label { font-family: var(--swb-sans); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--swb-muted); margin-right: 4px; }
label.bible-notes__label { display: block; margin: 4px 0 6px; }
.bible-swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--swb-border); padding: 0; cursor: pointer; background: var(--swb-bg); color: var(--swb-muted); font-size: 18px; line-height: 1; }
.bible-swatch--yellow { background: #FFE066; } .bible-swatch--green { background: #8FD9A0; }
.bible-swatch--blue { background: #8DB8FF; } .bible-swatch--pink { background: #FF9CC4; }
.bible-swatch[aria-pressed="true"] { border-color: var(--swb-text); box-shadow: 0 0 0 2px var(--swb-bg) inset; }
.bible-swatch:disabled { opacity: 0.35; cursor: default; }
.bible-swatch:focus-visible { outline: 2px solid var(--swb-accent); outline-offset: 2px; }
.bible-swatch--static { display: inline-block; width: 14px; height: 14px; border-width: 1px; cursor: default; vertical-align: middle; margin-right: 8px; }
.bible-notes__bm svg { width: 16px; height: 16px; }
.bible-notes__bm[aria-pressed="true"] { border-color: var(--swb-highlight-edge); background: var(--swb-highlight); }
.bible-notes__text { width: 100%; min-height: 76px; padding: 10px 12px; border: 1px solid var(--swb-border); border-radius: 8px; resize: vertical;
    font-family: var(--swb-serif); font-size: 0.98rem; color: var(--swb-text); background: var(--swb-bg); margin: 0 0 10px; }
.bible-notes__text:focus { outline: 2px solid var(--swb-accent); outline-offset: 1px; }
.bible-notes__status { font-family: var(--swb-sans); font-size: 0.8rem; color: var(--swb-muted); }
.bible-notes__device { font-size: 0.75rem; color: var(--swb-muted); margin: 6px 0 0; }
.bible-notes__device a { color: var(--swb-accent); font-weight: 600; }
.bible-notes__msg { min-height: 1.2em; font-family: var(--swb-sans); font-size: 0.88rem; margin: 0 0 12px; }
.bible-notes__msg--ok { color: #067647; } .bible-notes__msg--error { color: #B42318; }
.bible-notes__count { font-size: 0.75rem; color: var(--swb-muted); font-weight: 700; margin-left: 6px; }
.bible-notes-items { list-style: none; margin: 0; padding: 0; }
.bible-notes-item { padding: 10px 0; border-top: 1px solid var(--swb-border); }
.bible-notes-item:first-child { border-top: 0; padding-top: 0; }
.bible-notes-item a { font-family: var(--swb-sans); font-weight: 700; color: var(--swb-text); text-decoration: none; }
.bible-notes-item a:hover { color: var(--swb-accent); }
.bible-notes-item__text { font-family: var(--swb-serif); margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bible-notes-item__meta { display: block; font-size: 0.75rem; color: var(--swb-muted); margin-top: 2px; }
.bible-index-tools { margin: 0 0 16px; }

/* ---- church-branded study (/church/{org}/bible/...) */
.bible-church-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 14px;
    padding: 0 0 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.bible-church-bar__home { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; min-width: 0; }
.bible-church-bar__logo, .bible-church-bar__mono { width: 44px; height: 44px; border-radius: 10px; flex: 0 0 auto; background: #fff; object-fit: contain; }
.bible-church-bar__mono { display: inline-flex; align-items: center; justify-content: center; font-family: var(--swb-sans); font-weight: 800; font-size: 1.2rem;
    color: #0D1B3E; }
.bible-church-bar__text { display: flex; flex-direction: column; min-width: 0; }
.bible-church-bar__back { font-size: 0.75rem; color: rgba(255, 255, 255, 0.7); }
.bible-church-bar__name { font-family: var(--swb-sans); font-weight: 800; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bible-church-bar__home:hover .bible-church-bar__name { text-decoration: underline; }
.bible-church-bar__nav { display: flex; gap: 14px; }
.bible-church-bar__nav a { color: rgba(255, 255, 255, 0.85); font-family: var(--swb-sans); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.bible-church-bar__nav a:hover { color: #fff; text-decoration: underline; }
.bible-page--church .bible-hero { background: linear-gradient(135deg, #0D1B3E 0%, var(--swb-church, #1A2F66) 140%); }
.bible-panel--church { border-top: 3px solid var(--swb-accent); }
.bible-passage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
.bible-passage-grid a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--swb-border); border-radius: 8px;
    background: var(--swb-bg); color: var(--swb-text); text-decoration: none; font-family: var(--swb-sans); }
.bible-passage-grid a span { font-size: 0.75rem; color: var(--swb-muted); }
.bible-passage-grid a:hover { border-color: var(--swb-accent); }
.sw-church-bible-link { display: inline-flex; align-items: center; gap: 8px; }
/* ================================================================ end agent D */

/* ================================================================ quoted verses (agent E: sw_bible_quotes.php) */
/* Words that closely match a verse the preacher did not name: dotted underline + a small "Possibly quoting" pill */
.sw-quoted {
    text-decoration: underline dotted var(--swb-highlight-edge);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
}
a.sw-scripture.sw-scripture--quoted {
    display: inline-block;
    margin: 0 2px;
    padding: 0 8px;
    border: 1px dashed var(--swb-highlight-edge);
    border-radius: 999px;
    background: var(--swb-highlight);
    color: #7A4B00;
    font-family: var(--swb-sans);
    font-size: 0.78em;
    font-style: normal;
    font-weight: 600;
    line-height: 1.7;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: baseline;
}
a.sw-scripture.sw-scripture--quoted[data-quoted="confirmed"] { border-style: solid; }
a.sw-scripture.sw-scripture--quoted:hover, a.sw-scripture.sw-scripture--quoted[aria-expanded="true"] {
    background: #FFE9A8;
    text-decoration: none;
}
[data-bs-theme="dark"] .sw-quoted { text-decoration-color: #fbbf24; }
[data-bs-theme="dark"] a.sw-scripture.sw-scripture--quoted { background: rgba(245, 158, 11, 0.14); color: #fbbf24 !important; border-color: rgba(251, 191, 36, 0.6); }
/* ================================================================ end agent E */

/* ================================================================ phones + tablets (mobile audit 2026-10-03)
   Touch screens only ((pointer: coarse)), so desktop layouts are unchanged:
   - form fields at 16px (iOS Safari zooms the page into a focused field under 16px)
   - tap targets >= 24px (WCAG 2.5.8), 40-44px for buttons. Inline links / tappable words in running text get
     vertical padding only: on an inline box that enlarges the hit area without moving a single line of text.
     Block links get padding + the same negative margin, so the layout stays put. */
@media (pointer: coarse) {
    .bible-select, .bible-notes__text, .sw-bible-pop__select, .bible-wfilters select, .bible-wfilters input,
    .bible-occ-filter .bible-select { font-size: 16px; }
    .bible-btn { min-height: 44px; }
    .bible-select { min-height: 44px; }
    .sw-bible-pop__select { min-height: 36px; }
    .sw-bible-pop__close { width: 44px; height: 44px; margin: -6px -10px -6px 0; }
    .sw-bible-pop__btn { min-height: 44px; }
    /* tappable words (word study / Strong's) and transcript scripture references */
    .bible-w[data-s], a.sw-scripture:not(.sw-scripture--quoted) { padding-top: 4px; padding-bottom: 4px; }
    /* verse numbers: a 24px button that takes no more line height than before */
    .bible-vn:not(.bible-vn--static) { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px;
        margin: -5px 0 -5px 2px; vertical-align: 0.3em; }
    .bible-hero .seo-breadcrumbs__item a { display: inline-block; padding: 5px 0; margin: -5px 0; }
    .bible-church-bar__nav a { padding: 8px 0; margin: -8px 0; }
    .bible-church-bar__home { min-height: 44px; }
    .bible-freq__label a, .bible-freq-table a, .bible-credits a, .bible-attribution a, .bible-notes__device a { display: inline-block; padding: 5px 0; margin: -5px 0; }
    details.bible-details > summary, .bible-chapters-details summary { padding: 10px 0; margin-top: 0; }
    .bible-toggle { min-height: 36px; }
}
/* phones: the chapter toolbar (search, My notes, prev, Chapters, next) fits one row at 360-375px */
@media (max-width: 420px) {
    .bible-toolbar__nav { gap: 6px; }
    .bible-toolbar__nav .bible-btn:not(.bible-btn--icon) { padding-left: 11px; padding-right: 11px; }
}
/* iOS Safari: vh is the viewport without the toolbars; the bubble sheet uses the visible height (dvh) where supported */
.sw-bible-pop--sheet { max-height: 78dvh; }
