/* =====================================================================
   The Bible reader's tools and panes (js/bible.js, js/bible-tools.js). The reader's own look, the bar, the text and
   the choice of book, is in css/manuscript.css; this file adds to it and is read after it.
   ===================================================================== */

/* the five colours of a highlight: a wash under the words, stronger by day, when the paper is light */
:root {
  --hl-yellow: rgba(246, 206, 60, 0.44);
  --hl-green: rgba(96, 204, 116, 0.36);
  --hl-blue: rgba(92, 156, 248, 0.42);
  --hl-pink: rgba(240, 108, 170, 0.40);
  --hl-orange: rgba(246, 140, 56, 0.42);
}
:root[data-theme="light"] {
  --hl-yellow: rgba(250, 212, 64, 0.55);
  --hl-green: rgba(126, 204, 118, 0.45);
  --hl-blue: rgba(116, 172, 244, 0.42);
  --hl-pink: rgba(244, 136, 182, 0.42);
  --hl-orange: rgba(248, 160, 76, 0.48);
}

/* ---- the tools at the top ---- */
.bb-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; margin: 0 0 8px; }
.bb-tools .bb-opt { margin: 0; }
.bb-tool-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.bb-tool { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 2.5rem; padding: 4px 12px; border: 1px solid var(--rule); border-radius: 0; background: none; box-shadow: none; font: inherit; font-size: 1rem; line-height: 1.15; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bb-tool[hidden] { display: none; }
.bb-tool-i { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; color: var(--rubric); }
.bb-tool svg, .bb-act-row svg, .bb-x-beside svg, .bb-link svg { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.bb-aa { font-family: var(--display); font-size: 1.12rem; line-height: 1; letter-spacing: 0.02em; }
.bb-tool:hover:not(:disabled), .bb-tool[aria-expanded="true"] { border-color: var(--rubric); color: var(--rubric); }
.bb-tool:disabled { opacity: 0.4; cursor: default; }
.bb-tool:focus-visible, .bb-menu button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bb-hint { margin: 0 0 12px; text-align: center; font-size: 0.95rem; font-style: italic; color: var(--muted); }
.bb.multi .bb-hint { display: none; }

/* "Add a pane": two ways, in a small menu beneath the button */
.bb-tool-wrap { position: relative; display: inline-flex; }
.bb-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; width: max-content; max-width: min(21rem, calc(100vw - 24px)); padding: 4px; border: 1px solid var(--press); background: var(--bg); box-shadow: 0 14px 36px var(--shadow); }
.bb-menu[hidden] { display: none; }
.bb-menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 12px; border: 0; border-radius: 0; background: none; box-shadow: none; font: inherit; text-align: left; color: var(--ink); cursor: pointer; }
.bb-menu button + button { border-top: 1px dotted var(--rule); }
.bb-menu button b { font-weight: 600; font-size: 1.04rem; }
.bb-menu button span { font-size: 0.92rem; font-style: italic; color: var(--muted); }
.bb-menu button:hover { background: color-mix(in srgb, var(--rubric) 10%, transparent); }
.bb-menu button:hover b { color: var(--rubric); }

/* the same tools, from "⋯" in the bar of a pane */
.bb-pane-menu { position: fixed; top: 0; left: 0; transform: none; z-index: 45; max-height: calc(100vh - 16px); max-height: calc(100svh - 16px); overflow-y: auto; overscroll-behavior: contain; }
.bb-pane-menu button[hidden] { display: none; }
.bb-moretools { font-size: 1.3rem; letter-spacing: 0.02em; }

