/*
 * HAR SHALOM CEMETERY — Tefilos · תפילות (/harshalom/tefilos and /harshalom/tefilos/<slug>).
 *
 * File     public/harshalom/static/tefilos.css  (served at /harshalom/static/tefilos.css)
 * Version  0.008 · 2026-11-11 · harshalom/0.018-tefilos (the texts in the page, never pictures)
 * Markup   app/harshalom/tefilos/page.tsx, app/harshalom/tefilos/[slug]/page.tsx,
 *          app/harshalom/tefilos/tefilos-parts.tsx (also drawn by the office's preview,
 *          app/harshalom/admin/tefilos/page.tsx, which links this sheet too)
 * Linked   by the page itself (<link precedence="next">), after hs.css: a static file the offline
 *          worker keeps (public/harshalom/sw-harshalom.js PRECACHE). Every rule is under `.hs`.
 *
 * THREE DESIGNED VIEWS (DESIGN_V2; owner item 11):
 *   PHONE    (< 700px)    the list one card a row; a tefila alone, one column, its tools in thumb
 *                         reach; 44px targets
 *   TABLET   (700-1199)   the list two a row; a tefila BESIDE the list of tefilos (one tap to the
 *                         next), the list sticky
 *   COMPUTER (>= 1200px)  the list three a row (four from 1800px); a tefila beside the list, the text
 *                         at a readable line length, hover states and focus rings
 * THE TEXT. Hebrew in the site's serif (--hs-serif, Frank Ruhl Libre, which carries the nikud), large
 * (22px phone, 24px tablet, 26px computer, 28px from 1800px) times the reader's A− / A+
 * (--tf-scale, static/js/tefilos.js), line-height 2 so the nikud never touches the next line.
 * PRINT: one clean column, the text at 16pt; the header's tabs, the list, the tools, the footer's
 * links and the numbers stay off paper (hs.css hides the shared ones).
 * Light only: white panels, ink text, the green as an accent (DESIGN_V2).
 *
 * 0.002 (a request sent from the site, 9 Nov 2026): each card is its names (the link) and,
 * under them, View · Print · Share (.tf-acts, whose look is in hs.css: the ☰ uses it on every page);
 * a PDF's pages as pictures on the reading page (.tf-pages), and on paper ONLY those pictures, one to
 * a sheet (the root's .hs-tf--pages; a landscape page on a landscape sheet where the browser can).
 *
 * CHANGELOG (Rule 45)
 *   0.001 · 2026-11-02 · feat/hs-tefilos, v3.1 lane C — created (the phone's tools on one row: each
 *     button's English and Yiddish stacked, checked at 390x844).
 *   0.002 · 2026-11-11 · harshalom/0.015-tefilos — the card as names + View · Print ·
 *     Share (.tf-card__main keeps the old row); .tf-pages; the PDF-pages print sheet.
 *   0.003 · 2026-11-11 · harshalom/0.015-tefilos, review fix 2 — on paper, .tf-pages is hidden
 *     unless the root carries .hs-tf--pages: a tefila with both a typed text and a PDF with page
 *     pictures printed the text AND every picture (0.014 printed the text only).
 *   0.004 · 2026-11-11 · harshalom/0.015-fix2-tefilos, second review (security 0) — comments only: a
 *     served file names no feedback ticket and quotes no one's words (the request is "a request sent
 *     from the site, 9 Nov 2026", as the Kaddish's is); lib/harshalom/__tests__/hs015-public-no-ticket
 *     .test.ts walks every public Har Shalom file for it. No rule changed.
 *   0.005 · 2026-11-11 · harshalom/0.018-pagesA (the site audit of 11 Nov 2026, R2, R6) —
 *     (1) THE PDF CARD never squeezes its name: it is a wrapping row (icon · name · the two buttons)
 *     in which the name keeps at least 16em; when the buttons do not fit beside that, they go under
 *     it, as on a phone. From 700px it was three grid columns, and on a tablet (768-1024px) the
 *     buttons took the row and the name got 24px, one letter a line. The card now shows the
 *     tefila's names (tefilos-parts.tsx 0.003), which break between words only. Where the three
 *     fitted (a computer) it draws as before.
 *     (2) A PAGE TO READ: every page picture (and the office's picture) is a link to the page
 *     reader (.tf-zoom, static/js/tefilos.js 0.005) with a small magnifier in its corner; the reader
 *     (.hs-tfz) covers the screen: a bar (× · "2 / 5" · A− · A+, every target 44px) over a box that
 *     shows the pages at a size that reads and moves any way under a finger.
 *     (3) On a phone a tefila of PDF pages puts its PDF card (Open the PDF · Download) right under
 *     Print and Share, before the pages; it was at the very end, under every page.
 *     Print is unchanged: the link is a plain block of the same size, the magnifier and the reader
 *     stay off paper.
 *   0.006 · 2026-11-11 · harshalom/0.018-pages2 (P2-6) — the reader's bar keeps clear of a phone's
 *     notch (env(safe-area-inset-top)), as hs.css's, find.css's and plan.css's full-screen layers do:
 *     the pages use viewport-fit=cover, and the × could sit under the notch.
 *   0.007 · 2026-11-11 · harshalom/0.018-pages2 (P2-7) — the list's card (/harshalom/tefilos) puts its
 *     kind pill (PDF) under the names below 1024px, so the names have the card's width. Beside the pill
 *     and the › the English got 180-206px on an iPad (768-844px) and read "Shtar Mechiras / Hamischar";
 *     on a phone 110-180px (three lines at 320). Under 360px the card's small › goes (the whole row is
 *     the link, as Home's cards drop theirs) and its sides and icon give 4px each, so "Shtar Mechiras
 *     Hamischar" holds one line at 320. A card with no pill (a typed text) is unchanged, and from
 *     1024px the row is as before.
 *   0.008 · 2026-11-11 · harshalom/0.018-tefilos (11 Nov 2026: each tefila read as its text on the
 *     page, never as pictures; larger and smaller in the page; the finest type and layout; a Print
 *     button whose paper fits the sheet chosen, to take along or to hand out copies) —
 *     (1) THE TYPE: 'HS Tefila Serif' = Noto Serif Hebrew (every letter, nikud and taamim mark) with
 *     its own Latin, Noto Serif (both SIL OFL 1.1, static/fonts/OFL.txt), regular and bold, kept in
 *     static/fonts/ (no other site is asked) and named here only, so only the pages that link this
 *     sheet load it, and only when a text is drawn. The text: line-height 2.05 for nikud and taamim.
 *     (2) THE TEXT'S MARKS (lib/harshalom/tefilos.ts 0.004): headings (.tf-h, centred, the green ink),
 *     small instruction lines (.tf-ins, smaller and quieter), centred lines (.tf-c), bold, small words
 *     inside a line (.tf-sm), blanks to fill in (.tf-blank: a drawn line the length of its
 *     underscores, never wider than the column), all sized in em, so A− / A+ moves them together.
 *     (3) PRINT AT THE TOP: Print is the first tool and the main button; beside it the print's two
 *     sizes (.tf-paper) in a row of their own under Print · A− A+ · Share (on a phone one a row), each
 *     a 44px chip with a small picture of its sheet; A− and A+ keep together (.tf-size).
 *     (4) PAPER (.hs-tf--text): only the tefila's names (.tf-print-head) and its text; the type is
 *     sized to the paper's width (container units: about 14pt on Letter or A4, 10pt on A5 or a half
 *     letter, at most 16pt on a sheet turned sideways, the line kept to 36em), headings and
 *     instruction lines never alone at a page's foot, blanks a black line to write on. "Pocket,
 *     2 on a sheet" (.hs-tfp, built by static/js/tefilos.js 0.007 at the end of <body>): two copies
 *     side by side on a landscape sheet, a dashed line between them to cut along, each page of one
 *     beside the same page of the other.
 */

