/* ============================================================
   Tikkun HaKlali: Rebbe Nachman's ten psalms (torahtech.co/tikkun)
   Program theme. Loads AFTER shared.css and tt-brand.css.
   Base blocks have the same shape as /ark (prefix tk- here).
   Page pieces: Rebbe Nachman cards, the ten expressions widget,
   the timeline, the psalm grid and panel, the steps and tips.
   ============================================================ */
: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; }
html { scroll-padding-top: 64px; }

/* 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) ──────────────── */
.tk-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);
}
.tk-home { flex: none; display: flex; flex-direction: column; line-height: 1.15; text-decoration: none; }
.tk-home .tk-kicker { font: 700 .62rem/1 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-deep); opacity: .8; }
.tk-home > span:last-child { font: 600 .95rem/1.2 var(--font-display); color: var(--accent-deep); margin-top: 2px; }
.tk-home:hover > span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.tk-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%);
}
.tk-toc::-webkit-scrollbar { display: none; }
.tk-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;
}
.tk-toc a:hover { background: var(--surface-2); border-color: var(--line); color: var(--accent-deep); }
.tk-toc a:active { background: #e6eefb; }
.tk-toc a.on { background: var(--accent-deep); color: #fff; }
.tk-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;
}
.tk-btn:hover { background: var(--surface-2); transform: translateY(-1px); border-color: var(--accent-soft); }
.tk-btn:active { transform: translateY(0); }
.tk-btn[aria-pressed="true"] { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.tk-btn .he { font-family: var(--font-hebrew); font-size: .95rem; }
.tk-btn[disabled] { opacity: .45; cursor: default; transform: none; }
.tk-btn.primary { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; padding-inline: 16px; }
.tk-btn.primary:hover { background: #163a8a; }
#t-print svg { display: block; }
@media (max-width: 620px) {
  .tk-home { display: none; }
  .tk-toc { margin-left: -4px; }
}
@media (max-width: 400px) {
  .tk-bar { gap: 6px; padding-inline: 10px; }
  .tk-btn { min-width: 36px; padding: 8px 8px; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* These sit inside clipping containers, so the ring is drawn inside the box. */
.tk-faq summary:focus-visible, .tk-toc a:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: -3px; }
.tk-toc a.on:focus-visible { outline-color: #fff; }

/* ── Hero ────────────────────────────────────────────────────── */
.tt-hero h1 { overflow-wrap: anywhere; }
.tk-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.tk-hero-actions .tt-btn, .tk-hero-actions .tt-btn-ghost { padding: 13px 28px; font-size: 15px; }
.tt-btn:active, .tt-btn-ghost:active { transform: translateY(-1px); }

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

.tk-section { margin: 64px 0 0; scroll-margin-top: 64px; }
.tk-section:first-child { margin-top: 18px; }
.tk-section > .tt-eyebrow { display: flex; justify-content: center; margin-bottom: 12px; }
/* Brand blue on white is about 3:1, too light for small caps; keep the blue hairlines, darken the text. */
.tk-section > .tt-eyebrow.on-light { color: var(--accent-deep); }
.tk-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;
}
.tk-section > h2::after {
  content: ''; display: block; width: 60px; height: 2px;
  background: var(--accent); margin: 14px auto 0;
}
.tk-sub { text-align: center; color: var(--muted); font-size: .95rem; max-width: 56ch; margin: 14px auto 26px; line-height: 1.6; }
.tk-sub a { color: var(--accent-deep); }

.tk-prose { font-size: 1rem; line-height: 1.82; color: var(--ink-soft); }
.tk-prose p { margin: 0 0 15px; }
.tk-prose strong { color: var(--accent-deep); font-weight: 700; }
.tk-prose a, .tk-faq a, .tk-card a { color: var(--accent-deep); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.tk-prose a:hover, .tk-faq a:hover { color: var(--tt-navy-deep); text-decoration-color: var(--accent-deep); text-decoration-thickness: 2px; }
.tk-gap { margin-top: 22px; }
.tk-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; }
.tk-center { text-align: center; }

/* ── Source blocks ───────────────────────────────────────────── */
.tk-src {
  margin: 22px 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
}
.tk-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;
}
.tk-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;
}
.tk-src-ref {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px;
  margin-top: 12px; padding: 10px clamp(16px, 3.6vw, 26px);
  background: var(--surface-2); border-top: 1px solid var(--line-soft);
  font: 700 .62rem/1.4 var(--font-body); letter-spacing: .13em; text-transform: uppercase; color: var(--accent-deep);
}
.tk-src-ref a { color: var(--accent-deep); text-decoration: none; font-weight: 600; letter-spacing: .06em; text-transform: none; font-size: .76rem; padding: 4px 0; }
.tk-src-ref a:hover { color: var(--tt-navy-deep); text-decoration: underline; }

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

body.tk-no-en .tk-src-en, body.tk-no-en .tk-en-opt { display: none; }
body.tk-no-he .tk-src-he, body.tk-no-he .tk-he-opt { display: none; }
body.tk-no-he .tk-src-en { padding-top: clamp(16px, 3.6vw, 24px); }
.tk-fade { animation: tk-fade .32s ease both; }
@keyframes tk-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── 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.
   Do not replace this with a JS observer that starts content at opacity 0. */
@supports (animation-timeline: view()) {
  @media screen and (prefers-reduced-motion: no-preference) {
    .tk-reveal {
      animation: tk-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}
@keyframes tk-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ── Skeleton shimmer for the mounts before JS fills them ───────── */
.tk-skel { list-style: none; border-radius: 12px; min-height: 120px; background: linear-gradient(90deg, #eef3fa 25%, #f7f9fc 37%, #eef3fa 63%); background-size: 400% 100%; animation: tk-shimmer 1.3s ease infinite; }
@keyframes tk-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.tk-vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Shared controls and surfaces ────────────────────────────── */
.tk-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: clamp(14px, 3.4vw, 24px); }
.tk-ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.tk-chip {
  appearance: none; cursor: pointer; border-radius: 999px; padding: 7px 13px 7px 11px; min-height: 40px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--accent-deep);
  font: 600 .78rem/1 var(--font-body); display: inline-flex; align-items: center; gap: 7px;
  transition: background .15s, border-color .15s, transform .1s, color .15s, box-shadow .15s;
}
.tk-chip .he { font: 600 1.05rem/1 var(--font-hebrew); }
.tk-chip:hover { background: rgba(94,144,227,.14); border-color: var(--accent-soft); transform: translateY(-1px); }
.tk-chip:active { transform: translateY(0); }
.tk-chip[aria-pressed="true"] { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; box-shadow: 0 6px 16px rgba(28,71,165,.25); }
.tk-src-line { margin: 12px 0 0; font: 700 .62rem/1.5 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tk-src-line b { color: var(--accent-deep); font-weight: 700; }

/* ── 2. Rebbe Nachman cards ──────────────────────────────────── */
.tk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 22px; }
.tk-cards > .tk-skel { min-height: 220px; }
.tk-fact {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 18px 20px 16px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tk-fact:hover { transform: translateY(-6px); box-shadow: var(--tt-shadow-lift); border-color: var(--accent-soft); }
.tk-fact-k { font: 700 .62rem/1.4 var(--font-body); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.tk-fact h3 { font: 700 1.12rem/1.3 var(--font-display); color: var(--accent-deep); margin: 6px 0 8px; }
.tk-fact p { font-size: .92rem; line-height: 1.65; color: var(--ink-soft); margin: 0 0 8px; }
.tk-fact .tk-q-he { font-family: var(--font-hebrew); font-size: 1.06rem; line-height: 1.8; color: var(--ink); direction: rtl; text-align: right; margin: 6px 0 2px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.tk-fact .tk-q-en { font-family: var(--font-serif); font-size: 1.02rem; line-height: 1.5; color: var(--ink-soft); margin: 2px 0 0; }
.tk-fact .tk-src-line { margin-top: auto; padding-top: 10px; }
.tk-fact .tk-src-line a { color: var(--accent-deep); text-transform: none; letter-spacing: .02em; font-size: .76rem; }
body.tk-no-he .tk-q-he { display: none; }
body.tk-no-en .tk-q-en { display: none; }

/* ── 3. The ten expressions ──────────────────────────────────── */
.tk-praise .tk-ctl { margin-bottom: 16px; }
.tk-strip { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; padding: 12px 0 14px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.tk-strip span {
  display: grid; place-items: center; min-height: 38px; border-radius: 10px;
  font: 700 .86rem/1 var(--font-display); color: var(--muted); background: var(--surface-2); border: 1px dashed var(--accent-soft);
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.tk-strip span.on { background: var(--tt-grad-deep); color: #fff; border: 1px solid transparent; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(12,35,80,.22); }
.tk-strip span.half { background: #e3ecfb; color: var(--accent-deep); border: 1px solid var(--accent-soft); }
@media (max-width: 560px) { .tk-strip { grid-template-columns: repeat(5, 1fr); } }
.tk-praise-out { padding-top: 16px; min-height: 12em; }
.tk-pw-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.tk-pw-he { font: 700 clamp(1.7rem, 5vw, 2.2rem)/1.1 var(--font-hebrew); color: var(--accent-deep); direction: rtl; }
.tk-pw-name { font: 700 1.15rem/1.2 var(--font-display); color: var(--ink); }
.tk-pw-gloss { font-size: .92rem; color: var(--muted); flex-basis: 100%; }
.tk-pw-note { font-size: .95rem; line-height: 1.7; color: var(--ink-soft); margin: 10px 0 4px; }
.tk-hits { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.tk-hit { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 4px 14px; align-items: start; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.tk-hit-ref { grid-row: span 3; text-align: center; }
.tk-hit-ref b { display: block; font: 700 1.25rem/1 var(--font-display); color: var(--accent-deep); }
.tk-hit-ref small { display: block; margin-top: 4px; font: 700 .58rem/1.3 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tk-hit-he { font: 500 1.16rem/1.7 var(--font-hebrew); color: var(--ink); direction: rtl; text-align: right; }
.tk-hit-en { font-size: .9rem; line-height: 1.55; color: var(--ink-soft); }
.tk-hit-go {
  justify-self: start; appearance: none; cursor: pointer; background: none; border: 0; padding: 4px 0;
  font: 600 .8rem/1.3 var(--font-body); color: var(--accent-deep); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px;
}
.tk-hit-go:hover { color: var(--tt-navy-deep); text-decoration-thickness: 2px; }
.tk-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font: 700 .58rem/1.5 var(--font-body); letter-spacing: .1em; text-transform: uppercase; background: #e3ecfb; color: var(--accent-deep); vertical-align: middle; }
body.tk-no-he .tk-hit-he { display: none; }
body.tk-no-en .tk-hit-en { display: none; }
@media (max-width: 420px) { .tk-hit { grid-template-columns: 1fr; } .tk-hit-ref { grid-row: auto; text-align: left; display: flex; align-items: baseline; gap: 8px; } .tk-hit-ref small { margin: 0; } }

/* ── 4. The timeline ─────────────────────────────────────────── */
.tk-time { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.tk-time::before { content: ''; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent-soft), var(--accent), var(--accent-soft)); }
.tk-ev { position: relative; padding: 0 0 26px 46px; }
.tk-ev:last-child { padding-bottom: 0; }
.tk-ev::before {
  content: attr(data-n); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--tt-grad-header); color: #fff; font: 700 .72rem/1 var(--font-display);
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--accent-soft);
}
.tk-ev-when { font: 700 .64rem/1.4 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tk-ev h3 { font: 700 1.15rem/1.3 var(--font-display); color: var(--accent-deep); margin: 4px 0 6px; }
.tk-ev p { font-size: .98rem; line-height: 1.72; color: var(--ink-soft); margin: 0; }
.tk-ev .tk-src { margin: 12px 0 0; box-shadow: none; }
.tk-ev .tk-src-he { font-size: clamp(1.04rem, 2.6vw, 1.18rem); }
.tk-ev .tk-src-en { font-size: clamp(1rem, 2.2vw, 1.08rem); }

/* ── 5. The psalm grid and panel ─────────────────────────────── */
.tk-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .tk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tk-ps {
  appearance: none; cursor: pointer; text-align: center; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow);
  padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 120px;
  transition: transform .2s, box-shadow .2s, border-color .2s, background .2s;
}
.tk-ps:hover { transform: translateY(-6px); box-shadow: var(--tt-shadow-lift); border-color: var(--accent-soft); }
.tk-ps:active { transform: translateY(-2px); }
.tk-ps-n { font: 700 1.75rem/1 var(--font-display); color: var(--accent-deep); letter-spacing: -1px; }
.tk-ps-h { font: 600 .95rem/1 var(--font-hebrew); color: var(--muted); }
.tk-ps-o { font: 500 1rem/1.4 var(--font-hebrew); color: var(--ink); direction: rtl; margin-top: 4px; }
.tk-ps-name { font: 600 .7rem/1.3 var(--font-body); color: var(--ink-soft); }
.tk-ps[aria-expanded="true"] { background: var(--tt-grad-deep); border-color: transparent; box-shadow: 0 12px 28px rgba(12,35,80,.28); }
.tk-ps[aria-expanded="true"] .tk-ps-n, .tk-ps[aria-expanded="true"] .tk-ps-o { color: #fff; }
.tk-ps[aria-expanded="true"] .tk-ps-h, .tk-ps[aria-expanded="true"] .tk-ps-name { color: var(--tt-ice); }
.tk-ps:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.tk-ps-panel { margin-top: 16px; border: 1px solid var(--accent-soft); border-radius: var(--radius); background: var(--surface); box-shadow: var(--tt-shadow-lift); padding: clamp(16px, 3.6vw, 26px); scroll-margin-top: 70px; }
.tk-pp-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.tk-pp-top h3 { font: 700 clamp(1.25rem, 3.6vw, 1.5rem)/1.25 var(--font-display); color: var(--accent-deep); margin: 0; }
.tk-pp-top h3:focus { outline: none; }
.tk-pp-top h3:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.tk-pp-he { font: 600 1.35rem/1.2 var(--font-hebrew); color: var(--ink); direction: rtl; }
.tk-pp-label { font: 700 .62rem/1.4 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 18px 0 4px; }
.tk-pp p { font-size: .98rem; line-height: 1.72; color: var(--ink-soft); margin: 0; }
.tk-pp .tk-src { margin: 10px 0 0; box-shadow: none; }
.tk-pp-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.tk-pp-nav .tk-pill { margin-right: auto; }

/* Pill button (primary, cyan, on light) */
.tk-pill {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  padding: 12px 22px; border-radius: 999px; background: var(--tt-cyan); color: #08233f;
  font: 800 .92rem/1.1 var(--font-body); letter-spacing: .3px; box-shadow: 0 10px 24px rgba(0,200,220,.32);
  transition: transform .15s, box-shadow .15s, background .2s;
}
.tk-pill:hover { transform: translateY(-3px); background: var(--tt-cyan-bright); box-shadow: 0 16px 32px rgba(0,200,220,.42); }
.tk-pill:active { transform: translateY(-1px); }
.tk-pill:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; }

/* ── 6. Steps, CTA and tips ──────────────────────────────────── */
.tk-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.tk-step { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 16px 18px 16px 64px; counter-increment: step; }
.tk-step::before {
  content: counter(step); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--tt-grad-header); color: #fff; font: 700 .9rem/1 var(--font-display);
}
.tk-step-k { font: 700 .6rem/1.4 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tk-step h3 { font: 700 1.08rem/1.3 var(--font-display); color: var(--accent-deep); margin: 2px 0 6px; }
.tk-step p { font-size: .95rem; line-height: 1.7; color: var(--ink-soft); margin: 0; }
.tk-step .tk-src { margin: 10px 0 0; box-shadow: none; }
.tk-step .tk-src-he { font-size: clamp(1.02rem, 2.6vw, 1.16rem); padding-top: 12px; }
.tk-step .tk-src-en { font-size: 1rem; }
@media (max-width: 460px) { .tk-step { padding: 54px 14px 14px; } .tk-step::before { left: 14px; top: 14px; } }

.tk-cta { margin: 26px 0 0; text-align: center; padding: 22px 18px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.tk-cta p { margin: 0 0 14px; color: var(--ink-soft); font-size: .98rem; }

.tk-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tk-tip { 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; }
.tk-tip:hover { transform: translateY(-6px); box-shadow: var(--tt-shadow-lift); border-color: var(--accent-soft); }
.tk-tip h4 { font: 700 1.02rem/1.3 var(--font-display); color: var(--accent-deep); margin: 0 0 8px; }
.tk-tip p { font-size: .9rem; line-height: 1.65; color: var(--ink-soft); margin: 0 0 8px; }
.tk-tip .tk-q-he { font-family: var(--font-hebrew); font-size: 1.04rem; line-height: 1.8; color: var(--ink); direction: rtl; text-align: right; margin: 8px 0 2px; }
.tk-tip .tk-q-en { font-family: var(--font-serif); font-size: 1rem; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.tk-tip .tk-src-line a { color: var(--accent-deep); text-transform: none; letter-spacing: .02em; font-size: .76rem; }

/* ── 7. FAQ ──────────────────────────────────────────────────── */
.tk-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;
}
.tk-faq details[open] { border-color: var(--accent-soft); box-shadow: var(--shadow); }
.tk-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;
}
.tk-faq summary::-webkit-details-marker { display: none; }
.tk-faq summary:hover { background: var(--surface-2); }
.tk-faq summary::after { content: '+'; flex: none; color: var(--accent-deep); font-size: 1.3rem; line-height: 1; font-weight: 400; }
.tk-faq details[open] summary::after { content: '\2212'; }
.tk-faq details[open] summary { background: var(--surface-2); }
.tk-faq-body { padding: 14px 18px 16px; font-size: .94rem; line-height: 1.78; color: var(--ink-soft); }
.tk-faq-body p { margin: 0; }

/* ── 8. Sources ──────────────────────────────────────────────── */
.tk-sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tk-sources li:not(.tk-skel) { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.tk-sources a { display: block; padding: 12px 16px; text-decoration: none; border-radius: var(--radius-sm); transition: background .15s; }
.tk-sources a:hover { background: var(--surface-2); }
.tk-sources a:active { background: #e6eefb; }
.tk-sources b { display: block; font: 700 .95rem/1.35 var(--font-display); color: var(--accent-deep); }
.tk-sources span { display: block; margin-top: 3px; font-size: .86rem; line-height: 1.55; color: var(--ink-soft); }

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

/* credits strip, above the CTA band */
.tk-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: .82rem; line-height: 1.75;
}
.tk-credits a { color: var(--accent-deep); }
.tk-credits p { margin: 0 0 6px; }

@media (prefers-reduced-motion: reduce) {
  .tk-fade, .tk-skel { animation: none; }
  .tk-chip, .tk-ps, .tk-fact, .tk-tip, .tk-related a, .tk-btn, .tk-pill, .tk-strip span { transition: none; }
  .tk-chip:hover, .tk-ps:hover, .tk-fact:hover, .tk-tip:hover, .tk-related a:hover, .tk-btn:hover, .tk-pill:hover, .tk-strip span.on { transform: none; }
  html { scroll-behavior: auto; }
}

/* ── Print / PDF ─────────────────────────────────────────────────
   Interactive pieces drop out; static mounts filled by tikkun.js show every
   expression of praise and every psalm in full. */
.tk-print-only { display: none; }
@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, .tk-bar, .tk-hero-actions, .tt-band, #more, .tk-screen-only,
  .tk-praise, .tk-grid, .tk-ps-panel, .tk-cta, .tk-skel { display: none !important; }
  .tk-print-only { display: block !important; }
  .tk-src-he, .tk-src-en { display: block !important; }
  a { color: inherit !important; text-decoration: none !important; }
  .tk-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; }
  .tk-print-head { display: flex !important; justify-content: space-between; align-items: center; margin-bottom: 10pt; font: 600 9pt var(--font-body); color: #555; }
  .tk-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: 20pt; margin: 0 0 6pt; }
  .tt-hero-lede { color: #333; font-size: 10.5pt; font-weight: 400; max-width: none; }
  .tk-wrap { max-width: none; padding: 0; }
  .tk-section { margin: 20pt 0 0; }
  .tk-section > .tt-eyebrow { margin-bottom: 4pt; color: #1C47A5; display: block !important; text-align: center; break-after: avoid; }
  .tk-section > h2 { font-size: 15pt; margin-bottom: 4pt; break-after: avoid; display: table; margin-left: auto; margin-right: auto; border-bottom: 1.5pt solid #5E90E3; padding-bottom: 4pt; }
  .tk-section > h2::after { display: none; }
  .tk-sub { color: #444; font-size: 9.5pt; margin: 6pt auto 10pt; }
  .tk-prose { font-size: 10.5pt; line-height: 1.55; color: #111; }
  .tk-h3 { font-size: 12.5pt; margin: 12pt 0 4pt; break-after: avoid; }
  .tk-src, .tk-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; }
  .tk-src-he, .tk-src.deep .tk-src-he { color: #111; text-align: right; font-size: 13pt; line-height: 1.7; padding: 8pt 12pt 2pt; }
  .tk-src-en, .tk-src.deep .tk-src-en { color: #333; text-align: left; font-size: 11pt; line-height: 1.45; padding: 2pt 12pt 2pt; }
  .tk-src-ref, .tk-src.deep .tk-src-ref { background: none !important; color: #1C47A5; border-top: 1px solid #e9eef6; justify-content: flex-start; margin-top: 6pt; padding: 5pt 12pt; }
  .tk-cards, .tk-tips { display: block; }
  .tk-fact, .tk-tip, .tk-step, .tk-ev { break-inside: avoid; border: 0; border-bottom: 1px solid #e9eef6; border-radius: 0; padding-top: 6pt; padding-bottom: 6pt; }
  .tk-ev::before, .tk-step::before { background: none !important; color: #1C47A5; border: 1.5pt solid #1C47A5; box-shadow: none; }
  .tk-time::before { background: #cfdcf0; }
  .tk-faq details { border: 0; border-bottom: 1px solid #e9eef6; border-radius: 0; margin: 0; break-inside: avoid; }
  .tk-faq summary { padding: 8pt 0 2pt; background: none !important; font-size: 10.5pt; }
  .tk-faq summary::after { display: none; }
  .tk-faq-body { padding: 0 0 8pt; font-size: 10pt; color: #222; }
  .tk-sources a { padding: 4pt 0; }
  .tk-credits { margin: 18pt 0 0; padding: 8pt 0 0; font-size: 8.5pt; color: #555; text-align: left; }
  .tk-print-foot { margin-top: 8pt; font: 600 8.5pt var(--font-body); color: #1C47A5; }
  .tk-p-item { border-bottom: 1px solid #e9eef6; padding: 6pt 0; break-inside: avoid; }
  .tk-p-head { color: #1C47A5; font-size: 10.5pt; font-weight: 700; }
  .tk-p-he { font-family: var(--font-hebrew); font-size: 13pt; line-height: 1.7; text-align: right; direction: rtl; margin: 2pt 0; }
  .tk-p-note { font-size: 9.5pt; color: #333; margin-top: 3pt; line-height: 1.45; }
}
.tk-q-ref { font: 600 .7rem/1.4 var(--font-body); color: var(--muted); white-space: nowrap; }