/* the chapters lately read, at the top of the choice of book */
.bb-recent { margin: 0 0 4px; }
.bb-recent[hidden] { display: none; }
.bb-recent .bb-set-h { margin-top: 0; }
.bb-recent-row { display: flex; flex-wrap: wrap; gap: 6px; }
.bb-rc { padding: 6px 11px; border: 1px solid var(--rule); border-radius: 0; background: none; box-shadow: none; font: inherit; font-size: 1.02rem; color: var(--ink); cursor: pointer; }
.bb-rc:hover { border-color: var(--rubric); color: var(--rubric); }
.bb-rc:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- the bar of a pane: its version, its link, its close ---- */
.bb-bar { gap: 10px; }
.bb-ver-l { display: inline-flex; }
.bb-ver { height: 2.5rem; padding: 0 24px 0 9px; border: 1px solid var(--rule); border-radius: 0; background-color: var(--bg); background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 12px top 52%, right 7px top 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; font-family: var(--caps); font-size: 0.95rem; letter-spacing: 0.08em; color: var(--ink); -webkit-appearance: none; appearance: none; cursor: pointer; }
.bb-ver:hover { border-color: var(--rubric); color: var(--rubric); }
.bb-ver:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bb-ver option { color: var(--ink); background: var(--bg); }
.bb-link, .bb-close { display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.bb-link[aria-pressed="true"] { border-color: var(--rubric); background: color-mix(in srgb, var(--rubric) 16%, transparent); color: var(--rubric); }
.bb-close { font-size: 1.5rem; }
.bb:not(.multi) .bb-link, .bb:not(.multi) .bb-close { display: none; }
.bb-ch-ver { display: none; }

/* ---- the panes, side by side: they fill the screen, and each scrolls on its own ---- */
.bb-pane { container-type: inline-size; container-name: pane; min-width: 0; }
.bb.multi { max-width: none; }
.bb.multi .bb-work { --n: 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); height: 100vh; height: 100svh; border-top: 3px double var(--press); border-bottom: 1px solid var(--rule); }
.bb.multi[data-panes="3"] .bb-work { --n: 3; }
.bb.multi[data-panes="4"] .bb-work { --n: 4; }
.bb.multi .bb-pane { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--rule); }
.bb.multi .bb-pane:first-child { border-left: 0; }
.bb.multi .bb-bar { position: relative; flex: none; gap: 5px; padding: 6px 8px; border-top: 0; }
.bb.multi .bb-pane.is-active .bb-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--rubric); }
.bb.multi .bb-step { width: 2.3rem; height: 2.3rem; font-size: 1.5rem; }
.bb.multi .bb-ver { height: 2.3rem; }
.bb.multi .bb-ref { min-width: 0; flex: 1 1 auto; padding: 3px 4px; font-size: 1.25rem; }
/* the name of the chapter: the book may be cut short ("1 Cor…"), the chapter's number never is */
.bb-ref-t { display: inline-flex; align-items: baseline; min-width: 0; white-space: nowrap; }
.bb-ref-b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bb-ref-c { flex: none; margin-left: 0.26em; }
.bb.multi .bb-searchbtn { margin-left: 0; }
.bb.multi .bb-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 28px; }
.bb.multi .bb-text { padding-top: 10px; }
.bb.multi .bb-ch-ver { display: inline-block; margin-left: 0.45em; font-family: var(--caps); font-size: 0.6em; letter-spacing: 0.1em; color: var(--muted); vertical-align: 0.15em; }
.bb.multi .bb-credit { margin-top: 14px; }
@container pane (max-width: 27rem) {
  .bb.multi .bb-bar .bb-step[data-bb-go] { display: none; }        /* narrow: the buttons beneath the chapter turn it instead */
  .bb.multi .bb-ref { font-size: 1.12rem; }
  .bb.multi .bb-scroll { padding: 0 10px 24px; }
}
@container pane (max-width: 21rem) {
  .bb.multi .bb-bar .bb-searchbtn, .bb.multi .bb-bar .bb-close { display: none; }   /* in ⋯ instead */
  .bb.multi .bb-ver { padding: 0 18px 0 6px; font-size: 0.85rem; background-position: right 10px top 52%, right 5px top 52%; }
  .bb.multi .bb-step { width: 2.15rem; }
}
@container pane (max-width: 36rem) {
  .bb.multi .bb-text { font-size: calc(1.1rem * var(--bb-scale, 1)); }
}
@media (max-width: 780px) {
  .bb.multi .bb-work { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(var(--n), minmax(0, 1fr)); }
  .bb.multi .bb-pane { border-left: 0; border-top: 2px solid var(--press); }
  .bb.multi .bb-pane:first-child { border-top: 0; }
  .bb.multi .bb-bar { padding: 4px 4px; }
  .bb.multi .bb-text { padding-top: 6px; }
  .bb.multi .bb-ch { margin-bottom: 10px; font-size: 1.25rem; }
}

/* ---- how the text is set (Display) ---- */
.bb-text { font-size: calc(1.24rem * var(--bb-scale, 1)); }
.bb.lh-compact .bb-text { line-height: 1.5; }
.bb.lh-compact .bb-s { line-height: 1.42; }
.bb.lh-loose .bb-text { line-height: 2.05; }
.bb.lh-loose .bb-s { line-height: 1.9; }
.bb.bb-sans .bb-text { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: calc(1.1rem * var(--bb-scale, 1)); }
.bb.bb-sans .bb-n { font-family: inherit; }
.bb.no-heads .bb-head { display: none; }
.bb-vl { margin: 0 0 0.45em; }
/* paragraphs set in rows beside a linked pane (js/bible.js, rowsHTML): a verse to a row, the version's layout inside it —
   its lines of poetry hung as the stanzas hang them, its prose run on, and space where a paragraph or a stanza begins */