/* ── 0.008: the reading type, 'HS Tefila Serif' (static/fonts/, SIL OFL 1.1) ─── */

/* The Latin first, the Hebrew after: where the two ranges meet (U+200C-2010) the later face is used. */
@font-face {
  font-family: 'HS Tefila Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/noto-serif-latin-400.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'HS Tefila Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/noto-serif-latin-700.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'HS Tefila Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/noto-serif-hebrew-400.woff2') format('woff2');
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
  font-family: 'HS Tefila Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/noto-serif-hebrew-700.woff2') format('woff2');
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

/* ── the page ───────────────────────────────────────────────────────────── */

.hs .tf-main {
  display: grid;
  gap: 12px;
  align-content: start;
  box-sizing: border-box;
  width: 100%;
  padding: 12px 12px 24px;
}

.hs .tf-en {
  font-weight: inherit;
}

.hs .tf-yi {
  font-family: var(--hs-serif);
}

/* ── a tefila's names, its note, the file mark ──────────────────────────── */

.hs .tf-names {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.35;
}

.hs .tf-names__en {
  font-weight: 600;
}

.hs .tf-names__he,
.hs .tf-names__yi {
  color: var(--hs-accent-ink);
  font-family: var(--hs-serif);
  font-size: 1.1em;
}

.hs .tf-note {
  display: block;
  margin-top: 2px;
  color: var(--hs-muted);
  font-size: 14px;
  line-height: 1.4;
}

