/* Home presentation and a modest reading-tier size hierarchy; existing fonts/colors inherit. */
.scripture-home-header { max-width: 700px; margin: 0 auto; padding: 40px 20px 0; text-align: center; }
.scripture-home-title { font-family: 'David Libre', serif; font-weight: 400; font-size: clamp(1.15rem, 3.8vw, 2rem); line-height: 1.25; margin: 0; direction: ltr; color: var(--ink-light); }
.scripture-home-subtitle { font-family: 'David Libre', serif; font-weight: 700; font-size: clamp(1.25rem, 6.25vw, 2.5rem); line-height: 1.3; color: #000745; margin-top: 8px; white-space: nowrap; direction: ltr; }
.scripture-home-header > .scripture-section-heading { margin-top: 24px; font-size: 1.6rem; }
.scripture-home .scripture-section-heading { text-align: center; direction: ltr; font-size: 1.25rem; line-height: 1.4; color: var(--ink); }
.scripture-home .scripture-section-translit { display: block; font-size: 1rem; font-weight: 400; direction: ltr; }
.scripture-home .scripture-home-header > .scripture-section-heading { font-size: 1.6rem; }
.scripture-home-strip { display: flex; justify-content: center; gap: 6px; margin-top: 20px; direction: rtl; }
.scripture-home-strip-item { display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 0; max-width: 180px; }
.scripture-strip-hebrew { font-size: 1.6rem; color: var(--ink); }
.scripture-strip-translit { font-size: 1rem; direction: ltr; white-space: nowrap; }
.scripture-strip-english { font-size: 0.95rem; direction: ltr; }
.scripture-home .scripture-home-book > .scripture-book-heading { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 22px 0 10px; text-align: center; letter-spacing: normal; line-height: 1.4; }
.scripture-book-hebrew { display: block; font-size: 2rem; color: var(--ink); direction: rtl; }
.scripture-book-translit { display: block; font-size: 1.15rem; font-weight: 400; color: var(--ink-light); direction: ltr; overflow-wrap: anywhere; max-width: 100%; hyphens: none; }
.scripture-book-english { display: block; font-size: 1.85rem; max-width: 100%; overflow-wrap: break-word; color: var(--ink); direction: ltr; }
.scripture-home .landing-sec-btn { text-decoration: none; }
/* Preserve the English tier and Hebrew tier; increase only the transliteration modestly. */
body .word-unit .tl { font-size: calc(var(--t0) * 1.1) !important; }
body #xref-panel .tl, body #glossary-panel .tl, body #rsc-panel .xref-ref-word .tl {
  font-size: calc(var(--t-small) * 1.1) !important;
}

/* Mobile Dual previously made Hebrew equal to English. Keep it modestly above
   the transliteration while retaining the existing stacked layout. */
@media (max-width: 600px), (orientation: portrait) and (pointer: coarse) and (max-width: 900px) {
  body.dual-mode #page { --t4: 1.05em; }
}

/* Keep the three Tanakh labels readable on narrow phones. Their longest
   transliteration is wider than a one-third column, so stack these groups
   before flex-item overflow clips their text at small viewport widths. */
@media (max-width: 430px) {
  .scripture-home-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }
  .scripture-home-strip-item {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }
  .scripture-strip-translit {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Both readers already share the type scale. Match NT row spacing to the
   current OSHB Tanakh flow without changing its source word groups. */
body.hebrew-nt-reader .chapter-panel .verse .word-flow {
  display: flex !important; flex-wrap: wrap; align-items: flex-start;
  gap: .25em .38em !important; word-spacing: normal; line-height: normal;
}
body.hebrew-nt-reader .chapter-panel .verse .word-flow > .word-group {
  flex: 0 1 auto; min-width: 0; max-width: 100%; margin-bottom: 0; word-spacing: normal;
}

/* Presentation-only inherited decorations. Keep their source tables and DOM
   provenance, and reserve the lower-tier arrow space so word spacing stays. */
body.hebrew-nt-reader .arr-tl, body.hebrew-nt-reader .arr-gl { visibility: hidden; }
body.hebrew-nt-reader .hw .sacc::before { content: none; }

/* Bible presentation only: keep the inherited U+05C7 / .qq source markers,
   but suppress Chris's red Qamats Qatan underline in every view and popup.
   This stylesheet is shared by both Bible readers; phonology never reads CSS. */
body .qq { text-decoration: none !important; }

/* Each ordinary source/display unit takes the widest unwrapped tier. Only
   the available reading width constrains it; whole units still wrap in RTL. */
body.bible-fluent-reader .chapter-panel .word-unit:not(.oshb-ketiv-qere),
body.bible-fluent-reader .chapter-panel .oshb-qere-column {
  box-sizing: border-box; inline-size: max-content; max-inline-size: 100%;
  min-inline-size: 0; align-items: stretch;
}
body.bible-fluent-reader .chapter-panel .word-unit:not(.oshb-ketiv-qere) > :is(.hw, .tl, .gl),
body.bible-fluent-reader .chapter-panel .oshb-qere-column > :is(.hw, .tl, .gl) {
  inline-size: auto; min-inline-size: 0 !important;
  text-align: center; text-align-last: center;
}
body.bible-fluent-reader .chapter-panel :is(.word-unit, .oshb-qere-column) > .gl {
  max-width: none !important; padding-inline: 0 !important;
  white-space: normal !important; overflow-wrap: break-word !important;
}
body.bible-fluent-reader .chapter-panel :is(.word-unit, .oshb-qere-column) > .tl {
  white-space: normal; overflow-wrap: anywhere;
}
body.bible-fluent-reader.oshb-source-enabled .chapter-panel :is(.word-unit, .oshb-qere-column) > .tl {
  white-space: nowrap; overflow-wrap: normal;
}
/* Preserve the continuous, unbreakable Hebrew Maqqef run. Its lower tiers
   determine intrinsic group width too, and may wrap inside a viewport cap. */
body.bible-fluent-reader .chapter-panel .oshb-maqqef-tier {
  min-inline-size: 0;
}
body.bible-fluent-reader .chapter-panel .oshb-maqqef-token {
  flex-shrink: 1; min-inline-size: 0 !important;
  white-space: normal; overflow-wrap: break-word !important;
}
body.bible-fluent-reader .chapter-panel .oshb-maqqef-token.tl {
  flex-shrink: 0; white-space: nowrap; overflow-wrap: normal !important;
}