.bb-vr { margin-bottom: 0.3em; }
.bb-vr.bb-vp, .bb-vr.bb-vs { margin-top: 0.85em; }
.bb-vr .bb-rp { display: block; }
.bb-vr .bb-rl { display: block; padding-left: 1.6em; text-indent: -1.6em; line-height: 1.62; }
.bb-vr .bb-rgap { margin-top: 0.55em; }
.bb.lh-compact .bb-vr .bb-rl { line-height: 1.42; }
.bb.lh-loose .bb-vr .bb-rl { line-height: 1.9; }
.bb-pil { color: var(--rubric); font-family: var(--display); }
.bb-it { font-style: italic; }
@media (max-width: 780px) {
  .bb-text { font-size: calc(1.17rem * var(--bb-scale, 1)); }
  .bb.bb-sans .bb-text { font-size: calc(1.05rem * var(--bb-scale, 1)); }
  .bb-bar { gap: 4px; }
  .bb-step { width: 2.3rem; height: 2.4rem; }
  .bb-searchbtn { margin-left: 0; }
  .bb-ver { height: 2.4rem; padding: 0 17px 0 6px; font-size: 0.85rem; background-position: right 10px top 52%, right 5px top 52%; }
  .bb-ref { padding: 4px 2px; gap: 5px; font-size: 1.3rem; }
}