.hs .tf-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--hs-line-2);
  border-radius: 999px;
  color: var(--hs-muted);
  font-size: var(--hs-fs-min, 13px);
  white-space: nowrap;
}

/* ── the list (/harshalom/tefilos) ──────────────────────────────────────── */

.hs .tf-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs .tf-card {
  display: grid;
  grid-template-rows: auto auto;
  align-content: space-between;
  gap: 10px;
  box-sizing: border-box;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-r);
  background: var(--hs-surface);
  box-shadow: var(--hs-shadow);
  color: var(--hs-ink);
  font-size: 16px;
}

.hs .tf-card:hover {
  border-color: var(--hs-accent);
}

/* the names: the link to the tefila (the row the whole card was until 0.002) */
.hs .tf-card__main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: var(--hs-tap, 44px);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.hs .tf-card__main:focus-visible {
  outline: 2px solid var(--hs-accent);
  outline-offset: 2px;
}

.hs .tf-card__ic {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--hs-accent-soft);
  color: var(--hs-accent);
}

.hs .tf-card__txt {
  min-width: 0;
}

.hs .tf-card__go {
  color: var(--hs-faint);
}

/* 0.007 (pages2, P2-7): below 1024px (an iPad, two cards a row; a phone, one) the kind pill goes under
   the names, so the names have the card's width: the icon and the › stand beside both lines. Beside
   them the English broke ("Shtar Mechiras / Hamischar" at 768-844px; three lines at 320). A card with
   no pill keeps its one row. */
@media (max-width: 1023.98px) {
  .hs .tf-card__main:has(> .tf-mark) {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      'ic txt go'
      'ic mark go';
    row-gap: 4px;
  }

  .hs .tf-card__main:has(> .tf-mark) > .tf-card__ic {
    grid-area: ic;
  }

  .hs .tf-card__main:has(> .tf-mark) > .tf-card__txt {
    grid-area: txt;
  }

  .hs .tf-card__main:has(> .tf-mark) > .tf-mark {
    grid-area: mark;
    justify-self: start;
  }

  .hs .tf-card__main:has(> .tf-mark) > .tf-card__go {
    grid-area: go;
  }
}

/* under 360px the small › goes too (the whole row is the link, as Home's cards drop theirs), and the
   card's sides and icon give 4px each: at 320 "Shtar Mechiras Hamischar" needs 210px, it had 182 */
@media (max-width: 359.98px) {
  .hs .tf-card {
    padding-right: 10px;
    padding-left: 10px;
  }

  .hs .tf-card__ic {
    width: 32px;
    height: 32px;
  }

  .hs .tf-card__go {
    display: none;
  }

  .hs .tf-card__main:has(> .tf-mark) {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      'ic txt'
      'ic mark';
  }
}

/* ── nothing published yet: one calm line ───────────────────────────────── */

