/* ============================================================
   Tefillot teaching pages — torahtech.co/tefillot/<prayer>/
   Shared by every prayer page in the series. Program theme.
   Loads AFTER shared.css and tt-brand.css. Base blocks are the
   same shape as /adam, /sefirot and /names (prefix tf-).
   ============================================================ */
:root {
  --ink:          var(--tt-ink);
  --ink-soft:     var(--tt-ink-soft);
  --muted:        var(--tt-ink-muted);
  --line:         var(--tt-line);
  --line-soft:    #f1f5fa;
  --surface:      var(--tt-surface);
  --surface-2:    var(--tt-surface-2);
  --accent:       var(--tt-blue);
  --accent-deep:  var(--tt-navy);
  --accent-soft:  var(--tt-line-strong);
  --font-display: var(--tt-font-display);
  --font-body:    var(--tt-font-body);
  --font-serif:   var(--tt-font-serif);
  --font-hebrew:  var(--tt-font-hebrew);
  --radius:       var(--tt-radius);
  --radius-sm:    var(--tt-radius-sm);
  --shadow:       var(--tt-shadow-card);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }

/* shared.js injects the header after load; reserve its height so the hero does not jump (CLS). */
#shared-header:empty { min-height: 71px; }
@media (max-width: 768px) { #shared-header:empty { min-height: 67px; } }

/* ── Utility bar (sits under the shared header) ──────────────── */
.tf-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 9px clamp(12px, 4vw, 28px);
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.tf-home { flex: none; display: flex; flex-direction: column; line-height: 1.15; text-decoration: none; }
.tf-home .tf-kicker { font: 700 .62rem/1 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-deep); opacity: .8; }
.tf-home > span:last-child { font: 600 .95rem/1.2 var(--font-display); color: var(--accent-deep); margin-top: 2px; }
.tf-toc {
  flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 2px 4px; margin: 0 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.tf-toc::-webkit-scrollbar { display: none; }
.tf-toc a {
  flex: none; text-decoration: none; white-space: nowrap;
  font: 600 .74rem/1 var(--font-body); color: var(--ink-soft);
  padding: 8px 12px; border-radius: 999px; border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.tf-toc a:hover { background: var(--surface-2); border-color: var(--line); color: var(--accent-deep); }
.tf-toc a.on { background: var(--accent-deep); color: #fff; }
.tf-btn {
  flex: none; appearance: none; cursor: pointer; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--accent-deep); font: 600 .78rem/1 var(--font-body);
  padding: 8px 11px; min-width: 40px; min-height: 34px;
  transition: background .15s, transform .1s, border-color .15s, color .15s;
}
.tf-btn:hover { background: var(--surface-2); transform: translateY(-1px); border-color: var(--accent-soft); }
.tf-btn:active { transform: translateY(0); }
.tf-btn[aria-pressed="true"] { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.tf-btn .he { font-family: var(--font-hebrew); font-size: .95rem; }
@media (max-width: 620px) {
  .tf-home { display: none; }
  .tf-toc { margin-left: -4px; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* These three sit inside clipping containers (overflow hidden / scroll), so the ring has to be drawn inside the box. */
.tf-faq summary:focus-visible, .tf-seg button:focus-visible, .tf-toc a:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: -3px; }
.tf-seg button[aria-pressed="true"]:focus-visible, .tf-toc a.on:focus-visible { outline-color: #fff; }
.tf-seg button:first-child { border-radius: 999px 0 0 999px; }
.tf-seg button:last-child { border-radius: 0 999px 999px 0; }

/* ── Page ────────────────────────────────────────────────────── */
.tf-wrap { max-width: 860px; margin: 0 auto; padding: 30px clamp(16px, 5vw, 28px) 20px; }
.tf-he-inline { font-family: var(--font-hebrew); font-size: 1.15em; direction: rtl; unicode-bidi: isolate; }

.tf-section { margin: 64px 0 0; scroll-margin-top: 64px; }
.tf-section:first-child { margin-top: 18px; }
.tf-section > .tt-eyebrow { display: flex; justify-content: center; margin-bottom: 12px; }
/* Brand blue on white is ~3:1, too light for small caps; keep the blue hairlines, darken the text. */
.tf-section > .tt-eyebrow.on-light { color: var(--accent-deep); }
.tf-section > h2 {
  font: 700 clamp(1.4rem, 4vw, 1.85rem)/1.22 var(--font-display); color: var(--accent-deep);
  letter-spacing: -.5px; margin: 0 0 12px; text-align: center;
}
.tf-section > h2::after {
  content: ''; display: block; width: 60px; height: 2px;
  background: var(--accent); margin: 14px auto 0;
}
.tf-sub { text-align: center; color: var(--muted); font-size: .95rem; max-width: 56ch; margin: 14px auto 26px; line-height: 1.6; }

.tf-prose { font-size: 1rem; line-height: 1.82; color: var(--ink-soft); }
.tf-prose p { margin: 0 0 15px; }
.tf-prose strong { color: var(--accent-deep); font-weight: 700; }
.tf-prose a, .tf-faq a { color: var(--accent-deep); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.tf-prose a:hover, .tf-faq a:hover { color: var(--tt-navy-deep); text-decoration-color: var(--accent-deep); text-decoration-thickness: 2px; }
.tf-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: clamp(18px, 3.8vw, 28px); }
.tf-panel > :last-child { margin-bottom: 0; }
.tf-gap { margin-top: 22px; }

/* ── Source blocks ───────────────────────────────────────────── */
.tf-src {
  margin: 22px 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
}
.tf-src-he {
  font-family: var(--font-hebrew); direction: rtl; text-align: right;
  font-size: clamp(1.12rem, 2.9vw, 1.32rem); line-height: 1.95; color: var(--ink);
  padding: clamp(16px, 3.6vw, 24px) clamp(16px, 3.6vw, 26px) 6px;
}
.tf-src-en {
  font-family: var(--font-serif); font-size: clamp(1.06rem, 2.4vw, 1.18rem); line-height: 1.6; color: var(--ink-soft);
  padding: 6px clamp(16px, 3.6vw, 26px) 4px;
}
.tf-src-ref {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding: 10px clamp(16px, 3.6vw, 26px);
  background: var(--surface-2); border-top: 1px solid var(--line-soft);
  font: 700 .6rem/1.4 var(--font-body); letter-spacing: .13em; text-transform: uppercase; color: var(--accent-deep);
}
.tf-src-ref a { color: var(--accent-deep); text-decoration: none; font-weight: 600; letter-spacing: .06em; text-transform: none; font-size: .74rem; }
.tf-src-ref a:hover { color: var(--tt-navy-deep); text-decoration: underline; }

/* deep variant: the page's few load-bearing quotes */
.tf-src.deep { background: var(--tt-grad-deep); border-color: transparent; box-shadow: 0 14px 36px rgba(12,35,80,.22); text-align: center; }
.tf-src.deep .tf-src-he { color: #fff; text-align: center; font-size: clamp(1.25rem, 3.4vw, 1.55rem); }
.tf-src.deep .tf-src-en { color: rgba(255,255,255,.9); text-align: center; }
.tf-src.deep .tf-src-ref { background: rgba(255,255,255,.07); border-top-color: rgba(255,255,255,.12); color: var(--tt-ice); justify-content: center; }
.tf-src.deep .tf-src-ref a { color: var(--tt-ice); }

body.tf-no-en .tf-src-en, body.tf-no-en .tf-en-opt { display: none; }
body.tf-no-he .tf-src-he, body.tf-no-he .tf-he-opt { display: none; }
body.tf-no-he .tf-src-en { padding-top: clamp(16px, 3.6vw, 24px); }
.tf-fade { animation: tf-fade .32s ease both; }
@keyframes tf-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tf-switch { display: flex; justify-content: center; margin: 0 0 20px; }
.tf-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); }
.tf-seg button {
  appearance: none; cursor: pointer; border: 0; background: transparent; color: var(--ink-soft);
  font: 600 .84rem/1 var(--font-body); padding: 12px 20px; transition: background .15s, color .15s;
}
.tf-seg button:hover { background: rgba(94,144,227,.14); }
.tf-seg button[aria-pressed="true"] { background: var(--accent-deep); color: #fff; }
/* ── Guardrails list ─────────────────────────────────────────── */
.tf-guard { display: grid; gap: 12px; margin-top: 4px; }
.tf-guard-item { display: flex; gap: 14px; align-items: flex-start; }
.tf-guard-n {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font: 700 .82rem/1 var(--font-display); color: #fff; background: var(--tt-grad-header);
}
.tf-guard-item p { margin: 3px 0 0; }

/* ── FAQ ─────────────────────────────────────────────────────── */
.tf-faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  padding: 0; margin-bottom: 10px; overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.tf-faq details[open] { border-color: var(--accent-soft); box-shadow: var(--shadow); }
.tf-faq summary {
  cursor: pointer; list-style: none; padding: 16px 18px;
  font: 600 .97rem/1.45 var(--font-body); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: background .15s;
}
.tf-faq summary::-webkit-details-marker { display: none; }
.tf-faq summary:hover { background: var(--surface-2); }
.tf-faq summary::after { content: '+'; flex: none; color: var(--accent); font-size: 1.3rem; line-height: 1; font-weight: 400; }
.tf-faq details[open] summary::after { content: '\2013'; }
.tf-faq details[open] summary { background: var(--surface-2); }
.tf-faq-body { padding: 14px 18px 16px; font-size: .94rem; line-height: 1.78; color: var(--ink-soft); }
.tf-faq-body p { margin: 0 0 10px; }
.tf-faq-body p:last-child { margin: 0; }

/* ── Related ─────────────────────────────────────────────────── */
.tf-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tf-related a {
  display: block; text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 20px 20px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tf-related a:hover { transform: translateY(-6px); box-shadow: var(--tt-shadow-lift); border-color: var(--accent-soft); }
.tf-rel-he { font-family: var(--font-hebrew); direction: rtl; font-size: 1.3rem; color: var(--accent-deep); }
.tf-rel-en { font: 700 .58rem/1.5 var(--font-body); letter-spacing: .13em; text-transform: uppercase; color: var(--accent-deep); margin-top: 4px; }
.tf-rel-note { font-size: .82rem; color: var(--muted); margin-top: 6px; line-height: 1.55; }
@media (max-width: 720px) { .tf-related { grid-template-columns: 1fr; } }

/* credits strip, above the CTA band */
.tf-credits {
  max-width: 860px; margin: 56px auto 0; padding: 26px clamp(16px, 5vw, 28px) 40px;
  border-top: 1px solid var(--line); text-align: center;
  color: var(--muted); font-size: .8rem; line-height: 1.75;
}
.tf-credits a { color: var(--accent-deep); }
.tf-credits p { margin: 0 0 6px; }

/* ── Reveal on scroll ──────────────────────────────────────────
   CSS scroll-driven only. Content is never hidden by default: browsers without
   animation-timeline (or with reduced motion, or printing) simply show it. An
   earlier JS/IntersectionObserver version left all content at opacity 0 in
   browsers where the observer never fired. Do not bring that back. */
@supports (animation-timeline: view()) {
  @media screen and (prefers-reduced-motion: no-preference) {
    .tf-reveal {
      animation: tf-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}
@keyframes tf-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ── Skeleton shimmer for the interactive mounts before JS fills them ── */
.tf-skel { border-radius: 10px; min-height: 120px; background: linear-gradient(90deg, #eef3fa 25%, #f7f9fc 37%, #eef3fa 63%); background-size: 400% 100%; animation: tf-shimmer 1.3s ease infinite; }
@keyframes tf-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.tf-vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }


/* ── The prayer, word by word ────────────────────────────────── */
.tf-pray {
  border-radius: var(--radius); padding: clamp(16px, 3.6vw, 28px);
  background: radial-gradient(circle at 50% 0%, #1a3f8f 0%, #0C2350 48%, #091836 100%);
  box-shadow: 0 16px 40px rgba(9,24,54,.32); color: #fff;
}
.tf-pray-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(123,224,236,.18); }
.tf-count { display: flex; align-items: baseline; gap: 8px; }
.tf-count-n { font: 700 2.4rem/1 var(--font-display); color: var(--tt-cyan); min-width: 2.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.tf-count-of { font: 700 .62rem/1.3 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.tf-count.gold .tf-count-n { color: #ffcf70; text-shadow: 0 0 18px rgba(255,207,112,.6); }
.tf-ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tf-ctl-label { font: 700 .56rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-right: 2px; }
.tf-chip {
  appearance: none; cursor: pointer; border-radius: 999px; padding: 8px 12px; min-height: 34px;
  border: 1px solid rgba(123,224,236,.4); background: rgba(255,255,255,.06); color: #fff;
  font: 600 .74rem/1 var(--font-body); transition: background .15s, border-color .15s, transform .1s, color .15s;
}
.tf-chip:hover { background: rgba(0,200,220,.22); border-color: var(--tt-ice); transform: translateY(-1px); }
.tf-chip:active { transform: translateY(0); }
.tf-chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tf-chip[aria-pressed="true"] { background: var(--tt-ice); border-color: var(--tt-ice); color: #06223f; }
.tf-chip.go { background: var(--tt-cyan); border-color: var(--tt-cyan); color: #06223f; font-weight: 700; padding-inline: 16px; }
.tf-chip.go:hover { background: #3fd6e6; }
.tf-gold-note { margin: 12px 0 0; font-size: .9rem; line-height: 1.6; color: #ffe2a0; min-height: 1.6em; }

.tf-lines { margin-top: 6px; }
.tf-line { padding: 14px 0; border-bottom: 1px solid rgba(123,224,236,.1); }
.tf-line:last-child { border-bottom: 0; }
.tf-line.half { border-top: 2px dashed rgba(255,207,112,.45); margin-top: 6px; padding-top: 20px; position: relative; }
.tf-line.half::before {
  content: attr(data-half); position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: #0e2a63; color: #ffe2a0; padding: 2px 10px; border-radius: 999px;
  font: 700 .54rem/1.6 var(--font-body); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.tf-he { direction: rtl; text-align: right; font-family: var(--font-hebrew); font-size: clamp(1.32rem, 3.6vw, 1.62rem); line-height: 2.05; }
.tf-w {
  appearance: none; cursor: pointer; border: 0; background: transparent; color: #fff; font: inherit;
  padding: 0 .12em; margin: 0; border-radius: 7px; position: relative;
  transition: background .15s, color .15s, box-shadow .2s;
}
.tf-w:hover { background: rgba(0,200,220,.18); }
.tf-w:focus-visible { outline: 2px solid var(--tt-ice); outline-offset: 1px; }
.tf-w[aria-pressed="true"] { background: var(--tt-cyan); color: #06223f; }
.tf-w.hl { color: #ffe2a0; box-shadow: inset 0 -2px 0 rgba(255,207,112,.7); }
.tf-w.counted { color: #c9f6fb; text-shadow: 0 0 12px rgba(0,200,220,.75); }
.tf-w.counted::after {
  content: attr(data-n); position: absolute; top: -.62em; left: 50%; transform: translateX(-50%);
  font: 700 .52rem/1 var(--font-display); color: var(--tt-ice); direction: ltr;
}
.tf-p { color: rgba(255,255,255,.55); }
.tf-en { font-family: var(--font-serif); font-size: clamp(1.02rem, 2.3vw, 1.12rem); line-height: 1.55; color: rgba(255,255,255,.78); margin-top: 4px; }
body.tf-no-en .tf-en, body.tf-no-en .tf-d-en { display: none; }
body.tf-no-he .tf-src-he, body.tf-no-he .tf-he-opt { display: none; }

.tf-slot:empty { display: none; }
.tf-detail { margin-top: 12px; border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); padding: clamp(14px, 3.2vw, 20px); }
.tf-d-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.tf-d-he { font: 700 1.7rem/1.3 var(--font-hebrew); color: var(--accent-deep); direction: rtl; }
.tf-d-say { font: 600 .9rem/1.3 var(--font-body); color: var(--muted); }
.tf-d-en { font: 700 1.08rem/1.35 var(--font-display); color: var(--ink); }
.tf-d-row { font-size: .9rem; line-height: 1.6; color: var(--ink-soft); margin: 8px 0 0; }
.tf-d-row b { color: var(--accent-deep); }
.tf-d-also { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tf-d-also li { font-size: .86rem; line-height: 1.55; color: var(--ink-soft); }
.tf-d-also .he { font-family: var(--font-hebrew); font-size: 1.05rem; color: var(--ink); direction: rtl; unicode-bidi: isolate; margin-right: 6px; }
.tf-d-note { font-size: .88rem; line-height: 1.62; color: var(--ink-soft); border-left: 3px solid var(--accent); padding: 2px 0 2px 12px; margin: 12px 0 0; }
.tf-d-note small { display: block; margin-top: 4px; font: 700 .56rem/1.4 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tf-d-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.tf-btn[disabled] { opacity: .45; cursor: default; transform: none; }
.tf-btn.primary { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; padding-inline: 16px; }
.tf-btn.primary:hover { background: #163a8a; }

/* ── Gematria tiles ──────────────────────────────────────────── */
.tf-gem { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin: 22px 0; }
.tf-gem-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 16px 18px; text-align: center; min-width: 220px; }
.tf-gem-card.off { opacity: .78; }
.tf-gem-cap { font: 700 .58rem/1.4 var(--font-body); letter-spacing: .13em; text-transform: uppercase; color: var(--accent-deep); }
.tf-gem-row { display: flex; gap: 6px; justify-content: center; align-items: center; direction: rtl; margin-top: 10px; }
.tf-tile { width: 46px; border-radius: 10px; background: var(--tt-grad-deep); color: #fff; padding: 6px 0 5px; }
.tf-tile b { display: block; font: 700 1.5rem/1.1 var(--font-hebrew); }
.tf-tile span { display: block; font: 700 .7rem/1 var(--font-display); color: var(--tt-ice); margin-top: 3px; }
.tf-gem-op { font: 700 1rem/1 var(--font-display); color: var(--muted); }
.tf-gem-sum { font: 700 1.6rem/1 var(--font-display); color: var(--accent-deep); margin-top: 10px; }
.tf-gem-card.gold .tf-gem-sum { color: #b07a10; }

/* ── Lens list (one blessing, several readings) ──────────────── */
.tf-lens { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: clamp(14px, 3.4vw, 24px); }
.tf-lens .tf-ctl { justify-content: center; margin-bottom: 8px; }
.tf-lens .tf-chip { color: var(--accent-deep); border-color: var(--line); background: var(--surface-2); }
.tf-lens .tf-chip:hover { background: rgba(94,144,227,.14); border-color: var(--accent-soft); }
.tf-lens .tf-chip[aria-pressed="true"] { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.tf-lens .tf-chip:focus-visible { outline-color: var(--accent); }
.tf-lens-who { text-align: center; font-size: .92rem; line-height: 1.6; color: var(--ink-soft); max-width: 60ch; margin: 6px auto 14px; min-height: 3.2em; }
.tf-lens-rows { display: grid; gap: 0; }
.tf-lrow { display: grid; grid-template-columns: 34px minmax(130px, 210px) minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line-soft); transition: opacity .2s; }
.tf-lrow-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 .78rem/1 var(--font-display); color: #fff; background: var(--tt-grad-header); }
.tf-lrow-he { font: 600 1.18rem/1.45 var(--font-hebrew); color: var(--ink); direction: rtl; text-align: right; }
.tf-lrow-en { font-size: .78rem; color: var(--muted); margin-top: 2px; text-align: right; }
.tf-lrow-text { font-size: .93rem; line-height: 1.65; color: var(--ink-soft); }
.tf-lrow-text .he { font-family: var(--font-hebrew); font-size: 1.05rem; color: var(--ink); direction: rtl; unicode-bidi: isolate; }
.tf-lrow.off { opacity: .45; }
.tf-lrow.off .tf-lrow-n { background: var(--line); color: var(--muted); }
@media (max-width: 560px) {
  .tf-lrow { grid-template-columns: 30px minmax(0, 1fr); }
  .tf-lrow-text { grid-column: 2; }
  .tf-lrow-he, .tf-lrow-en { text-align: left; }
  .tf-lrow-he { direction: rtl; text-align: right; }
}

/* ── The trail (a timeline stepper) ──────────────────────────── */
.tf-trail { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: clamp(14px, 3.4vw, 24px); }
.tf-rail { position: relative; display: flex; justify-content: space-between; gap: 4px; padding: 6px 4px 0; }
.tf-rail::before { content: ''; position: absolute; left: 18px; right: 18px; top: 20px; height: 2px; background: var(--line); }
.tf-stop {
  appearance: none; cursor: pointer; background: transparent; border: 0; padding: 0; position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 0;
  font: 700 .62rem/1.2 var(--font-display); color: var(--muted);
}
.tf-stop i { width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent-soft); display: grid; place-items: center; font-style: normal; font-size: .72rem; color: var(--accent-deep); transition: background .2s, border-color .2s, transform .15s, color .2s; }
.tf-stop:hover i { transform: scale(1.1); border-color: var(--accent); }
.tf-stop.done i { background: #dbe7fb; border-color: var(--accent); }
.tf-stop[aria-current="step"] i { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; box-shadow: 0 0 0 5px rgba(94,144,227,.2); }
.tf-stop[aria-current="step"] { color: var(--accent-deep); }
.tf-stop:focus-visible { outline: none; }
.tf-stop:focus-visible i { outline: 2px solid var(--accent); outline-offset: 3px; }
.tf-stop-y { white-space: nowrap; }
@media (max-width: 560px) { .tf-stop-y { display: none; } .tf-stop[aria-current="step"] .tf-stop-y { display: block; position: absolute; top: 40px; } .tf-rail { padding-bottom: 16px; } }
.tf-trail-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.tf-step-when { font: 700 .58rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tf-step-who { font: 700 1.16rem/1.3 var(--font-display); color: var(--accent-deep); margin-top: 6px; }
.tf-step-text { font-size: .98rem; line-height: 1.72; color: var(--ink-soft); margin: 8px 0 0; }
.tf-trail .tf-src { margin: 14px 0 0; box-shadow: none; }
.tf-flow-nav { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* ── Spark cards ─────────────────────────────────────────────── */
.tf-sparks { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.tf-spark { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 18px 20px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s; }
.tf-spark:hover { transform: translateY(-6px); box-shadow: var(--tt-shadow-lift); border-color: var(--accent-soft); }
.tf-spark-k { font: 700 .56rem/1.4 var(--font-body); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.tf-spark h3 { font: 700 1.05rem/1.3 var(--font-display); color: var(--accent-deep); margin: 6px 0 8px; }
.tf-spark p { font-size: .9rem; line-height: 1.65; color: var(--ink-soft); margin: 0 0 8px; }
.tf-spark .he { font-family: var(--font-hebrew); font-size: 1.08rem; line-height: 1.8; color: var(--ink); direction: rtl; text-align: right; margin: 8px 0 4px; }
.tf-spark-src { font: 700 .56rem/1.4 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep); margin-top: 8px; }
.tf-spark-src a { color: var(--accent-deep); text-transform: none; letter-spacing: .02em; font-size: .72rem; }

@media (prefers-reduced-motion: reduce) {
  .tf-fade, .tf-skel { animation: none; }
  .tf-chip, .tf-w, .tf-stop i, .tf-spark, .tf-related a, .tf-btn, .tf-lrow { transition: none; }
  .tf-chip:hover, .tf-spark:hover, .tf-related a:hover, .tf-btn:hover, .tf-stop:hover i { transform: none; }
}

/* ── Print / PDF ─────────────────────────────────────────────────
   Interactive pieces drop out; static mounts (filled by tefillot.js) show the
   whole prayer with its translation, every reading and every stop of the trail. */
.tf-print-only { display: none; }
@media print { .tf-screen-only { display: none !important; } }
.tf-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.tf-hero-actions .tt-btn-ghost { padding: 11px 22px; font-size: 14px; cursor: pointer; font-family: var(--font-body); }
#t-print svg { display: block; }

@media print {
  @page { margin: 16mm 15mm 18mm; }
  html, body { background: #fff !important; }
  body { color: #111; font-size: 10.5pt; }
  *, *::before, *::after { animation: none !important; transition: none !important; box-shadow: none !important; text-shadow: none !important; }
  #shared-header, #shared-footer, .wa-widget, .tf-bar, .tf-hero-actions, .tt-band, #more,
  .tf-pray, .tf-lens, .tf-trail, .tf-skel { display: none !important; }
  .tf-print-only { display: block !important; }
  .tf-src-he, .tf-src-en { display: block !important; }
  a { color: inherit !important; text-decoration: none !important; }
  .tf-src-ref a { display: none !important; }
  .tt-hero { background: none !important; color: #111; padding: 0 0 12pt; border-bottom: 2pt solid #1C47A5; }
  .tt-hero::before { display: none; }
  .tf-print-head { display: flex !important; justify-content: space-between; align-items: center; margin-bottom: 10pt; font: 600 9pt var(--font-body); color: #555; }
  .tf-print-head img { height: 22pt; width: auto; filter: brightness(0) saturate(100%) invert(19%) sepia(63%) saturate(2400%) hue-rotate(214deg) brightness(92%); }
  .tt-hero .tt-eyebrow { color: #1C47A5; }
  .tt-hero .tt-eyebrow::before, .tt-hero .tt-eyebrow::after { background: #1C47A5; }
  .tt-hero-he { color: #111; font-size: 26pt; margin: 8pt 0 2pt; }
  .tt-hero h1 { color: #1C47A5; font-size: 22pt; margin: 0 0 6pt; }
  .tt-hero-lede { color: #333; font-size: 10.5pt; font-weight: 400; max-width: none; }
  .tf-wrap { max-width: none; padding: 0; }
  .tf-section { margin: 20pt 0 0; }
  .tf-section > .tt-eyebrow { margin-bottom: 4pt; color: #1C47A5; display: block !important; text-align: center; break-after: avoid; }
  .tf-section > h2 { font-size: 15pt; margin-bottom: 4pt; break-after: avoid; break-inside: avoid; border-bottom: 1.5pt solid #5E90E3; padding-bottom: 4pt; display: table; margin-left: auto; margin-right: auto; }
  .tf-section > h2::after { display: none; }
  .tf-sub { color: #444; font-size: 9.5pt; margin: 6pt auto 10pt; break-after: avoid; }
  .tf-prose { font-size: 10.5pt; line-height: 1.55; color: #111; }
  .tf-prose p { margin: 0 0 7pt; orphans: 3; widows: 3; }
  .tf-panel { background: none !important; border: 1px solid #cfdcf0; padding: 10pt 12pt; }
  .tf-guard-item, .tf-spark, .tf-gem-card { break-inside: avoid; }
  .tf-guard-n { background: none !important; color: #1C47A5; border: 1.5pt solid #1C47A5; }
  .tf-src, .tf-src.deep { background: #fff !important; border: 1px solid #cfdcf0; border-left: 3pt solid #1C47A5; border-radius: 6pt; margin: 9pt 0; text-align: left; break-inside: avoid; }
  .tf-src-he, .tf-src.deep .tf-src-he { color: #111; text-align: right; font-size: 13pt; line-height: 1.7; padding: 8pt 12pt 2pt; }
  .tf-src-en, .tf-src.deep .tf-src-en { color: #333; text-align: left; font-size: 11pt; line-height: 1.45; padding: 2pt 12pt 2pt; }
  .tf-src-ref, .tf-src.deep .tf-src-ref { background: none !important; color: #1C47A5; border-top: 1px solid #e9eef6; justify-content: flex-start; margin-top: 6pt; padding: 5pt 12pt; }
  .tf-tile { background: none !important; color: #111; border: 1px solid #1C47A5; }
  .tf-tile span { color: #1C47A5; }
  .tf-sparks { display: block; }
  .tf-spark { border: 0; border-bottom: 1px solid #e9eef6; border-radius: 0; padding: 6pt 0; }
  .tf-faq details { border: 0; border-bottom: 1px solid #e9eef6; border-radius: 0; margin: 0; break-inside: avoid; }
  .tf-faq summary { padding: 8pt 0 2pt; background: none !important; font-size: 10.5pt; }
  .tf-faq summary::after { display: none; }
  .tf-faq-body { padding: 0 0 8pt; font-size: 10pt; color: #222; }
  .tf-credits { margin: 18pt 0 0; padding: 8pt 0 0; font-size: 8.5pt; color: #555; text-align: left; }
  .tf-print-foot { margin-top: 8pt; font: 600 8.5pt var(--font-body); color: #1C47A5; }
  .tf-p-item { border-bottom: 1px solid #e9eef6; padding: 6pt 0; break-inside: avoid; }
  .tf-p-head { color: #1C47A5; font-size: 10.5pt; font-weight: 700; }
  .tf-p-he { font-family: var(--font-hebrew); font-size: 13pt; line-height: 1.7; text-align: right; direction: rtl; margin: 2pt 0; }
  .tf-p-note { font-size: 9.5pt; color: #333; margin-top: 3pt; line-height: 1.45; }
}

/* a subheading inside a section */
.tf-h3 { font: 700 clamp(1.1rem, 3vw, 1.3rem)/1.3 var(--font-display); color: var(--accent-deep); margin: 34px 0 10px; letter-spacing: -.2px; }
@media print { .tf-h3 { font-size: 12.5pt; margin: 12pt 0 4pt; break-after: avoid; } }