/* ---- a verse: chosen, highlighted, marked, read aloud ---- */
.bb-t { scroll-margin-top: 5rem; scroll-margin-bottom: 10rem; -webkit-tap-highlight-color: transparent; }
.bb-t[data-hl="yellow"] { background: var(--hl-yellow); }
.bb-t[data-hl="green"] { background: var(--hl-green); }
.bb-t[data-hl="blue"] { background: var(--hl-blue); }
.bb-t[data-hl="pink"] { background: var(--hl-pink); }
.bb-t[data-hl="orange"] { background: var(--hl-orange); }
/* words highlighted, rather than the whole verse (selected in the text, then a colour chosen) */
.bb-text mark.bb-w { padding: 0.06em 0; background: var(--hl-yellow); color: inherit; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.bb-text mark.bb-w[data-hl="green"] { background: var(--hl-green); }
.bb-text mark.bb-w[data-hl="blue"] { background: var(--hl-blue); }
.bb-text mark.bb-w[data-hl="pink"] { background: var(--hl-pink); }
.bb-text mark.bb-w[data-hl="orange"] { background: var(--hl-orange); }
.bb.no-marks .bb-t[data-hl], .bb.no-marks .bb-text mark.bb-w { background: none; }
.bb.no-marks .bb-mark { display: none; }
.bb-t.is-sel { text-decoration: underline dotted var(--rubric); text-decoration-thickness: 2px; text-underline-offset: 0.24em; text-decoration-skip-ink: none; }
.bb-t.is-sel:not([data-hl]) { background: color-mix(in srgb, var(--rubric) 11%, transparent); }
.bb-t.is-reading { background: color-mix(in srgb, var(--rubric) 24%, transparent); }
.bb-t.is-cursor { outline: 2px solid var(--focus); outline-offset: 1px; }
.bb-text:focus { outline: none; }
.bb-text:focus-visible { outline: 1px dotted var(--rule); outline-offset: 6px; }
.bb-mark { display: inline-flex; vertical-align: baseline; color: var(--rubric); }
.bb-bm-mark { position: relative; top: 1px; margin-right: 0.18em; }
.bb-bm-mark svg { fill: currentColor; stroke: currentColor; stroke-width: 1; }
.bb-note-mark { position: relative; top: 2px; margin: -6px -4px -6px 2px; padding: 6px; border: 0; border-radius: 0; background: none; box-shadow: none; line-height: 1; cursor: pointer; }
.bb-note-mark svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.bb-note-mark:hover { color: var(--ink); }
.bb-note-mark:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

/* ---- the bar of the chosen verses, at the foot of the screen ---- */
.bb-act { position: fixed; z-index: 40; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); box-sizing: border-box; width: min(40rem, calc(100% - 16px)); padding: 6px 10px 8px; border: 1px solid var(--press); background: var(--bg); box-shadow: 0 16px 44px var(--shadow), 0 2px 8px var(--lift); }
.bb-act[hidden] { display: none; }
.bb-act-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bb-act-ref { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--caps); font-weight: 400; font-size: 1.02rem; letter-spacing: 0.06em; color: var(--rubric); }
.bb-act-x { flex: none; width: 2.4rem; height: 2.4rem; padding: 0 0 3px; border: 0; border-radius: 0; background: none; box-shadow: none; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
.bb-act-x:hover { color: var(--ink); }
.bb-act-colors { display: flex; align-items: center; gap: 10px; margin: 2px 0 6px; }
.bb-sw { flex: none; width: 2.2rem; height: 2.2rem; padding: 0; border: 1px solid var(--rule); border-radius: 50%; background-color: var(--bg); box-shadow: none; cursor: pointer; }
.bb-sw[data-hl="yellow"] { background-image: linear-gradient(var(--hl-yellow), var(--hl-yellow)); }
.bb-sw[data-hl="green"] { background-image: linear-gradient(var(--hl-green), var(--hl-green)); }
.bb-sw[data-hl="blue"] { background-image: linear-gradient(var(--hl-blue), var(--hl-blue)); }
.bb-sw[data-hl="pink"] { background-image: linear-gradient(var(--hl-pink), var(--hl-pink)); }
.bb-sw[data-hl="orange"] { background-image: linear-gradient(var(--hl-orange), var(--hl-orange)); }
.bb-sw[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.bb-sw-none { display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; color: var(--muted); }
.bb-sw:hover { border-color: var(--rubric); }
.bb-act-row { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.bb-act-row::-webkit-scrollbar { display: none; }
.bb-act-row button { flex: 1 0 auto; min-width: 3.9rem; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 5px 5px; border: 1px solid transparent; border-radius: 0; background: none; box-shadow: none; font: inherit; font-size: 0.86rem; line-height: 1.1; color: var(--ink); cursor: pointer; }
.bb-act-row button[hidden] { display: none; }
.bb-act.is-words .bb-act-row button:not([data-act="copy"]) { display: none; }       /* words selected: the colours, and Copy */
.bb-act-row button:hover { border-color: var(--rule); color: var(--rubric); }
.bb-act-row button[aria-pressed="true"] { color: var(--rubric); }
.bb-act-row button[aria-pressed="true"] svg { fill: currentColor; }
.bb-act button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
body.bb-acting .page { padding-bottom: 9rem; }
body.bb-acting .bb.multi .bb-scroll { padding-bottom: 10rem; }

/* ---- the sheets: Display, a note, Compare, Cross references, the interlinear ---- */
.bb-sheet { box-sizing: border-box; width: calc(100% - 24px); max-width: 36rem; max-height: min(86vh, 46rem); padding: 0; border: 1px solid var(--press); border-radius: 6px; background: var(--bg); color: var(--ink); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }
.bb-sheet[open] { display: flex; flex-direction: column; overflow: hidden; }
.bb-sheet::backdrop { background: rgba(10, 6, 14, 0.62); }
.bb-sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 16px; border-bottom: 1px solid var(--rule); }
.bb-sheet-head h3 { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-weight: 400; font-size: 1.35rem; color: var(--rubric); }
.bb-sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px 18px; }
.bb-btn { padding: 8px 16px; border: 1px solid var(--rubric); border-radius: 0; background: none; box-shadow: none; font: inherit; font-size: 1.02rem; color: var(--rubric); cursor: pointer; }
.bb-btn:hover { background: color-mix(in srgb, var(--rubric) 10%, transparent); }
.bb-btn-quiet { border-color: var(--rule); color: var(--muted); }
.bb-btn-quiet:hover { border-color: var(--rubric); color: var(--rubric); background: none; }
.bb-btn:focus-visible, .bb-seg button:focus-visible, .bb-stepper button:focus-visible, .bb-x-go:focus-visible, .bb-x-beside:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bb-btn[hidden] { display: none; }

/* Display */
.bb-display { max-width: 30rem; }
.bb-set-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 0; border-bottom: 1px dotted var(--rule); }
.bb-set-k { font-family: var(--caps); font-size: 1rem; letter-spacing: 0.08em; color: var(--muted); }
.bb-seg, .bb-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--rule); }
.bb-seg button, .bb-stepper button { min-height: 2.4rem; padding: 6px 12px; border: 0; border-left: 1px solid var(--rule); border-radius: 0; background: none; box-shadow: none; font: inherit; font-size: 1rem; color: var(--ink); cursor: pointer; }
.bb-seg button:first-child, .bb-stepper button:first-child { border-left: 0; }
.bb-seg button[aria-pressed="true"] { background: color-mix(in srgb, var(--rubric) 16%, transparent); color: var(--rubric); }
.bb-seg button:hover, .bb-stepper button:hover:not(:disabled) { color: var(--rubric); }
.bb-stepper button { min-width: 3rem; font-family: var(--display); font-size: 1.1rem; }
.bb-stepper button:last-child { border-left: 1px solid var(--rule); }
.bb-stepper button:disabled { opacity: 0.35; cursor: default; }
.bb-stepper output { display: inline-flex; align-items: center; justify-content: center; min-width: 4rem; border-left: 1px solid var(--rule); font-feature-settings: "lnum"; }
.bb-f-sans { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important; font-size: 0.92rem !important; }
.bb-check { display: flex; align-items: flex-start; gap: 0.6rem; padding: 10px 0 2px; font-size: 1.04rem; cursor: pointer; }
.bb-check input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0.22em 0 0; accent-color: var(--rubric); cursor: pointer; }
.bb-check input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bb-set-note { margin: 14px 0 0; font-size: 0.95rem; font-style: italic; color: var(--muted); }