.hs .tf-empty {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.hs .tf-empty__line {
  margin: 0;
  font-size: 17px;
}

/* English, then the Yiddish as one unit: on a phone it moves whole to the next line */
.hs .tf-empty__line > span {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
}

.hs .tf-empty__line .tf-yi {
  color: var(--hs-muted);
}

.hs .tf-empty__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.hs .tf-empty__links .hs-chip {
  min-height: var(--hs-tap, 44px);
  padding: 4px 14px;
  font-size: 14px;
}

/* ── one tefila ─────────────────────────────────────────────────────────── */

.hs .tf-read {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

/* the list beside it: from a tablet up */
.hs .tf-side {
  display: none;
}

.hs .tf-side__all {
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  min-height: var(--hs-tap, 44px);
  margin-bottom: 4px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--hs-line);
  color: var(--hs-accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.hs .tf-side__all .tf-yi {
  color: var(--hs-muted);
  font-weight: 400;
}

.hs .tf-side__list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs .tf-side__item {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-height: var(--hs-tap, 44px);
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--hs-ink);
  font-size: 14px;
  text-decoration: none;
}

.hs .tf-side__item:hover {
  background: var(--hs-accent-soft);
}

.hs .tf-side__item[aria-current='page'] {
  background: var(--hs-accent-soft);
  box-shadow: inset 3px 0 0 var(--hs-accent);
  color: var(--hs-accent-ink);
}

.hs .tf-side__item:focus-visible,
.hs .tf-side__all:focus-visible {
  outline: 2px solid var(--hs-accent);
  outline-offset: 1px;
}

/* the reading pane */
.hs .tf-doc {
  --tf-base: 22px;
  box-sizing: border-box;
  min-width: 0;
  padding: 14px 14px 24px;
}

.hs .tf-doc__head {
  margin-bottom: 10px;
  font-size: 18px;
}

.hs .tf-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hs-line);
}

/* 0.008: A− and A+ keep together when the row wraps */
.hs .tf-size {
  display: inline-flex;
  gap: 4px;
}

.hs .tf-tool {
  min-width: var(--hs-tap, 44px);
  min-height: var(--hs-tap, 44px);
  font-weight: 600;
}

.hs .tf-tool:disabled {
  opacity: 0.4;
  cursor: default;
}

.hs .tf-act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--hs-tap, 44px);
  text-decoration: none;
}

.hs .tf-act__txt .tf-yi {
  margin-inline-start: 4px;
  font-size: 0.95em;
}

/* 0.008 — the print's two sizes, beside Print: chips with a small picture of the sheet each makes */
/* a row of their own under Print · A− A+ · Share, at every width (the options of the Print above) */
.hs .tf-paper {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  order: 1;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.hs .tf-tools > .tf-status {
  order: 2;
}

.hs .tf-paper__opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  min-height: var(--hs-tap, 44px);
  padding: 4px 12px 4px 10px;
  border: 1px solid var(--hs-line-2);
  border-radius: 999px;
  background: var(--hs-surface);
  color: var(--hs-ink);
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}

.hs .tf-paper__in {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--hs-accent);
}

.hs .tf-paper__opt:has(.tf-paper__in:checked) {
  border-color: var(--hs-accent);
  background: var(--hs-accent-soft);
  color: var(--hs-accent-ink);
}

.hs .tf-paper__opt:has(.tf-paper__in:focus-visible) {
  outline: 2px solid var(--hs-accent);
  outline-offset: 2px;
}

.hs .tf-paper__pic {
  flex: none;
  fill: #fff;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.3;
}

.hs .tf-paper__pic .tf-paper__cut {
  stroke-dasharray: 1.6 1.6;
}

.hs .tf-paper__txt .tf-yi {
  margin-inline-start: 4px;
  color: var(--hs-muted);
  font-family: var(--hs-serif);
}

@media (hover: hover) and (pointer: fine) {
  .hs .tf-paper__opt:hover {
    border-color: var(--hs-accent);
  }
}

/* the copies made for "Pocket, 2 on a sheet" (static/js/tefilos.js): only ever on paper */
.hs.hs-tfp {
  display: none;
}

.hs .tf-status {
  flex: 1 1 100%;
  margin: 0;
  color: var(--hs-muted);
  font-size: var(--hs-fs-min, 13px);
  overflow-wrap: anywhere;
}

.hs .tf-status:empty {
  display: none;
}

.hs .tf-status[data-tone='ok'] {
  color: var(--hs-green);
}

/* the text, exactly as the office typed it */
.hs .tf-text {
  /* fullbleed-ok: a reading column caps its line length (Rule 40); the shell around it fills. */
  max-inline-size: 46em;
  margin-inline: auto;
  color: var(--hs-ink);
  /* 0.008: the reading type (nikud and taamim), then the site's serif while it loads */
  font-family: 'HS Tefila Serif', var(--hs-serif);
  font-size: calc(var(--tf-base) * var(--tf-scale, 1));
  line-height: 2.05;
  text-align: justify;
  text-align-last: start;
  overflow-wrap: break-word;
}

