/* דָּוִד בֵּין הָעִתִּים — HTML apparatus */

:root {
  --hebrew-stack: "SBL Hebrew", "Ezra SIL", "Arial Hebrew", "Times New Roman", serif;
}

/* Hebrew display blocks (fenced-div classes; see filters/rtl-divs.lua).
   The drafted chapters still carry inline-styled HTML divs, which keep
   working in HTML as-is; these classes are the migration target. */

.journal {
  direction: rtl;
  text-align: right;
  font-family: var(--hebrew-stack);
  font-size: 1.05em;
  line-height: 1.9;
  border: 1px solid #ccc;
  padding: 20px;
  background-color: #f9f9f0;
  margin: 1.2em 0;
}

.biblical {
  direction: rtl;
  text-align: right;
  font-family: var(--hebrew-stack);
  font-size: 1.15em;
  line-height: 2.0;
  margin: 1.2em 0.5em;
  padding: 15px;
  background-color: #f5f5f0;
}

.display-he {
  direction: rtl;
  text-align: center;
  /* Hebrew via the SBL stack; Paleo-Hebrew (Phoenician) falls through per-glyph
     to Noto Sans Phoenician — one .display-he carries both scripts (book.lua
     sets the RTL base with \pardir TRT, not a Hebrew-font switch). */
  font-family: var(--hebrew-stack), "Noto Sans Phoenician";
  font-size: 2em;
  margin: 0.8em 0;
}

/* Centered English caption sitting under a .display-he block (e.g. a sign) */
.display-caption {
  text-align: center;
  font-style: italic;
  margin: -0.5em 0 0.9em;
}

/* Part-Two fading scaffold (D6/D21): dialogue translations collected at the
   end of each scene as a recessive LTR aside — small, greyed, set apart, so
   the eye skips it while reading the Hebrew above. Placed after the scene's
   vocabulary box (translation as last-resort check). */
.scene-translation {
  font-size: 0.85em;
  color: #6a6a66;
  border-left: 2px solid #ddd;
  padding-left: 0.9em;
  margin: 1em 0 1.3em;
  line-height: 1.5;
}

.scene-translation p {
  margin: 0.3em 0;
}

/* Facing-gloss layout (filters/cols.lua handles PDF; this handles HTML) */

.cols {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.2em;
  margin: 1em 0;
}

.cols .right {
  font-size: 0.92em;
}

@media (max-width: 640px) {
  .cols {
    grid-template-columns: 1fr;
  }
}

/* RTL dialogue blockquotes (filters/rtl-quotes.lua wraps them in
   div[dir=rtl]) — mirror the quote rule to the right side */

div[dir="rtl"] blockquote,
div[dir="rtl"] .blockquote {
  border-left: none;
  border-right: 0.25rem solid #e9ecef;
  padding-left: 0;
  padding-right: 1rem;
  margin-right: 0;
  font-family: var(--hebrew-stack);
}

/* Latin apparatus inside Hebrew-stack blocks (book.lua wraps it in
   [.apparatus]{} for HTML): stage directions "(whispering)", drill cues
   "(who)", citation-line English halves "/ 1 Chronicles 12:33)". Without
   this they inherit the Hebrew stack above, whose Latin glyphs are serif —
   hand them back the theme's body sans so apparatus reads as apparatus. */

.apparatus {
  font-family: var(--bs-body-font-family, system-ui, sans-serif);
}

/* Dark-theme adjustments */

body.quarto-dark .journal,
body.quarto-dark .biblical {
  background-color: #1d1d18;
  border-color: #555;
}

body.quarto-dark .scene-translation {
  color: #9a9a92;
  border-left-color: #444;
}