/* a note */
.bb-note-verse { margin: 0 0 10px; max-height: 7.5em; overflow-y: auto; font-style: italic; color: var(--muted); line-height: 1.45; }
.bb-note textarea { display: block; box-sizing: border-box; width: 100%; min-height: 9rem; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 0; background: none; font: inherit; font-size: 1.08rem; line-height: 1.5; color: var(--ink); resize: vertical; }
.bb-note textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.bb-note-at { min-height: 1.2em; margin: 6px 0 0; font-size: 0.9rem; font-style: italic; color: var(--muted); }
.bb-sheet-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }

/* compare */
.bb-cmp { padding: 10px 0 14px; border-bottom: 1px solid var(--rule); }
.bb-cmp:last-child { border-bottom: 0; }
.bb-cmp h4 { margin: 0 0 4px; font-family: var(--text); font-weight: 400; font-style: italic; font-size: 1rem; color: var(--muted); }
.bb-cmp-v { margin-right: 0.4em; font-family: var(--caps); font-style: normal; letter-spacing: 0.1em; color: var(--rubric); }
.bb-cmp-t { margin: 0 0 10px; font-size: 1.14rem; line-height: 1.58; }
.bb-cmp-t .bb-n { margin-right: 0.2em; }
.bb-cmp .bb-btn { padding: 5px 12px; font-size: 0.95rem; }

/* cross references */
.bb-x-h { margin: 12px 0 2px; font-family: var(--caps); font-weight: 400; font-size: 0.95rem; letter-spacing: 0.1em; color: var(--muted); }
.bb-x-list { margin: 0; padding: 0; list-style: none; }
.bb-x-list li { display: flex; align-items: stretch; border-bottom: 1px dotted var(--rule); }
.bb-x-go { flex: 1; min-width: 0; display: block; padding: 8px 6px 9px; border: 0; border-radius: 0; background: none; box-shadow: none; font: inherit; text-align: left; color: var(--ink); cursor: pointer; }
.bb-x-go:hover { background: color-mix(in srgb, var(--rubric) 8%, transparent); }
.bb-x-r { display: block; font-family: var(--caps); font-size: 0.9rem; letter-spacing: 0.07em; color: var(--rubric); }
.bb-x-t { display: block; font-size: 1.04rem; line-height: 1.45; }
.bb-x-beside { flex: none; width: 2.8rem; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--muted); cursor: pointer; }
.bb-x-beside:hover { color: var(--rubric); background: color-mix(in srgb, var(--rubric) 8%, transparent); }
.bb-x-credit, .bb-credit { font-size: 0.9rem; font-style: italic; color: var(--muted); }
.bb-x-credit { margin: 16px 0 0; }
.bb-credit { max-width: 42rem; margin: 22px auto 0; text-align: center; }
.bb-x-credit a, .bb-credit a { color: inherit; }

/* the interlinear: the verse word by word, each word a column (the Hebrew from the right); a tapped word's dictionary
   form and grammar held at the foot of the sheet, as the words scroll above it */