.hs .tf-text p {
  margin: 0 0 0.9em;
}

.hs .tf-text p:last-child {
  margin-bottom: 0;
}

/* 0.008 — the text's marks (lib/harshalom/tefilos.ts hsTefilaBlocks), all in em: A− / A+ moves them */
.hs .tf-text .tf-h {
  margin: 0 0 0.5em;
  color: var(--hs-accent-ink);
  /* the reading type too (hs.css gives the site's headings the site's serif) */
  font-family: inherit;
  font-size: 1.24em;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
  text-align-last: center;
}

.hs .tf-text .tf-h--2 {
  font-size: 1.1em;
}

.hs .tf-text > * + .tf-h {
  margin-top: 1.15em;
}

.hs .tf-text .tf-ins {
  color: var(--hs-muted);
  font-size: 0.74em;
  line-height: 1.85;
  text-align: start;
  text-align-last: start;
}

.hs .tf-text .tf-c {
  text-align: center;
  text-align-last: center;
}

/* the next block was typed on the next line (no blank line): it belongs to this paragraph */
.hs .tf-text .tf-more {
  margin-bottom: 0.25em;
}

.hs .tf-text strong {
  font-weight: 700;
}

.hs .tf-text .tf-sm {
  color: var(--hs-muted);
  font-size: 0.68em;
  font-weight: 400;
}

/* a blank to fill in: a line as long as its underscores (kept as text, drawn as a line), never
   wider than the column, sitting on the line's foot */
.hs .tf-text .tf-blank {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  border-bottom: 1px solid var(--hs-ink);
  color: transparent;
  line-height: 1.2;
  vertical-align: baseline;
  white-space: nowrap;
}

/* the names on paper (0.008): never on screen, where the page's own title says them */
.hs .tf-print-head {
  display: none;
}

/* 0.002: a PDF's pages as pictures, one under the other */
.hs .tf-pages {
  display: grid;
  gap: 14px;
}

.hs .tf-text + .tf-pages {
  margin-top: 24px;
}

.hs .tf-page {
  margin: 0;
}

.hs .tf-page__img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  /* fullbleed-ok: a page of print is read at a page's width (Rule 40); the shell around it fills. */
  max-inline-size: 60rem;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-r);
  background: #fff;
}

.hs .tf-page--land .tf-page__img {
  max-inline-size: 78rem;
}

/* the office's uploaded file */
.hs .tf-file {
  margin: 16px 0 0;
}

.hs .tf-text + .tf-file {
  margin-top: 24px;
}

.hs .tf-file__img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-r);
  background: var(--hs-surface);
}

.hs .tf-file--pdf {
  /* 0.005: a wrapping row, so the name never gets less than 16em: the buttons go under it when
     they do not fit beside it (R2). */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 14px;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-r);
  background: var(--hs-bg);
}

.hs .tf-file__ic {
  flex: none;
  color: var(--hs-accent);
}

.hs .tf-file__txt {
  display: grid;
  flex: 1 1 16em;
  min-width: 0;
}

.hs .tf-file__name {
  font-weight: 600;
  /* a word breaks only when it alone is wider than the card (never letter by letter) */
  overflow-wrap: break-word;
}

.hs .tf-file__kind {
  color: var(--hs-muted);
  font-size: var(--hs-fs-min, 13px);
}

.hs .tf-file__acts {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 8px;
}

/* 0.005: a picture to read — a link to the page reader (static/js/tefilos.js), the same size as the
   picture it holds; a small magnifier in its corner says a tap reads it. */
.hs .tf-zoom {
  display: block;
  position: relative;
  border-radius: var(--hs-r);
  color: var(--hs-accent);
  cursor: zoom-in;
}

.hs .tf-page .tf-zoom {
  /* fullbleed-ok: a page of print is read at a page's width (Rule 40), as the picture inside it. */
  max-inline-size: 60rem;
  margin: 0 auto;
}

.hs .tf-page--land .tf-zoom {
  max-inline-size: 78rem;
}

.hs .tf-file--img .tf-zoom {
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.hs .tf-zoom:focus-visible {
  outline: 2px solid var(--hs-accent);
  outline-offset: 2px;
}

.hs .tf-zoom__mark {
  display: inline-grid;
  position: absolute;
  top: 8px;
  left: 8px;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hs-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--hs-shadow);
  pointer-events: none;
}

