/* Styles for versification-and-cantillation.html.

   This .css file is the source of truth; generate_doc.py copies it verbatim into
   gh-pages/MAM-simple/ alongside the generated HTML, which links it as a sibling
   <link rel="stylesheet">. Edit this file, then regenerate (do not edit the copy
   under gh-pages/).

   The page first links ../document.css for shared English prose. This stylesheet
   adds its Hebrew forms, tables and examples. */
table { border-collapse: collapse; margin: 1rem 0; }
th, td { border: 1px solid light-dark(#ccc, #444); padding: 0.3rem 0.6rem; text-align: start; }
th { background: light-dark(#f5f5f5, #242424); }
/* Compact single-letter row headers (T/E/M/B) in the transposed strand-and-number
   tables keep the header column narrow; each abbr's title holds the full term, shown
   on hover and to assistive tech. The dotted underline + help cursor cue that the
   letter expands. */
th abbr[title] { text-decoration: underline dotted; cursor: help; }
/* In those same transposed tables (all rtl; the only ltr table is the summary),
   center the single-letter row headers (T/E/M/B) and the cv-label cells in the
   number rows (M and B, marked tr.cv). The strand rows (T and E) hold Hebrew and
   keep the default start alignment. */
table[dir="rtl"] th { text-align: center; }
table[dir="rtl"] tr.cv td { text-align: center; }
/* Let the transposed ETMBet strand-and-number tables (all rtl) spill wider than the
   shared prose column. Their Hebrew example words, taken across the row, can run wider
   than the body text — most of all the five-column early-split table — and squeezing
   them to prose width wraps cells and cramps the layout. width:max-content lets each
   table grow as wide as its cells want, up to the two bounds ../document.css defines
   for a table that breaks out of the text column: no wider than the window less 2em,
   and, for a table that cannot wrap that narrow, a start at the window's left gutter
   rather than past the window's left edge, where no scrolling reaches. The body
   content box is itself viewport-centered (margin:auto), so margin-left:50% puts the
   table's left edge at the viewport center and the translateX pulls it back by half
   its own width, re-centering the now-wider-than-parent table on the page. Only the
   top/bottom margins from the general `table` rule are kept. */
table[dir="rtl"] {
  width: max-content;
  max-width: var(--breakout-table-max-width);
  margin-left: 50%;
  transform: translateX(var(--breakout-table-shift));
}
/* A quoted Hebrew verse. "Right-aligned and centered" are not contradictory here:
   the box shrink-wraps to its widest line (fit-content) and is centered on the page
   (margin-inline: auto), while the lines within share a common right edge
   (text-align: right) — i.e. the block is centered, the lines are right-aligned to
   each other. text-align (not direction: rtl) suffices: each line is a single Hebrew
   run, so no BiDi reordering is at stake, only where the line box sits. */
blockquote.verse {
  width: fit-content;
  margin-inline: auto;
  text-align: right;
  border-inline-start: none;
  padding-inline-start: 0;
}

/* Pointed Hebrew — the house block, matching the accgram island (wlc-utils gh-pages/style.css)
   and this repo's own mb_misc/styles_authored.css. Taamey D is the point: this page's payload is
   boundary words stripped to consonants + accents, and a system default font renders those
   accents badly or not at all.

   Tagged: the strand-table cells, the Numbers blockquote, and the Hebrew spliced into prose.
   Deliberately NOT tagged: unpointed Hebrew, i.e. bare-letter terms (תחתון, פסקא באמצע פסוק,
   שמור/זכור, …). They need no accent-legible font, and lang="hbo" here is that font's hook. This
   is a decision, not an oversight — don't "fix" it.

   The explicit 22.4px preserves this page's Hebrew display size after its English
   adopts the shared 14pt body. The former 140% of a 16px body was also 22.4px.
   WLC's bordered range cells use 120% of 14pt, the same display size.

   The attribute selector matches only the tagged element (it is not :lang()), so the .vc-* spans
   nested inside a tagged cell don't re-match. */
*[lang="hbo"] {
  font-family: "Taamey D WOFF2";
  font-size: 22.4px;
  font-feature-settings: 'ss01'; /* ss01 = xataf qamats qatan */
  font-style: normal; /* never italicize Hebrew, even inside italic context */
}
/* The site's one copy of Taamey D, gh-pages/woff2/Taamey_D.woff2. The url resolves against
   this CSS, in gh-pages/MAM-simple/, not against the page. */
@font-face {
  font-family: "Taamey D WOFF2";
  src: url("../woff2/Taamey_D.woff2");
}

/* Deuteronomy appendix: anti-highlighting. Hue marks a chanted verse's role
   (vc-start = green "start", vc-stop = red "stop", vc-mid = neutral interior);
   the vc-agree modifier washes a word out when it is identical to its Exodus
   counterpart, so the eye lands on the words that differ. A vc-mid word without
   vc-agree just inherits the body text color ("full strength"). */
.vc-start { color: light-dark(#0a7a0a, #57c957); }
.vc-stop  { color: light-dark(#c11414, #ff7a7a); }
.vc-start.vc-agree { color: light-dark(#a8cfa8, #59835a); }
.vc-stop.vc-agree  { color: light-dark(#d7abab, #8a5a5a); }
.vc-mid.vc-agree   { color: light-dark(#b3b3b3, #6f6f6f); }

/* Schematic gradient rows (lowercase t/e) below the T/E/M/B tables: an experiment
   echoing the first-word/last-word green→red coloring as a single per-verse gradient
   rather than as tinted words. One cell per chanted verse — a verse spanning several
   taxton columns is one colspanning cell, so its gradient stretches across the whole
   span. These tables are rtl, so a verse runs green at its start (right) to red at its
   stop (left) — hence `to left`. The cells carry no text, only hue, so a small fixed
   height gives them something to show. */
td.vc-grad {
  height: 1.2rem;
  /* light-dark() picks the light value under a light color-scheme, the dark value under
     dark. Unlike the vc-start/vc-stop *text* hues (bright, so thin glyphs read on black),
     these are full-cell fills: the dark-mode greens/reds are deliberately muted so the
     band isn't blinding on the near-black body. Light mode keeps the vivid hues. */
  background: linear-gradient(to left,
    light-dark(#0a7a0a, #1f6b1f),
    light-dark(#c11414, #8a2020));
}