.bb-inter { max-width: 50rem; }
.bb-inter .bb-sheet-body { padding-bottom: 0; }
.bb-i-en { margin: 0 0 6px; font-size: 1.04rem; line-height: 1.5; }
.bb-i-lang { margin: 0 0 10px; font-size: 0.92rem; font-style: italic; color: var(--muted); }
.bb-i-words { display: flex; flex-wrap: wrap; gap: 4px 2px; margin: 0 0 4px; padding: 0; list-style: none; }
.bb-i-words[dir="rtl"] { direction: rtl; }
.bb-i-w button { direction: ltr; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 4rem; max-width: 9.5rem; height: 100%; box-sizing: border-box; padding: 4px 7px 7px; border: 1px solid transparent; border-radius: 0; background: none; box-shadow: none; font: inherit; color: var(--ink); text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bb-i-w button:hover { border-color: var(--rule); }
.bb-i-w button[aria-pressed="true"] { border-color: var(--rubric); background: color-mix(in srgb, var(--rubric) 10%, transparent); }
.bb-i-w button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.bb-i-o { font-family: var(--text); font-size: 1.45rem; line-height: 1.45; }
.bb-i-o:lang(he), .bb-i-o:lang(arc), .bb-inter [lang="he"], .bb-inter [lang="arc"] { font-family: "Noto Serif Hebrew", "SBL Hebrew", "Ezra SIL", "Times New Roman", serif; unicode-bidi: isolate; }
.bb-i-o:lang(he), .bb-i-o:lang(arc) { font-size: 1.6rem; line-height: 1.75; }
.bb-i-tr { font-size: 0.86rem; font-style: italic; line-height: 1.25; color: var(--muted); }
.bb-i-g { margin-top: 2px; font-size: 0.98rem; line-height: 1.25; }
.bb-i-n { margin-top: 3px; font-family: var(--caps); font-size: 0.76rem; letter-spacing: 0.06em; color: var(--rubric); }
.bb-i-mute { color: var(--muted); font-style: italic; }
/* a Greek word that the edition behind this version does not have, or has in another form */
.bb-i-w.is-out button { opacity: 0.5; border: 1px dashed var(--rule); }
.bb-i-w.is-out button[aria-pressed="true"] { opacity: 0.85; border-style: solid; border-color: var(--rubric); }
.bb-i-w.is-var .bb-i-o::after, .bb-i-k-var { content: "†"; margin-left: 1px; font-size: 0.7em; vertical-align: super; color: var(--rubric); }
.bb-i-key { margin: 6px 0 0; font-size: 0.88rem; font-style: italic; color: var(--muted); }
.bb-i-k-out { padding: 0 4px; border: 1px dashed var(--rule); font-style: normal; opacity: 0.7; }
.bb-i-k-var { margin: 0; font-style: normal; }
/* the word tapped */
.bb-i-detail { position: sticky; bottom: 0; z-index: 1; max-height: min(42vh, 20rem); overflow-y: auto; margin: 12px -16px 0; padding: 10px 16px 12px; border-top: 1px solid var(--press); background: var(--bg); box-shadow: 0 -10px 18px -14px var(--shadow); }
.bb-i-hint { margin: 0; font-size: 0.95rem; font-style: italic; color: var(--muted); }
.bb-i-d-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.bb-i-d-o { font-family: var(--text); font-size: 1.6rem; line-height: 1.5; }
.bb-i-d-o:lang(he), .bb-i-d-o:lang(arc) { font-size: 1.75rem; line-height: 1.7; }
.bb-i-d-tr { color: var(--muted); }
.bb-i-d-g { font-size: 1.04rem; }
.bb-i-parts { margin: 6px 0 0; padding: 0; list-style: none; }
.bb-i-part { padding: 5px 0 6px; border-top: 1px dotted var(--rule); line-height: 1.45; }
.bb-i-part:not(.is-root) { font-size: 0.95rem; color: var(--muted); }
.bb-i-p-o { font-size: 1.25rem; color: var(--ink); }
.bb-i-p-o:lang(he), .bb-i-p-o:lang(arc), .bb-i-p-lex [lang="he"], .bb-i-p-lex [lang="arc"] { font-size: 1.3rem; }
.bb-i-p-n { font-family: var(--caps); font-size: 0.85rem; letter-spacing: 0.06em; color: var(--rubric); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.bb-i-p-n:hover { text-decoration-thickness: 2px; }
.bb-i-p-n:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bb-i-p-gram { display: block; font-size: 0.92rem; color: var(--muted); }
.bb-i-p-gram b { font-weight: 600; color: var(--ink); }
.bb-i-part:not(.is-root) .bb-i-p-gram b { color: inherit; font-weight: 400; }
.bb-i-note { margin: 6px 0 0; font-size: 0.92rem; font-style: italic; color: var(--muted); }
/* a word's full definition, folded until it is opened; while one is open the panel takes more of the sheet */
.bb-i-detail.is-def { max-height: min(72vh, 44rem); }
.bb-i-def { margin: 7px 0 2px; }
.bb-i-def > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 2rem; padding: 2px 11px 2px 9px; border: 1px solid var(--rule); font-family: var(--caps); font-size: 0.86rem; letter-spacing: 0.08em; color: var(--rubric); cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.bb-i-def > summary::-webkit-details-marker { display: none; }
.bb-i-def > summary::before { content: ""; width: 0.4rem; height: 0.4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.2s ease; }
.bb-i-def[open] > summary::before { transform: rotate(45deg); }
.bb-i-def > summary:hover { border-color: var(--rubric); }
.bb-i-def > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bb-i-def-b { margin: 8px 0 4px; padding: 2px 0 2px 12px; border-left: 2px solid var(--rule); font-family: "EB Garamond", Georgia, "Times New Roman", serif; font-size: 0.98rem; font-style: normal; line-height: 1.5; color: var(--ink); }
.bb-i-def-b p { margin: 0 0 6px; }
.bb-i-def-b b { font-weight: 600; }
.bb-i-def-b [lang="he"] { font-size: 1.12em; white-space: nowrap; }   /* (a phrase broken over two lines reads out of order) */
/* the head: the word, its sound and how it is said */
.bb-i-def-b .d-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; margin-bottom: 4px; }
.bb-i-def-b .d-head > [lang="he"] { font-size: 1.5em; line-height: 1.4; }
.bb-i-def-b .d-say { font-size: 0.9em; color: var(--muted); }
.bb-i-def-b .d-hw { margin-bottom: 4px; }
.bb-i-def-b .d-hw > b:first-of-type { font-size: 1.12em; }
/* Strong's Hebrew: each part under its label; the meanings one to a line; the KJV's renderings one by one */
.bb-i-def-b .d-k { margin: 12px 0 4px; font-family: var(--caps); font-size: 0.78rem; letter-spacing: 0.12em; color: var(--rubric); }
.bb-i-def-b ul.d-mean { margin: 0 0 4px; padding-left: 1.15em; }
.bb-i-def-b ul.d-mean li { margin: 0 0 3px; padding-left: 2px; }
.bb-i-def-b ul.d-mean li::marker { color: var(--rubric); }
.bb-i-def-b ul.d-kjv { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 6px; padding: 0; list-style: none; }
.bb-i-def-b ul.d-kjv li { padding: 0 7px 1px; border: 1px solid var(--rule); font-size: 0.92rem; line-height: 1.45; }
.bb-i-def-b ul.d-kjv li.d-p::before { content: "+"; margin-right: 3px; color: var(--rubric); }
.bb-i-def-b ul.d-kjv li.d-x::before { content: "×"; margin-right: 3px; color: var(--rubric); }
.bb-i-def-b .d-note { font-size: 0.92rem; font-style: italic; color: var(--muted); }
/* Abbott-Smith's Greek: a line to each sense, its number hanging, set in by its rank; the references lighter */
.bb-i-def-b .d-lxx { font-size: 0.9rem; color: var(--muted); }
.bb-i-def-b .d-s { margin: 9px 0 2px; }
.bb-i-def-b .d-c { margin: 3px 0 2px; }
.bb-i-def-b .d-l1 { padding-left: 1.7em; text-indent: -1.7em; }
.bb-i-def-b .d-l2 { padding-left: 2.6em; text-indent: -1.6em; }
.bb-i-def-b .d-l3 { padding-left: 3.6em; text-indent: -1.7em; }
.bb-i-def-b .d-l4 { padding-left: 4.6em; text-indent: -1.7em; }
.bb-i-def-b .d-c.d-l1, .bb-i-def-b .d-c.d-l2, .bb-i-def-b .d-c.d-l3, .bb-i-def-b .d-c.d-l4 { text-indent: 0; }
.bb-i-def-b .d-n { display: inline-block; min-width: 1.3em; font-weight: 600; text-indent: 0; color: var(--rubric); }
.bb-i-def-b .d-r { font-size: 0.86em; color: var(--muted); }
.bb-i-def-b .d-rl { white-space: nowrap; text-indent: 0; }             /* each reference a citation (.ref-text, css/manuscript.css) */
.bb-i-def-b .d-rw { white-space: nowrap; }
.bb-i-def-b .d-syn { margin-top: 10px; font-size: 0.92rem; color: var(--muted); }
/* a key to the marks the entry has, and the book it is from */
.bb-i-def-b .d-key { margin-top: 10px; font-size: 0.82rem; line-height: 1.45; color: var(--muted); }
.bb-i-def-b .d-km { color: var(--rubric); }
.bb-i-def-b .d-from { margin-top: 8px; font-size: 0.8rem; font-style: italic; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .bb-i-def > summary::before, .bb-i-attr > summary::before { transition: none; } }
/* the sources of the sheet, folded under one small line */
.bb-i-attr { margin: 14px 0 14px; font-size: 0.86rem; color: var(--muted); }
.bb-i-attr > summary { display: inline-flex; align-items: center; gap: 7px; min-height: 1.8rem; font-family: var(--caps); font-size: 0.78rem; letter-spacing: 0.12em; color: var(--muted); cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.bb-i-attr > summary::-webkit-details-marker { display: none; }
.bb-i-attr > summary::before { content: ""; width: 0.36rem; height: 0.36rem; border-right: 1.3px solid currentColor; border-bottom: 1.3px solid currentColor; transform: rotate(-45deg); transition: transform 0.2s ease; }
.bb-i-attr[open] > summary::before { transform: rotate(45deg); }
.bb-i-attr > summary:hover { color: var(--rubric); }
.bb-i-attr > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bb-i-attr p { margin: 6px 0 0; font-style: italic; line-height: 1.45; }
.bb-i-attr a { color: inherit; }

/* ---- reading aloud ---- */
.bb-audio { position: fixed; z-index: 39; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: min(32rem, calc(100% - 16px)); padding: 6px 8px; border: 1px solid var(--press); background: var(--bg); box-shadow: 0 14px 40px var(--shadow); }
.bb-audio[hidden] { display: none; }
body.bb-acting .bb-audio { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 9.4rem); }
.bb-au-btn { flex: none; width: 2.5rem; height: 2.5rem; padding: 0; border: 1px solid var(--rule); border-radius: 0; background: none; box-shadow: none; font-size: 0.9rem; color: var(--rubric); cursor: pointer; }
.bb-au-btn:hover { border-color: var(--rubric); }
.bb-au-now { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.98rem; color: var(--ink); }
.bb-au-rate select { height: 2.5rem; padding: 0 6px; border: 1px solid var(--rule); border-radius: 0; background: var(--bg); font: inherit; font-size: 0.95rem; color: var(--ink); }
.bb-au-btn:focus-visible, .bb-au-rate select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
body.bb-listening .page { padding-bottom: 4rem; }
body.bb-listening .bb.multi .bb-scroll { padding-bottom: 5rem; }
body.bb-acting.bb-listening .page { padding-bottom: 13.5rem; }
body.bb-acting.bb-listening .bb.multi .bb-scroll { padding-bottom: 14rem; }

/* ---- a word at the top of the screen ---- */
.bb-toast { position: fixed; z-index: 60; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); box-sizing: border-box; max-width: calc(100% - 32px); margin: 0; padding: 9px 16px; border: 1px solid var(--press); background: var(--ink); color: var(--bg); font-size: 1rem; line-height: 1.35; text-align: center; box-shadow: 0 10px 30px var(--shadow); pointer-events: none; }
.bb-toast[hidden] { display: none; }