@media (hover: hover) {
  .hs .tf-zoom:hover .tf-zoom__mark {
    border-color: var(--hs-accent);
    background: var(--hs-accent-soft);
  }
}

/* ── the page reader (static/js/tefilos.js 0.005), over the whole screen ─── */

.hs.hs-tfz {
  display: flex;
  position: fixed;
  /* over everything, the floating Feedback button (9998-9999) too: nothing covers the page read */
  z-index: 10000;
  inset: 0;
  flex-direction: column;
  min-height: 0;
  background: #f1efe9;
}

.hs.hs-tfz[hidden] {
  display: none;
}

.hs.hs-tfz .hs-tfz__bar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 6px max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));
  /* 0.006: clear of a phone's notch (viewport-fit=cover), as the site's other full-screen layers */
  padding-top: max(6px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--hs-line);
  background: var(--hs-surface);
  /* a drag on the bar never scrolls the page under the reader */
  touch-action: none;
}

.hs.hs-tfz .hs-tfz__b {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--hs-line-2);
  border-radius: 999px;
  background: var(--hs-surface);
  color: var(--hs-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.hs.hs-tfz .hs-tfz__b:focus-visible {
  outline: 2px solid var(--hs-accent);
  outline-offset: 2px;
}

.hs.hs-tfz .hs-tfz__b:disabled {
  opacity: 0.4;
  cursor: default;
}

.hs.hs-tfz .hs-tfz__n {
  flex: 1;
  color: var(--hs-muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.hs.hs-tfz .hs-tfz__pane {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 10px 0 max(16px, env(safe-area-inset-bottom));
  /* the up-down bar is always there on a computer, so "the whole width" is worked out without it
     (a phone's bars take no room) */
  overflow-x: auto;
  overflow-y: scroll;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.hs.hs-tfz .hs-tfz__pane:focus-visible {
  outline: 2px solid var(--hs-accent);
  outline-offset: -2px;
}

.hs.hs-tfz .hs-tfz__img {
  display: block;
  max-width: none;
  margin: 0 auto 12px;
  background: #fff;
  box-shadow: var(--hs-shadow);
}

@media (hover: hover) and (pointer: fine) {
  .hs.hs-tfz .hs-tfz__b:hover {
    border-color: var(--hs-accent);
  }
}

/* ── PHONE (< 700px): the four tools on one row, each word pair stacked ─── */

@media (max-width: 699.98px) {
  .hs .tf-tools {
    gap: 6px;
  }

  .hs .tf-act {
    gap: 5px;
    padding-inline: 10px;
  }

  .hs .tf-act__txt {
    display: inline-grid;
    justify-items: center;
    line-height: 1.15;
  }

  .hs .tf-act__txt .tf-yi {
    margin-inline-start: 0;
    font-size: var(--hs-fs-min, 13px);
  }

  /* 0.008: on a phone the print's two sizes one a row (beside each other, a long Yiddish line took
     four lines in a chip) */
  .hs .tf-paper {
    display: grid;
  }

  .hs .tf-paper__opt {
    min-width: 0;
    padding-inline: 10px 12px;
  }

  /* 0.005 (R6): a tefila of PDF pages leads with Print · Share and then the PDF card (Open the
     PDF · Download), before the pages; the card was at the very end, under every page. */
  .hs.hs-tf--pages .tf-doc {
    display: flex;
    flex-direction: column;
  }

  .hs.hs-tf--pages .tf-tools {
    order: -2;
  }

  .hs.hs-tf--pages .tf-file--pdf {
    order: -1;
    margin: 0 0 14px;
  }
}

/* 0.008: below a computer's width each choice's English and Yiddish are stacked, so the two
   choices fit side by side in a tablet's reading pane (436px at 820) */
@media (max-width: 1199.98px) {
  .hs .tf-paper__txt {
    display: inline-grid;
    min-width: 0;
    line-height: 1.15;
  }

  .hs .tf-paper__txt .tf-yi {
    margin-inline-start: 0;
    font-size: var(--hs-fs-min, 13px);
  }
}

/* ── TABLET (700-1199px) ────────────────────────────────────────────────── */

@media (min-width: 700px) {
  .hs .tf-main {
    gap: 16px;
    padding: 16px 20px 28px;
  }

  .hs .tf-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .hs .tf-read {
    grid-template-columns: var(--hs-side-w, 280px) minmax(0, 1fr);
  }

  .hs .tf-side {
    display: block;
    position: sticky;
    top: calc(var(--hs-sticky-top, 0px) + 12px);
    box-sizing: border-box;
    max-height: calc(100vh - var(--hs-sticky-top, 0px) - 24px);
    padding: 8px;
    overflow: auto;
    border: 1px solid var(--hs-line);
    border-radius: var(--hs-r);
    background: var(--hs-surface);
  }

  .hs .tf-doc {
    --tf-base: 24px;
    padding: 18px 24px 28px;
  }
}

/* ── COMPUTER (>= 1200px) ───────────────────────────────────────────────── */

@media (min-width: 1200px) {
  .hs .tf-main {
    padding: 20px 24px 32px;
  }

  .hs .tf-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hs .tf-doc {
    --tf-base: 26px;
    padding: 20px 32px 32px;
  }

  .hs .tf-tool,
  .hs .tf-act,
  .hs .tf-side__item,
  .hs .tf-side__all {
    min-height: 40px;
  }
}

@media (min-width: 1200px) and (pointer: coarse) {
  .hs .tf-tool,
  .hs .tf-act,
  .hs .tf-side__item,
  .hs .tf-side__all {
    min-height: var(--hs-tap, 44px);
  }
}

@media (min-width: 1800px) {
  .hs .tf-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hs .tf-card {
    font-size: 17px;
  }

  .hs .tf-doc {
    --tf-base: 28px;
  }

  .hs .tf-side__item,
  .hs .tf-side__all {
    font-size: 15px;
  }
}

/* ── print: one clean column ────────────────────────────────────────────── */

@media print {
  .hs.hs-tf .tf-side,
  .hs.hs-tf .tf-tools,
  .hs.hs-tf .tf-file__acts,
  .hs .tf-zoom__mark,
  .hs.hs-tfz {
    display: none !important;
  }

  .hs.hs-tf .tf-main,
  .hs.hs-tf .tf-read {
    display: block;
    padding: 0;
  }

  .hs.hs-tf .tf-doc {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .hs.hs-tf .tf-text {
    max-inline-size: none;
    color: #000;
    font-size: 16pt;
    line-height: 1.9;
  }

  .hs.hs-tf .tf-text p {
    orphans: 3;
    widows: 3;
  }

  .hs.hs-tf .tf-file__img {
    max-height: 25cm;
    border: 0;
  }

  /* 0.003 — a typed text beside a PDF with page pictures prints the text alone
     (hsTefilaPrintKind 'text'), as on 0.014: the pictures go on paper only when the root says they
     ARE the print (.hs-tf--pages). static/js/tefilos.js waits for them only then. */
  .hs.hs-tf:not(.hs-tf--pages) .tf-pages {
    display: none !important;
  }

  /* 0.002 — A PDF'S PAGES: only the pictures, one to a sheet; no header, title, tools, link block,
     footer or numbers on paper (the root carries .hs-tf--pages; [slug]/page.tsx). */
  .hs.hs-tf--pages > :not(.tf-main),
  .hs.hs-tf--pages .tf-doc > :not(.tf-pages) {
    display: none !important;
  }

  .hs.hs-tf--pages .tf-pages {
    display: block;
  }

  .hs.hs-tf--pages .tf-page {
    margin: 0;
    page: tf-sheet;
    break-inside: avoid;
    break-after: page;
  }

  .hs.hs-tf--pages .tf-page:last-child {
    break-after: auto;
  }

  .hs.hs-tf--pages .tf-page--land {
    page: tf-land;
  }

  .hs.hs-tf--pages .tf-page__img {
    width: auto;
    max-width: 100%;
    max-height: 10in;
    border: 0;
    border-radius: 0;
  }

  .hs.hs-tf--pages .tf-page--land .tf-page__img {
    max-height: 7.5in;
  }

  @page tf-sheet {
    margin: 0.35in;
  }

  @page tf-land {
    size: landscape;
    margin: 0.35in;
  }

  /* 0.008 — A TEFILA WITH A TEXT: its names and its text, nothing else (the root carries
     .hs-tf--text; [slug]/page.tsx). The paper is whatever the person chose in the print window: the
     type is sized to its width (cqi: the text's column is the container; about 14pt on Letter or
     A4, 10pt on A5 or a half letter, at most 16pt), a long line on a sheet turned sideways kept to
     36em. */
  .hs.hs-tf--text {
    page: tf-text;
    min-height: 0;
    padding: 0;
    background: #fff;
  }

  .hs.hs-tf--text > :not(.tf-main),
  .hs.hs-tf--text .tf-doc > :not(.tf-print-head):not(.tf-text) {
    display: none !important;
  }

  .hs.hs-tf--text .tf-doc,
  .hs.hs-tfp .hs-tfp__copy {
    container-type: inline-size;
  }

  .hs.hs-tf--text .tf-print-head,
  .hs.hs-tfp .tf-print-head {
    display: block;
    margin: 0 0 0.7em;
    padding-bottom: 0.3em;
    border-bottom: 0.75pt solid #9a9a9a;
    color: #000;
    font-family: 'HS Tefila Serif', var(--hs-serif);
    font-size: clamp(10pt, 3.1cqi, 18pt);
    text-align: center;
    break-after: avoid;
    break-inside: avoid;
  }

  .hs.hs-tf--text .tf-print-head .tf-names,
  .hs.hs-tfp .tf-print-head .tf-names {
    justify-content: center;
  }

  .hs.hs-tf--text .tf-print-head .tf-names__he,
  .hs.hs-tf--text .tf-print-head .tf-names__yi,
  .hs.hs-tfp .tf-print-head .tf-names__he,
  .hs.hs-tfp .tf-print-head .tf-names__yi {
    color: #000;
    font-family: 'HS Tefila Serif', var(--hs-serif);
    font-weight: 700;
  }

  .hs.hs-tf--text .tf-text,
  .hs.hs-tfp .tf-text {
    /* fullbleed-ok: on paper the line is kept to a reading length on a wide sheet */
    max-inline-size: 36em;
    margin-inline: auto;
    color: #000;
    font-size: clamp(10pt, 2.6cqi, 16pt);
    line-height: 1.9;
  }

  .hs.hs-tf--text .tf-text .tf-h,
  .hs.hs-tfp .tf-text .tf-h {
    color: #000;
  }

  .hs.hs-tf--text .tf-text .tf-ins,
  .hs.hs-tf--text .tf-text .tf-sm,
  .hs.hs-tfp .tf-text .tf-ins,
  .hs.hs-tfp .tf-text .tf-sm {
    color: #333;
  }

  /* a heading or an instruction line is never alone at a page's foot: it goes with what follows */
  .hs.hs-tf--text .tf-text .tf-h,
  .hs.hs-tf--text .tf-text .tf-ins,
  .hs.hs-tfp .tf-text .tf-h,
  .hs.hs-tfp .tf-text .tf-ins {
    break-after: avoid;
    break-inside: avoid;
  }

  .hs.hs-tf--text .tf-text .tf-blank,
  .hs.hs-tfp .tf-text .tf-blank {
    border-bottom: 0.9pt solid #000;
  }

  @page tf-text {
    margin: 0.5in;
  }

  /* 0.008 — "POCKET SIZE, 2 ON A SHEET" (static/js/tefilos.js puts the two copies in .hs-tfp at the
     end of <body> while it is chosen): only the two copies, side by side on a landscape sheet, a
     dashed line between them to cut along; each page of one beside the same page of the other. */
  body:has(> .hs.hs-tfp) > :not(.hs-tfp) {
    display: none !important;
  }

  .hs.hs-tfp {
    display: block;
    page: tf-pocket;
    min-height: 0;
    padding: 0;
    background: #fff;
  }

  .hs.hs-tfp .hs-tfp__sheet {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .hs.hs-tfp .hs-tfp__copy {
    box-sizing: border-box;
    min-width: 0;
    padding: 0 0.3in 0 0;
  }

  .hs.hs-tfp .hs-tfp__copy + .hs-tfp__copy {
    padding: 0 0 0 0.3in;
    border-left: 0.75pt dashed #8a8a8a;
  }

  .hs.hs-tfp .tf-text {
    font-size: clamp(8.5pt, 2.75cqi, 13pt);
  }

  .hs.hs-tfp .tf-print-head {
    font-size: clamp(9pt, 3.1cqi, 15pt);
  }

  @page tf-pocket {
    size: landscape;
    margin: 0.35in;
  }
}
