body.owner-transliteration-enabled .chapter-panel .word-flow .word-unit > .tl {
  display: block !important;
  white-space: nowrap;
  text-align: center;
  direction: ltr;
}
body.owner-transliteration-enabled .oshb-source-word > .tl { display:block !important; }
.oshb-source-word > .tl.oshb-unavailable { font-size:.78em; opacity:.7; }
body.oshb-source-enabled .word-unit[data-oshb-interaction] > .hw { cursor: help; }
/* OSHB owns the column model.  A word is an intrinsic-size flex item: its
   inline size is the widest of its three centred tiers, never a Hebrew-only
   or equal grid width. */
.oshb-word-flow {
  --oshb-word-gap: .38em;
  /* David Libre's two normal space advances measure .410em. Each lower row
     inherits its source tier's font, so the separator follows A+ exactly. */
  --oshb-maqqef-token-gap: .41em;
}
body .chapter-panel .verse .word-flow.oshb-word-flow {
  display: flex !important; flex-wrap: wrap; align-items: flex-start;
  gap: .25em var(--oshb-word-gap) !important; word-spacing: normal; line-height: normal;
}
.oshb-source-word {
  display: inline-flex; flex: 0 0 auto; flex-direction: column; align-items: stretch;
  inline-size: max-content; max-inline-size: 100%; min-inline-size: 0;
  unicode-bidi: isolate; white-space: nowrap;
}
.oshb-source-word > .hw, .oshb-source-word > .tl, .oshb-source-word > .gl {
  inline-size: 100%; min-inline-size: 0; text-align: center; text-align-last: center;
}
.oshb-source-word > .tl, .oshb-source-word > .gl { overflow-wrap: anywhere; }
.oshb-source-word > .gl { max-width: none; max-inline-size: 100%; }
/* A group is one unbreakable flex item.  In separate mode its source columns
   are retained; the measurement pass permits it only when their Hebrew ink
   is indistinguishable from one uninterrupted maqqef expression. */
.oshb-maqqef-group {
  display: inline-flex; flex: 0 0 auto; flex-wrap: nowrap; gap: 0; direction: rtl;
  white-space: nowrap; max-inline-size: 100%; overflow: visible;
  align-self: flex-start; align-items: flex-start; vertical-align: top;
}
.oshb-maqqef-group > .oshb-source-word { margin: 0 !important; padding-inline: 0 !important; flex: 0 0 auto; }
/* Qere and overlong groups use source-linked connected runs. The original
   records stay intact; the runs wrap in the normal reader flow. */
.oshb-maqqef-group.oshb-source-projection { display: contents; }
.oshb-projected-run {
  display: inline-grid; flex: 0 0 auto; max-inline-size: 100%; min-inline-size: 0;
  grid-template-columns: minmax(0, max-content); grid-template-rows: auto auto auto;
  direction: rtl; align-items: start; justify-items: stretch; box-sizing: border-box;
}
/* Standalone pairs retain the ordinary word-unit's existing side spacing. */
.oshb-source-projection[data-oshb-standalone-reading] > .oshb-projected-run { padding-inline: 5px; }
.oshb-projected-run > .oshb-maqqef-hebrew { white-space: normal; }
/* Each group accommodates the widest of its three complete tiers. A narrow
   Hebrew line must not force its pronunciation or phrase gloss to stack. */
.oshb-projected-run > .oshb-maqqef-tier,
.oshb-maqqef-combined > .oshb-maqqef-tier {
  min-inline-size: 0; max-inline-size: 100%; flex-wrap: wrap;
}
.oshb-projected-run > .oshb-maqqef-tl,
.oshb-maqqef-combined > .oshb-maqqef-tl {
  min-inline-size: max-content; flex-wrap: nowrap; white-space: nowrap;
}
.oshb-projected-run .gl.oshb-maqqef-token,
.oshb-maqqef-combined .gl.oshb-maqqef-token {
  max-inline-size: 100% !important;
  white-space: normal; overflow-wrap: anywhere;
}
body.oshb-source-enabled .word-flow .oshb-measure-natural {
  inline-size: max-content !important; max-inline-size: none !important; flex: 0 0 auto !important;
}
.oshb-wide-line {
  display: flex; flex: 0 0 100%; inline-size: 100%; min-inline-size: 0;
  justify-content: center; direction: rtl;
}
body.oshb-source-enabled .word-flow .oshb-wide-group {
  inline-size: var(--oshb-wide-width) !important;
  max-inline-size: var(--oshb-wide-width) !important;
  flex: 0 0 auto !important; position: relative; left: var(--oshb-wide-offset, 0px);
}
.oshb-tier-continuation > .oshb-maqqef-tl {
  min-inline-size: 0; flex-wrap: wrap;
}
.oshb-projected-run .oshb-ketiv {
  display: inline; font: inherit; padding: 0; margin: 0; white-space: nowrap;
}
.oshb-projected-run .oshb-maqqef-hebrew-piece:hover {
  background: color-mix(in srgb, var(--here-chrome) 28%, transparent); border-radius: 6px;
}
.oshb-projected-run .oshb-maqqef-token[data-oshb-word-ref]:hover {
  background: var(--hover-wash); border-radius: 3px;
}
.oshb-maqqef-group.oshb-maqqef-combined {
  display: inline-grid; grid-template-columns: minmax(0, max-content); grid-template-rows: auto auto auto;
  justify-items: stretch; align-items: start; white-space: normal;
}
.oshb-maqqef-records[hidden] { display: none !important; }
.oshb-maqqef-hebrew { grid-row: 1; grid-column: 1; direction: rtl; white-space: nowrap; text-align: center; }
/* Source punctuation now shares the Hebrew row rather than the full column;
   inherit its existing Scripture size instead of applying the em scale twice. */