@media (max-width: 780px) {
  .bb-tools { gap: 8px; }
  .bb-tool-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(3.6rem, 1fr)); width: 100%; gap: 4px; }
  .bb-tool { flex-direction: column; gap: 3px; min-height: 3.2rem; padding: 6px 2px 5px; font-size: 0.82rem; }
  .bb-tools { position: relative; }
  .bb-tool-wrap { display: flex; position: static; }      /* its menu is placed across the tools, so it stays on a narrow screen */
  .bb-tool-wrap .bb-tool { flex: 1; }
  .bb-sheet { width: calc(100% - 12px); }
  .bb-i-w button { min-width: 3.6rem; padding: 4px 4px 6px; }
  .bb-i-o { font-size: 1.32rem; }
  .bb-i-o:lang(he), .bb-i-o:lang(arc) { font-size: 1.45rem; }
  .bb-i-g { font-size: 0.92rem; }
  .bb-act { width: calc(100% - 10px); padding: 4px 6px 6px; }
  .bb-act-colors { gap: 8px; }
  .bb-act-row button { min-width: 3.5rem; font-size: 0.8rem; }
  /* every choice in sight, without scrolling the row: two rows of four; the page keeps room for the taller bar */
  .bb-act-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  .bb-act-row button { min-width: 0; padding: 5px 2px 4px; }
  body.bb-acting .page { padding-bottom: 12rem; }
  body.bb-acting .bb.multi .bb-scroll { padding-bottom: 12.6rem; }
  body.bb-acting .bb-audio { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 12rem); }
  body.bb-acting.bb-listening .page { padding-bottom: 16.2rem; }
  body.bb-acting.bb-listening .bb.multi .bb-scroll { padding-bottom: 16.7rem; }
}
@media (max-height: 520px) {
  .bb-menu button { padding: 6px 12px; }
  .bb-menu button span { display: none; }        /* a short screen, a phone on its side: the names alone */
}
@media (max-width: 360px) {
  .bb-bar .bb-searchbtn { display: none; }      /* the smallest phones: search from ⋯ */
}
@media print {
  .bb-tools, .bb-hint, .bb-act, .bb-audio, .bb-toast, .bb-sheet, .bb-after, .bb-credit, .bb-link, .bb-close, .bb-ver-l { display: none !important; }
  .bb.multi .bb-work { display: block; height: auto; border: 0; }
  .bb.multi .bb-scroll { overflow: visible; }
  .bb-t[data-hl], .bb-text mark.bb-w { background: none; }
}