body.bible-fluent-reader .word-flow .hw .oshb-source-marks { font-size: inherit; line-height: inherit; }
.oshb-maqqef-hebrew-piece { display: inline; font: inherit !important; direction: rtl; unicode-bidi: bidi-override; cursor: help; }
.oshb-maqqef-tier {
  grid-column: 1; display: flex; direction: rtl; justify-content: center; align-items: start;
  column-gap: var(--oshb-maqqef-token-gap); min-inline-size: max-content;
}
.oshb-maqqef-tier:empty { display: none; }
.oshb-maqqef-tl { grid-row: 2; margin-top: 2px; }
.oshb-maqqef-gl { grid-row: 3; margin-top: 2px; }
.oshb-maqqef-token {
  direction: ltr; unicode-bidi: isolate; white-space: nowrap; text-align: center; cursor: help;
  flex: 0 0 auto;
  max-width: none !important; padding: 0 !important; margin: 0 !important;
}
body.owner-transliteration-enabled .oshb-maqqef-token.tl { display: inline-block !important; }
.oshb-maqqef-token:focus-visible, .oshb-maqqef-hebrew-piece:focus-visible { outline: 2px solid var(--sw-gold, var(--here-chrome)); outline-offset: 2px; }
/* Match the existing Hebrew selection wash and lighter lower-tier hover wash.
   Suppress the inherited whole-column wash so it is not composited twice. */
.oshb-word-flow .oshb-source-word:hover { background: transparent; }
.oshb-source-word.oshb-source-hover > .hw, .oshb-maqqef-hebrew-piece.oshb-source-hover {
  background: color-mix(in srgb, var(--here-chrome) 28%, transparent); border-radius: 6px;
}
.oshb-source-word.oshb-source-hover > .tl, .oshb-source-word.oshb-source-hover > .gl,
.oshb-maqqef-token.oshb-source-hover { background: var(--hover-wash); border-radius: 3px; }
@media (max-width: 600px) {
}
/* Explicit Tanakh written/reading pairs: written text has no lower-tier slot.
   Every actual Qere retains its independent, naturally sized reading column. */
.oshb-source-enabled .oshb-word-flow .word-unit.oshb-ketiv-qere {
  display: inline-flex; flex-direction: row; direction: rtl;
  align-items: baseline; gap: .3em; white-space: normal;
  inline-size: max-content; max-inline-size: 100%; min-inline-size: 0;
  flex-wrap: wrap; overflow: visible;
}
.oshb-ketiv-qere > .oshb-ketiv {
  align-self: baseline; unicode-bidi: isolate;
  inline-size: max-content; min-inline-size: 0; padding-inline: 0;
  flex: 0 0 auto;
}
.oshb-qere-column {
  display: inline-flex; flex-direction: column; align-items: center;
  vertical-align: baseline; white-space: nowrap; unicode-bidi: isolate;
  flex: 0 0 auto;
}
.oshb-qere-column > .tl, .oshb-qere-column > .gl { direction: ltr; unicode-bidi: isolate; }
body.owner-transliteration-enabled .oshb-qere-column > .tl { display: block !important; }
.oshb-source-word[data-oshb-ketiv-qere-member][hidden] { display: none !important; }
.oshb-ketiv-qere.oshb-source-hover > .oshb-ketiv { background: transparent; cursor: default; }
.oshb-qere-column:hover > .hw, .oshb-qere-column:focus-visible > .hw {
  background: color-mix(in srgb, var(--here-chrome) 28%, transparent); border-radius: 6px;
}
.oshb-qere-column:hover > .tl, .oshb-qere-column:hover > .gl {
  background: var(--hover-wash); border-radius: 3px;
}
.oshb-qere-run { align-self: baseline; overflow-y: visible; }
.oshb-qere-run [data-oshb-qere-id]:hover { background: var(--hover-wash); border-radius: 3px; }

/* NT-only counterpart of the Tanakh's source/transliteration control row. */
#ot-transliteration-controls {
  box-sizing: border-box; flex: 0 0 100%; width: 100%; margin: 0 auto 1em;
  padding: .65em; border: 1px solid var(--rule-light, #ccc); border-radius: 4px;
  background: var(--bg, #faf8f4); color: var(--ink, #000745);
  font: .9rem/1.4 'David Libre', Georgia, serif; text-align: left; overflow-wrap: anywhere;
}
#ot-transliteration-controls label { display: inline-block; }
#ot-transliteration-controls select {
  max-width: 100%; min-height: 44px; font: inherit;
  background: var(--bg, #faf8f4); color: inherit;
}
#ot-transliteration-controls p { margin: .35em 0; }
