/* יד ברודמן – עיצוב האתר (מבוסס על הדמו שאושר) */
:root {
  --ink: #0f2a3a;
  --ink-2: #163a4f;
  --ink-3: #21506a;
  --paper: #fffdf8;
  --parchment: #f5efe2;
  --parchment-2: #ece3cf;
  --gold: #b8893b;
  --gold-2: #d4a957;
  --gold-soft: #f1e4c4;
  --text: #1b2630;
  --muted: #5d6973;
  --line: #e3d9c4;
  --green: #2f7a5f;
  --red: #b2452f;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(15, 42, 58, .06), 0 8px 24px rgba(15, 42, 58, .07);
  --shadow-lg: 0 2px 6px rgba(15, 42, 58, .08), 0 22px 50px rgba(15, 42, 58, .14);
  --serif: "Frank Ruhl Libre", "David", serif;
  --sans: "Assistant", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
body.has-player { padding-bottom: 84px; }
img { max-width: 100%; display: block; }
a { color: var(--ink-3); text-decoration: none; }
a:hover { color: var(--gold); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; color: var(--ink); font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.svg-i { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.2em; flex: none; }

/* ---------- ribbon / topbar ---------- */
.topbar { background: var(--ink); color: #cfdbe2; font-size: 14px; }
.topbar-in { display: flex; align-items: center; gap: 10px; min-height: 36px; flex-wrap: wrap; }
.topbar .dot { color: var(--gold-2); }
#parasha strong { color: #fff; font-weight: 600; }
.topbar-sp { flex: 1; }
.topbar-link { color: #e8eef1; }
.topbar-link + .topbar-link { border-inline-start: 1px solid #36566a; padding-inline-start: 10px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 248, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.emblem { width: 64px; height: 64px; display: inline-flex; flex-shrink: 0; }
.emblem img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 26px; font-weight: 900; letter-spacing: .5px; }
.brand-text small { font-size: 13px; color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.main-nav > a, .nav-drop-btn {
  color: var(--text); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 16px;
  background: none; border: 0; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.main-nav > a:hover, .nav-drop-btn:hover { background: var(--parchment); color: var(--ink); }
.main-nav a.active, .nav-drop-btn.active { color: var(--ink); background: var(--parchment); box-shadow: inset 0 -2px 0 var(--gold); }
.nav-drop { position: relative; }
.nav-drop-menu {
  position: absolute; top: calc(100% + 6px); inset-inline-start: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 8px; display: none; flex-direction: column;
}
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { display: flex; }
.nav-drop::after { content: ""; position: absolute; top: 100%; inset-inline: 0; height: 8px; }
.nav-drop-menu a { padding: 9px 12px; border-radius: 8px; color: var(--text); font-weight: 500; }
.nav-drop-menu a:hover { background: var(--parchment); color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
}
.icon-btn:hover { background: var(--parchment); }
.menu-btn { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 16px; line-height: 1.2; transition: transform .15s, box-shadow .15s, background .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 9px 16px; font-size: 15px; }
.btn-gold { background: var(--gold); color: #fff; box-shadow: 0 6px 16px rgba(184, 137, 59, .3); }
.btn-gold:hover { background: #a67a30; color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--parchment); color: var(--ink); }
.btn-light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-light:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link-more { font-weight: 700; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(212,169,87,.22), transparent 60%),
    radial-gradient(800px 500px at 0% 110%, rgba(33,80,106,.9), transparent 60%),
    var(--ink);
}
.hero-pattern {
  position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='92'%3E%3Cpath d='M40 6 70 58H10z M40 86 10 34h60z' fill='none' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(to left, #000 30%, transparent 85%);
  mask-image: linear-gradient(to left, #000 30%, transparent 85%);
}
.memorial-strip { display: block; background: #f9f4e8; border-bottom: 1px solid var(--line); color: #5b4415; }
.memorial-strip:hover { background: #f4ecda; color: #5b4415; }
.memorial-strip .wrap { display: flex; align-items: center; gap: 12px; padding: 14px 0; font-size: 16px; }
.memorial-strip .wrap > .svg-i { color: var(--gold); width: 22px; height: 22px; }
.memorial-strip b { font-family: var(--serif); color: var(--ink); }
.memorial-strip .ms-more { margin-inline-start: auto; font-weight: 700; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 640px) { .memorial-strip .ms-more { display: none; } }
.hero-in { position: relative; display: grid; grid-template-columns: 1.25fr .95fr; gap: 48px; padding: 72px 0 84px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; letter-spacing: .3px;
  color: var(--gold-2); text-transform: none; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.hero h1 { color: #fff; font-size: clamp(38px, 5.2vw, 64px); font-weight: 900; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--gold-2); }
.hero-lead { font-size: 19px; color: #cfdde5; max-width: 560px; margin-bottom: 28px; }
.hero-search {
  display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 8px 8px 8px 8px;
  max-width: 600px; box-shadow: 0 20px 40px rgba(0,0,0,.25);
}
.hero-search .svg-i { color: var(--muted); margin-inline-start: 10px; width: 22px; height: 22px; }
.hero-search input { flex: 1; border: 0; outline: 0; font-size: 17px; padding: 10px 4px; background: transparent; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,.08); color: #e5eef3; border: 1px solid rgba(255,255,255,.16);
}
.chip:hover { background: rgba(255,255,255,.16); color: #fff; }

.now-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-lg);
  padding: 24px; backdrop-filter: blur(6px);
}
.now-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.now-head h3 { color: #fff; font-size: 22px; margin: 0; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #b8e3cf; font-weight: 700; }
.live-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #4fd39a; box-shadow: 0 0 0 0 rgba(79,211,154,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(79,211,154,0); } 100% { box-shadow: 0 0 0 0 rgba(79,211,154,0); } }
.now-list { display: flex; flex-direction: column; gap: 10px; }
.now-item { display: grid; grid-template-columns: 62px 1fr; gap: 14px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); }
.now-item.is-live { background: rgba(79,211,154,.12); border: 1px solid rgba(79,211,154,.35); }
.now-time { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--gold-2); line-height: 1.1; }
.now-time small { display: block; font-family: var(--sans); font-size: 12px; color: #9fb4c1; font-weight: 500; margin-top: 2px; }
.now-title { color: #fff; font-weight: 700; line-height: 1.3; }
.now-sub { color: #a9bfcc; font-size: 14px; }
.now-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-inline-start: 6px; vertical-align: 1px; }
.now-badge.live { background: #4fd39a; color: #0c3325; }
.now-badge.soon { background: var(--gold-2); color: #3d2a08; }
.now-foot { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; color: #a9bfcc; }
.now-foot a { color: #fff; font-weight: 700; }

/* ---------- stats ---------- */
.stats { background: var(--parchment); border-bottom: 1px solid var(--line); }
.stats-in { display: grid; grid-template-columns: repeat(5, 1fr); }
.stat { padding: 26px 16px; text-align: center; border-inline-start: 1px solid var(--line); }
.stat:first-child { border-inline-start: 0; }
.stat b { display: block; font-family: var(--serif); font-size: 40px; color: var(--ink); line-height: 1; font-weight: 900; }
.stat span { color: var(--muted); font-size: 15px; }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--parchment); }
.section-ink { background: var(--ink); color: #dbe6ec; }
.section-ink h2, .section-ink h3 { color: #fff; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(30px, 3.4vw, 42px); margin: 0; }
.sec-head p { color: var(--muted); margin: 6px 0 0; max-width: 620px; }
.section-ink .sec-head p { color: #a9bfcc; }

.tabs { display: inline-flex; gap: 4px; background: var(--parchment); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.tab { border: 0; background: none; padding: 8px 16px; border-radius: 9px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* ---------- lesson cards ---------- */
.feature-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; }
.lesson-feature {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 420px; color: #fff;
  display: flex; flex-direction: column; justify-content: end; padding: 32px; box-shadow: var(--shadow-lg);
}
.lesson-feature .cover { position: absolute; inset: 0; }
.lesson-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,24,34,.92) 10%, rgba(8,24,34,.1) 70%); }
.lesson-feature > *:not(.cover) { position: relative; z-index: 1; }
.lesson-feature h3 { color: #fff; font-size: 32px; margin: 10px 0 8px; }
.lesson-feature p { color: #d3dfe6; max-width: 520px; }
.lesson-feature:hover { color: #fff; }
.big-play {
  position: absolute; z-index: 2; top: 38%; left: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--ink);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px rgba(0,0,0,.35); transition: transform .2s;
}
.big-play .svg-i { width: 34px; height: 34px; margin-inline-end: -4px; }
.lesson-feature > .big-play { position: absolute; }
.lesson-feature:hover .big-play { transform: translate(-50%, -50%) scale(1.07); }

.lesson-list { display: flex; flex-direction: column; gap: 12px; }
.lesson-row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.lesson-row:hover { border-color: var(--gold-2); box-shadow: var(--shadow); color: var(--text); transform: translateY(-1px); }
.lesson-row h4 { font-family: var(--sans); font-size: 16.5px; font-weight: 700; margin: 0 0 2px; line-height: 1.35; }
.lesson-row .meta { font-size: 14px; color: var(--muted); }
.type-ic {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--parchment); color: var(--ink);
}
.type-ic .svg-i { width: 24px; height: 24px; }
.type-ic.video { background: #e7eef3; color: var(--ink-3); }
.type-ic.audio { background: #f3ead7; color: #8a6420; }
.type-ic.article { background: #e6f0ea; color: var(--green); }
.row-play {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.row-play:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.type-tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,.14); color: #fff;
}
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--parchment); color: var(--ink-2); border: 1px solid var(--line);
}
.tag.gold { background: var(--gold-soft); color: #7a5717; border-color: #e6d3a6; }
.tag.gold-soft { background: #fff; color: #7a5717; border-color: #e6d3a6; }
.tag.green { background: #e3f1ea; color: var(--green); border-color: #c8e3d5; }
.tag.red { background: #f8e6e1; color: var(--red); border-color: #efcfc6; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.lcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; color: var(--text);
  display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.lcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); color: var(--text); border-color: var(--gold-2); }
.lcard-cover { position: relative; aspect-ratio: 16 / 9; }
.lcard-cover .cover { position: absolute; inset: 0; }
.lcard-cover .type-tag { position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(8,24,34,.6); backdrop-filter: blur(4px); }
.lcard-cover .dur { position: absolute; bottom: 12px; inset-inline-end: 12px; background: rgba(8,24,34,.7); color: #fff; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.lcard-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lcard-body h3 { font-family: var(--sans); font-size: 18px; font-weight: 800; margin: 0; line-height: 1.35; color: var(--ink); }
.lcard-body .meta { font-size: 14px; color: var(--muted); margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lcard-body .series { font-size: 13px; font-weight: 700; color: var(--gold); }

/* generative covers */
.cover { background: var(--ink); overflow: hidden; }
.cover svg { width: 100%; height: 100%; display: block; }

.rabbi-av {
  width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--gold-2); font-family: var(--serif);
  font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: none;
}
.rabbi-av.lg { width: 56px; height: 56px; font-size: 22px; }

/* ---------- parasha band ---------- */
.parasha-band { display: grid; grid-template-columns: 340px 1fr; gap: 36px; align-items: stretch; }
.parasha-title {
  border-radius: var(--radius-lg); padding: 32px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--ink-3), var(--ink));
}
.parasha-title .pname { font-family: var(--serif); font-size: 64px; font-weight: 900; line-height: 1; color: var(--gold-2); margin: 10px 0; }
.parasha-title p { color: #c9d8e0; margin: 0; }
.parasha-title .verse { margin-top: 24px; font-family: var(--serif); font-size: 19px; color: #fff; border-inline-start: 3px solid var(--gold-2); padding-inline-start: 14px; }
.parasha-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ---------- ask band ---------- */
.ask-band { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.ask-intro h2 { font-size: clamp(32px, 3.6vw, 46px); }
.ask-steps { list-style: none; padding: 0; margin: 26px 0 30px; display: flex; flex-direction: column; gap: 14px; }
.ask-steps li { display: flex; gap: 14px; align-items: flex-start; }
.ask-steps .n {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(212,169,87,.6); color: var(--gold-2);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; font-family: var(--serif);
}
.ask-steps b { color: #fff; display: block; }
.qa-mini { display: flex; flex-direction: column; gap: 12px; }
.qa-mini a {
  display: block; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); padding: 18px 20px; border-radius: var(--radius); color: #dbe6ec;
}
.qa-mini a:hover { background: rgba(255,255,255,.09); color: #fff; }
.qa-mini .q { font-weight: 700; color: #fff; font-size: 17px; line-height: 1.4; display: block; margin: 6px 0; }
.qa-mini .a { color: #a9bfcc; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qa-mini .tag { background: rgba(212,169,87,.15); color: var(--gold-2); border-color: rgba(212,169,87,.3); }

/* ---------- programs ---------- */
.prog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.prog {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; color: var(--text);
  display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.prog:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); color: var(--text); }
.prog .pic { width: 56px; height: 56px; border-radius: 16px; background: var(--parchment); color: var(--gold); display: flex; align-items: center; justify-content: center; }
.prog .pic .svg-i { width: 28px; height: 28px; }
.prog h3 { font-size: 23px; margin: 6px 0 0; }
.prog p { color: var(--muted); margin: 0; font-size: 16px; }
.prog .when { font-size: 14px; font-weight: 700; color: var(--ink-3); margin-top: auto; padding-top: 8px; }

/* ---------- shelf ---------- */
.shelf-wrap { position: relative; }
.shelf {
  display: flex; align-items: end; gap: 6px; overflow-x: auto; padding: 30px 6px 0; scrollbar-width: thin;
  border-bottom: 14px solid #6d4b23; border-radius: 0 0 6px 6px; box-shadow: 0 16px 20px -12px rgba(0,0,0,.4);
}
.book {
  flex: none; width: 42px; border-radius: 4px 4px 0 0; color: #f5e6c4; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 12px 0 14px;
  box-shadow: inset -4px 0 6px rgba(0,0,0,.25), inset 3px 0 3px rgba(255,255,255,.08);
  transition: transform .2s; font-family: var(--serif); font-weight: 700;
}
.book:hover { transform: translateY(-14px); color: #fff; }
.book .vol { font-size: 20px; }
.book .bt { writing-mode: vertical-rl; font-size: 14px; letter-spacing: 1px; opacity: .9; }
.book .band { position: absolute; inset-inline: 0; height: 3px; background: rgba(212,169,87,.7); }
.book.new::before {
  content: "חדש"; position: absolute; top: -26px; font-family: var(--sans); font-size: 12px; font-weight: 800;
  background: var(--gold); color: #fff; border-radius: 999px; padding: 1px 8px;
}

/* ---------- donate band ---------- */
.dedicate {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; border-radius: 28px; padding: 48px;
  background: linear-gradient(135deg, #fbf3e0, #f3e6c6); border: 1px solid #e8d6aa; position: relative; overflow: hidden;
}
.dedicate h2 { font-size: clamp(30px, 3.2vw, 40px); }
.candle { color: var(--gold); width: 54px; height: 54px; margin-bottom: 10px; }
.ded-preview {
  background: #fff; border-radius: 20px; padding: 24px; box-shadow: var(--shadow-lg); border: 1px solid #eadcb9;
}
.ded-strip {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--parchment);
  border: 1px dashed var(--gold-2); font-weight: 600; color: #6b4f1d; margin-top: 12px;
}
.ded-strip .svg-i { color: var(--gold); width: 22px; height: 22px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 10px; font-weight: 700; color: var(--muted);
}
.seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- whatsapp ---------- */
.wa {
  display: flex; align-items: center; gap: 24px; justify-content: space-between; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 32px; box-shadow: var(--shadow);
}
.wa .wa-ic { width: 56px; height: 56px; border-radius: 16px; background: #e3f5ea; color: #1f9d55; display: flex; align-items: center; justify-content: center; flex: none; }
.wa .wa-ic .svg-i { width: 30px; height: 30px; }
.wa h3 { margin: 0; font-size: 24px; }
.wa p { margin: 0; color: var(--muted); }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input { min-width: 220px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: 15px; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--muted); }
.input, .field input, .field select, .field textarea, .inline-form input {
  width: 100%; border: 1px solid #d8cdb5; background: #fff; border-radius: 12px; padding: 12px 14px; font-size: 16px; outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .inline-form input:focus {
  border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212,169,87,.2);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow); color: var(--text); }
.form-card h3 { font-size: 26px; }

/* ---------- page head ---------- */
.page-head {
  background:
    radial-gradient(800px 300px at 90% -20%, rgba(212,169,87,.18), transparent 60%),
    var(--ink);
  color: #cfdde5; padding: 54px 0 46px; position: relative; overflow: hidden;
}
.page-head h1 { color: #fff; font-size: clamp(34px, 4.4vw, 54px); font-weight: 900; margin: 0 0 10px; }
.page-head p { font-size: 18px; max-width: 700px; margin: 0; }
.page-head-sm { padding: 18px 0 16px; }
.page-head-sm .crumbs { margin: 0; }
.crumbs { font-size: 14px; color: #8ea6b4; margin-bottom: 14px; }
.crumbs a { color: #c7d6de; }

/* ---------- library ---------- */
.lib { display: grid; grid-template-columns: 270px 1fr; gap: 36px; padding: 44px 0 80px; }
.filters { position: sticky; top: 100px; align-self: start; display: flex; flex-direction: column; gap: 22px; }
.filters h4 { font-family: var(--sans); font-size: 14px; font-weight: 800; color: var(--muted); letter-spacing: .3px; margin: 0 0 8px; }
.fopt {
  display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: start; border: 0; background: none;
  padding: 7px 10px; border-radius: 9px; color: var(--text); font-size: 15.5px; font-weight: 500;
}
.fopt:hover { background: var(--parchment); }
.fopt.on { background: var(--ink); color: #fff; font-weight: 700; }
.fopt .cnt { font-size: 13px; opacity: .65; }
.lib-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.lib-bar .search-in { flex: 1; min-width: 220px; position: relative; }
.lib-bar .search-in .svg-i { position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%); color: var(--muted); }
.lib-bar .search-in input { padding-inline-start: 42px; }
.lib-count { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); background: var(--parchment); border-radius: var(--radius-lg); }
.filter-toggle { display: none; }

/* ---------- lesson page ---------- */
.lesson-page { display: grid; grid-template-columns: 1fr 340px; gap: 44px; padding: 40px 0 80px; }
.media-box { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow-lg); background: var(--ink); }
.media-box .cover { position: absolute; inset: 0; }
.media-box video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.media-box .media-note {
  position: absolute; inset-inline: 0; bottom: 0; padding: 14px 20px; background: rgba(8,24,34,.75); color: #dbe6ec; font-size: 14px;
}
.audio-hero {
  border-radius: var(--radius-lg); padding: 28px; background: linear-gradient(140deg, var(--ink-2), var(--ink)); color: #fff;
  display: flex; align-items: center; gap: 24px; box-shadow: var(--shadow-lg);
}
.audio-hero .big-play { position: static; transform: none; flex: none; }
.audio-hero:hover .big-play { transform: scale(1.05); }
.wave { display: flex; align-items: center; gap: 3px; height: 64px; flex: 1; min-width: 0; overflow: hidden; }
.wave i { flex: 1; min-width: 2px; max-width: 5px; background: rgba(212,169,87,.45); border-radius: 3px; }
.wave i.done { background: var(--gold-2); }
.lesson-title { font-size: clamp(30px, 3.6vw, 42px); margin: 26px 0 12px; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.lesson-meta .who { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 26px; }
.prose { font-size: 19px; line-height: 1.85; max-width: 720px; }
.prose p { margin-bottom: 1.1em; }
.prose h2 { font-size: 28px; margin-top: 1.4em; }
.prose blockquote { margin: 1.4em 0; padding: 4px 22px; border-inline-start: 4px solid var(--gold-2); font-family: var(--serif); font-size: 22px; color: var(--ink); }
.prose.size-1 { font-size: 21px; }
.prose.size-2 { font-size: 23px; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 20px; }
.side-card h4 { font-family: var(--sans); font-size: 16px; font-weight: 800; margin-bottom: 14px; }
.side-list { display: flex; flex-direction: column; gap: 4px; }
.side-list a { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 8px; border-radius: 10px; color: var(--text); align-items: center; }
.side-list a:hover { background: var(--parchment); }
.side-list .type-ic { width: 36px; height: 36px; border-radius: 10px; }
.side-list .type-ic .svg-i { width: 18px; height: 18px; }
.side-list b { display: block; font-size: 15px; line-height: 1.35; }
.side-list small { color: var(--muted); }
.ded-box {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; background: #fbf5e7; border: 1px solid #ecdcb4; margin-bottom: 24px; color: #6b4f1d;
}
.ded-box .svg-i { width: 26px; height: 26px; color: var(--gold); }
.ded-box b { color: #4f3a12; }
.ded-box.empty-ded { background: #fff; border-style: dashed; justify-content: space-between; flex-wrap: wrap; }

/* ---------- Q&A ---------- */
.qa-layout { display: grid; grid-template-columns: 1fr 420px; gap: 44px; padding: 44px 0 80px; align-items: start; }
.qa-list { display: flex; flex-direction: column; gap: 14px; }
.qa-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; color: var(--text); display: block; transition: box-shadow .2s, border-color .2s; }
.qa-item:hover { box-shadow: var(--shadow); border-color: var(--gold-2); color: var(--text); }
.qa-item h3 { font-family: var(--sans); font-size: 19px; font-weight: 800; margin: 10px 0 8px; line-height: 1.4; }
.qa-item p { color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qa-item .meta { font-size: 14px; color: var(--muted); margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
.qa-sticky { position: sticky; top: 100px; }
.qa-q { background: var(--parchment); border-radius: var(--radius-lg); padding: 28px; border: 1px solid var(--line); margin-bottom: 28px; }
.qa-q .label, .qa-a .label { font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--gold); margin-bottom: 8px; display: block; }
.qa-q p { font-size: 19px; margin: 0; }
.qa-a { padding: 0 4px; }
.success-box { text-align: center; padding: 20px 6px; }
.success-box .ok { width: 70px; height: 70px; border-radius: 50%; background: #e3f1ea; color: var(--green); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.success-box .ok .svg-i { width: 36px; height: 36px; }
.track-no { font-family: var(--serif); font-size: 30px; font-weight: 900; color: var(--ink); letter-spacing: 1px; }

/* ---------- schedule ---------- */
.day-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: none; }
.day-tab {
  flex: none; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 16px; font-weight: 700; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; line-height: 1.2; min-width: 74px;
}
.day-tab small { font-weight: 500; font-size: 12px; }
.day-tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.day-tab.today:not(.on) { border-color: var(--gold); color: var(--ink); }
.sched-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.sched-filters .tog { border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.sched-filters .tog.on { background: var(--gold-soft); border-color: #e6d3a6; color: #6b4f1d; }
.sched-list { display: flex; flex-direction: column; gap: 10px; }
.sched-row {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; align-items: center; padding: 16px 20px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.sched-row.live { border-color: #8fd6b4; background: #f2fbf6; }
.sched-row.past { opacity: .55; }
.sched-time { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--ink); line-height: 1.15; }
.sched-time small { display: block; font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 500; }
.sched-row h4 { font-family: var(--sans); font-size: 17px; font-weight: 800; margin: 0 0 4px; }
.sched-row .meta { font-size: 14px; color: var(--muted); display: flex; gap: 6px 16px; flex-wrap: wrap; }
.sched-row .meta span { display: inline-flex; align-items: center; gap: 5px; }
.sched-act { display: flex; gap: 8px; }

/* ---------- program / content pages ---------- */
.content-grid { display: grid; grid-template-columns: 1fr 340px; gap: 44px; padding: 48px 0 80px; }
.contact-card { background: var(--ink); color: #cfdde5; border-radius: var(--radius-lg); padding: 26px; margin-bottom: 20px; }
.contact-card h4 { color: #fff; font-family: var(--sans); font-weight: 800; }
.contact-card a { color: var(--gold-2); font-weight: 700; }
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 10px 0 30px; }
.person { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; text-align: center; }
.person .rabbi-av { margin: 0 auto 12px; }
.person b { display: block; font-family: var(--serif); font-size: 19px; color: var(--ink); }
.person small { color: var(--muted); }
.timeline { border-inline-start: 2px solid var(--line); padding-inline-start: 22px; margin: 20px 0 30px; display: flex; flex-direction: column; gap: 18px; }
.timeline div { position: relative; }
.timeline div::before { content: ""; position: absolute; inset-inline-start: -29px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--paper); }
.timeline b { color: var(--ink); }

/* ---------- English page ---------- */
.ltr { text-align: left; }
.ltr .eyebrow::before { order: -1; }
.ltr .prose, .ltr .prog p { font-family: var(--sans); }
.en-progs { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .en-progs { grid-template-columns: 1fr; } }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 150px); background: #f4f6f8; }
.admin-side { background: var(--ink); color: #cfdde5; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; }
.admin-side .who { display: flex; gap: 10px; align-items: center; padding: 8px 10px 20px; border-bottom: 1px solid #2a4a5e; margin-bottom: 12px; }
.admin-side .who .rabbi-av { background: var(--gold); color: #fff; }
.admin-side .who b { color: #fff; display: block; line-height: 1.2; }
.admin-side .who small { color: #8ea6b4; }
.admin-side button {
  display: flex; align-items: center; gap: 10px; border: 0; background: none; color: #cfdde5; padding: 11px 12px; border-radius: 10px; text-align: start; font-weight: 600;
}
.admin-side button:hover { background: rgba(255,255,255,.06); }
.admin-side button.on { background: rgba(212,169,87,.16); color: #fff; }
.admin-side .badge { margin-inline-start: auto; background: var(--gold); color: #fff; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 0 8px; }
.admin-main { padding: 34px 40px 60px; min-width: 0; }
.admin-main h2 { font-size: 32px; }
.admin-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.acard { background: #fff; border-radius: 16px; padding: 20px; border: 1px solid #e3e8ec; }
.acard b { font-size: 30px; font-family: var(--serif); color: var(--ink); display: block; line-height: 1.1; }
.acard span { color: var(--muted); font-size: 14px; }
.panel { background: #fff; border-radius: 18px; border: 1px solid #e3e8ec; padding: 26px; margin-bottom: 24px; }
.panel h3 { font-family: var(--sans); font-weight: 800; font-size: 20px; }
.dropzone {
  display: block;
  border: 2px dashed #c9d3da; border-radius: 18px; padding: 38px 20px; text-align: center; background: #fafbfc; transition: background .15s, border-color .15s; cursor: pointer;
}
.dropzone:hover, .dropzone.drag { background: #fbf5e7; border-color: var(--gold); }
.dropzone .svg-i { width: 44px; height: 44px; color: var(--gold); margin-bottom: 8px; }
.dropzone b { display: block; font-size: 19px; color: var(--ink); }
.dropzone small { color: var(--muted); }
.file-chip { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fbf5e7; border: 1px solid #ecdcb4; border-radius: 12px; margin-bottom: 18px; }
.file-chip .bar { flex: 1; height: 6px; background: #eadfc4; border-radius: 9px; overflow: hidden; }
.file-chip .bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s; }
.type-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.type-pick button {
  border: 1px solid #dfe5ea; background: #fff; border-radius: 14px; padding: 16px; font-weight: 800; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.type-pick button .svg-i { width: 26px; height: 26px; color: var(--gold); }
.type-pick button.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; background: #f7f9fa; }
.editor-bar { display: flex; gap: 4px; padding: 6px; border: 1px solid #d8cdb5; border-bottom: 0; border-radius: 12px 12px 0 0; background: #faf8f3; }
.editor-bar button { border: 0; background: none; padding: 6px 10px; border-radius: 8px; font-weight: 800; color: var(--ink); }
.editor-bar button:hover { background: #efe8d8; }
.editor { min-height: 220px; border: 1px solid #d8cdb5; border-radius: 0 0 12px 12px; padding: 16px; background: #fff; outline: 0; font-size: 17px; line-height: 1.8; }
.editor:focus { border-color: var(--gold); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.admin-table th { text-align: start; color: var(--muted); font-weight: 700; font-size: 13px; padding: 10px; border-bottom: 1px solid #e3e8ec; }
.admin-table td { padding: 12px 10px; border-bottom: 1px solid #eef1f3; vertical-align: middle; }
.admin-table td b { color: var(--ink); }
.inbox { display: grid; grid-template-columns: 340px 1fr; gap: 0; border: 1px solid #e3e8ec; border-radius: 18px; overflow: hidden; background: #fff; min-height: 480px; }
.inbox-list { border-inline-end: 1px solid #e3e8ec; overflow-y: auto; max-height: 640px; }
.inbox-list button { display: block; width: 100%; text-align: start; border: 0; border-bottom: 1px solid #eef1f3; background: #fff; padding: 16px 18px; }
.inbox-list button:hover { background: #fafbfc; }
.inbox-list button.on { background: #fbf5e7; box-shadow: inset -3px 0 0 var(--gold); }
.inbox-list b { display: block; font-size: 15px; color: var(--ink); line-height: 1.4; margin-bottom: 4px; }
.inbox-list small { color: var(--muted); }
.inbox-view { padding: 26px 28px; }
.inbox-view .qtext { background: #f7f9fa; border-radius: 14px; padding: 18px 20px; font-size: 17px; margin: 12px 0 20px; }
.admin-hint { background: #fbf5e7; border: 1px solid #ecdcb4; color: #6b4f1d; border-radius: 14px; padding: 14px 18px; font-size: 15px; margin-bottom: 24px; display: flex; gap: 10px; align-items: flex-start; }
.admin-hint .svg-i { color: var(--gold); width: 22px; height: 22px; margin-top: 2px; }

/* ---------- player ---------- */
.player {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 80; background: rgba(15, 42, 58, .97); color: #fff;
  box-shadow: 0 -10px 30px rgba(0,0,0,.2); backdrop-filter: blur(8px); animation: up .3s ease;
}
@keyframes up { from { transform: translateY(100%); } }
.player-in { width: min(1200px, 100% - 32px); margin-inline: auto; display: grid; grid-template-columns: 1.1fr auto 1.4fr auto; gap: 22px; align-items: center; min-height: 76px; }
.player-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-art { width: 46px; height: 46px; border-radius: 12px; background: var(--gold); display: flex; align-items: center; justify-content: center; flex: none; }
.player-art .svg-i { width: 24px; height: 24px; }
.player-text { min-width: 0; }
.player-text strong { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-text small { color: #a9bfcc; font-size: 13px; }
.player-controls { display: flex; align-items: center; gap: 6px; }
.pl-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; color: #dbe6ec; display: inline-flex; align-items: center; justify-content: center; }
.pl-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.pl-main { width: 50px; height: 50px; background: #fff; color: var(--ink); }
.pl-main:hover { background: var(--gold-soft); color: var(--ink); }
.pl-main .svg-i { width: 22px; height: 22px; }
.player-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #a9bfcc; font-variant-numeric: tabular-nums; }
.player-progress input { flex: 1; accent-color: var(--gold-2); direction: ltr; transform: scaleX(-1); }
.player-extra { display: flex; align-items: center; gap: 4px; }
.pl-speed { border: 1px solid rgba(255,255,255,.25); background: none; color: #fff; border-radius: 8px; padding: 4px 10px; font-weight: 800; font-size: 14px; min-width: 52px; }
.pl-speed:hover { background: rgba(255,255,255,.1); }

/* ---------- search overlay ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(8, 24, 34, .6); backdrop-filter: blur(4px); padding: 90px 16px 16px; }
.search-box { width: min(720px, 100%); margin: 0 auto; background: #fff; border-radius: 18px; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 10px; box-shadow: var(--shadow-lg); }
.search-box > .svg-i { width: 22px; height: 22px; color: var(--muted); margin-inline-start: 8px; }
.search-box input { flex: 1; border: 0; outline: 0; font-size: 19px; padding: 8px 4px; min-width: 0; }
.search-results { width: min(720px, 100%); margin: 12px auto 0; background: #fff; border-radius: 18px; max-height: 60vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.search-results:empty { display: none; }
.search-results a { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 12px 18px; color: var(--text); border-bottom: 1px solid #f0ebe0; }
.search-results a:hover { background: var(--parchment); }
.search-results .type-ic { width: 40px; height: 40px; border-radius: 10px; }
.search-results b { display: block; font-size: 16px; }
.search-results small { color: var(--muted); }
.search-results .sr-empty { padding: 20px; color: var(--muted); text-align: center; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translate(-50%, 20px); z-index: 120; background: var(--ink); color: #fff;
  padding: 14px 22px; border-radius: 14px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  display: flex; gap: 12px; align-items: center; font-weight: 600; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: var(--gold-2); font-weight: 800; white-space: nowrap; }

/* ---------- footer ---------- */
.site-footer { background: #0b2130; color: #a9bfcc; padding: 60px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 40px; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: 16px; font-weight: 800; margin-bottom: 14px; }
.site-footer a { display: block; color: #cfdde5; margin-bottom: 8px; }
.site-footer a:hover { color: var(--gold-2); }
.brand-light, .brand-light:hover { color: #fff; }
.brand-light .brand-text small { color: #8ea6b4; }
.brand-light .emblem img { filter: invert(1); }
.footer-memorial { margin-top: 18px; font-family: var(--serif); color: #c7d6de; font-size: 16px; max-width: 320px; }
.footer-bottom { border-top: 1px solid #1f3a4b; padding: 18px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 14px; }
.footer-bottom a { display: inline; margin: 0; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
@media print {
  /* Sections the reader never scrolled to would otherwise print blank. */
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1340px) {
  .header-in { gap: 14px; }
  .main-nav > a, .nav-drop-btn { padding: 8px 8px; font-size: 15px; }
}
@media (max-width: 1100px) {
  .header-actions .btn { display: none; }
}
/* The menu has 8 items: below this width it moves into the side drawer. */
@media (max-width: 1180px) {
  .menu-btn { display: inline-flex; }
  .main-nav {
    position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(320px, 85vw); background: var(--paper); z-index: 90;
    flex-direction: column; align-items: stretch; padding: 80px 18px 20px; gap: 4px; box-shadow: var(--shadow-lg);
    transform: translateX(110%); visibility: hidden; transition: transform .25s, visibility .25s; overflow-y: auto; margin: 0;
  }
  .main-nav.open { transform: none; visibility: visible; }
  .menu-btn { position: relative; z-index: 95; }
  .main-nav > a, .nav-drop-btn { font-size: 18px; padding: 12px 14px; width: 100%; justify-content: space-between; }
  .nav-drop-menu { position: static; display: flex; box-shadow: none; border: 0; padding: 0 12px; background: none; }
  .header-actions { margin-inline-start: auto; }
}
@media (max-width: 980px) {
  .hero-in, .feature-grid, .ask-band, .parasha-band, .dedicate, .qa-layout, .lesson-page, .content-grid { grid-template-columns: 1fr; }
  .hero-in { padding: 48px 0 56px; gap: 34px; }
  .stats-in { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4) { border-inline-start: 0; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .card-grid, .prog-grid, .parasha-items { grid-template-columns: repeat(2, 1fr); }
  .lib { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.open { display: flex; }
  .filter-toggle { display: inline-flex; }
  .qa-sticky { position: static; }
  .admin { grid-template-columns: 1fr; }
  .admin-side { flex-direction: row; overflow-x: auto; padding: 10px; }
  .admin-side .who { display: none; }
  .admin-side button { white-space: nowrap; }
  .admin-cards { grid-template-columns: repeat(2, 1fr); }
  .inbox { grid-template-columns: 1fr; }
  .inbox-list { max-height: 260px; border-inline-end: 0; border-bottom: 1px solid #e3e8ec; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .player-in { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 10px 0; }
  .player-progress { grid-column: 1 / -1; order: 3; }
  .player-extra { display: none; }
  body.has-player { padding-bottom: 130px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar .topbar-link { display: none; }
  .header-in { min-height: 64px; gap: 10px; }
  .emblem { width: 52px; height: 52px; }
  .brand-text strong { font-size: 22px; }
  .brand-text small { font-size: 12px; }
  .section { padding: 56px 0; }
  .stats-in { grid-template-columns: repeat(2, 1fr); }
  .stat { border-inline-start: 0; border-top: 1px solid var(--line); padding: 18px 10px; }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(even) { border-inline-start: 1px solid var(--line); }
  .stat:last-child { grid-column: 1 / -1; }
  .stat b { font-size: 32px; }
  .card-grid, .prog-grid, .parasha-items, .people, .row-2, .type-pick { grid-template-columns: 1fr; }
  .lesson-feature { min-height: 340px; padding: 22px; }
  .lesson-feature h3 { font-size: 25px; }
  .dedicate { padding: 28px 20px; }
  .sched-row { grid-template-columns: 1fr; gap: 8px; }
  .sched-act { justify-content: flex-start; }
  .lesson-row { grid-template-columns: 44px 1fr; }
  .lesson-row .row-play { display: none; }
  .type-ic { width: 44px; height: 44px; }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 22px 16px 50px; }
  .admin-cards { grid-template-columns: 1fr 1fr; }
  .audio-hero { flex-direction: column; align-items: stretch; text-align: center; }
  .audio-hero .big-play { margin: 0 auto; }
  .inline-form input { min-width: 0; flex: 1; }
  .hero-search .btn { padding: 12px 14px; }
}

/* ---------- additions for the live site ---------- */
.media-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-box .big-play { cursor: pointer; }
.chapters a { cursor: pointer; }
.chapters.static a { cursor: default; }
.audio-hero audio { width: 100%; margin-top: 10px; }
.form-error { color: var(--red); font-weight: 600; margin: 0 0 14px; }
.hp-field { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pay-note { margin-top: 14px; }
/* ---------- content from the old site ---------- */
.cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sample-tag {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .2px; color: #7a5717;
  background: var(--gold-soft); border: 1px solid #e6d3a6; border-radius: 999px; padding: 1px 10px; margin-bottom: 4px;
}
.sample-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 15px; margin: 14px 0 0; }
.sample-note .sample-tag { margin: 0; }

.photo { margin: 0 0 22px; border-radius: var(--radius-lg); overflow: hidden; background: var(--parchment); box-shadow: var(--shadow); }
.photo img { display: block; width: 100%; height: auto; }
.photo-hero { max-width: 760px; }
.photo-hero img { max-height: 520px; object-fit: cover; }
/* Portraits and posters are shown whole on their page, and from the top in cropped cards. */
.photo-hero.portrait { max-width: 420px; }
.photo-hero.portrait img { max-height: none; }
.photo.portrait img { object-position: top; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 6px 0 26px; }
.photo-grid .photo { margin: 0; }
.photo-grid .photo img { aspect-ratio: 4 / 3; object-fit: cover; }
aside .photo { margin-bottom: 20px; }

.prog-section { margin-bottom: 34px; }
.prog-section > h2 { font-size: 28px; }
.prog-photo { padding: 0 0 22px; overflow: hidden; }
.prog-photo .photo { margin: 0 0 6px; border-radius: 0; box-shadow: none; }
.prog-photo .photo img { aspect-ratio: 16 / 10; object-fit: cover; }
.prog-photo h3, .prog-photo p, .prog-photo .when { padding-inline: 22px; }

.check-list { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; }
.check-list .svg-i { color: var(--green); margin-top: 4px; }
.steps { padding-inline-start: 22px; margin: 0 0 22px; display: grid; gap: 10px; font-size: 18px; line-height: 1.7; }
.steps li::marker { color: var(--gold); font-weight: 800; }
.prose blockquote.prayer { font-size: 21px; line-height: 1.9; }

.doc-list, .volume-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.doc-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.volume-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.doc-list a, .volume-list a {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font-weight: 700;
}
.doc-list a:hover, .volume-list a:hover { background: var(--parchment); }
.doc-list .svg-i, .volume-list .svg-i { color: var(--gold); }
.doc-list small, .volume-list small { margin-inline-start: auto; color: var(--muted); font-weight: 600; font-size: 12px; }

.article-list { display: grid; gap: 16px; }
.article-item {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 26px; color: var(--text);
  transition: box-shadow .2s, transform .2s;
}
a.article-item:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); color: var(--text); }
.article-item h2 { font-size: 25px; margin-bottom: 8px; }
.article-item .meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.article-item p { color: var(--muted); margin: 0 0 10px; }
.article-item .more { font-weight: 700; color: var(--ink-3); }
.side-list a.current { background: var(--parchment); }
.side-list a:not(:has(.type-ic)) { grid-template-columns: 1fr; }
.prose .footnote { font-size: 15px; color: var(--muted); line-height: 1.6; margin-bottom: .5em; }
.prose ul { padding-inline-start: 24px; }

.holiday-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.holiday {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 26px 14px; border-radius: var(--radius-lg);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #fff;
}
.holiday:hover { background: rgba(255,255,255,.12); color: #fff; }
.holiday .svg-i { width: 30px; height: 30px; color: var(--gold-2); }
.holiday b { font-family: var(--serif); font-size: 22px; }
.holiday small { color: #a9bfcc; }
.link-more.light { color: var(--gold-2); }

.about-band { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.about-band .photo { margin: 0; }
.about-band p { font-size: 18px; color: var(--muted); }

.donate-card .bank { font-weight: 700; color: var(--ink); }
.donate-card .muted { font-size: 14px; color: var(--muted); }
.donate-hero {
  background: var(--gold-soft); border: 1px solid #e6d3a6; border-radius: var(--radius-lg); padding: 30px; margin-bottom: 28px;
}
.donate-hero .svg-i { width: 34px; height: 34px; color: var(--gold); }
.contact-list p { display: flex; gap: 10px; align-items: flex-start; }
.contact-list .svg-i { color: var(--gold-2); margin-top: 4px; }
.intro-box { background: var(--parchment); border-radius: var(--radius-lg); padding: 22px 26px; font-size: 17px; }
.intro-box p:last-child { margin-bottom: 0; }
.schedule-grid { padding-top: 30px; }
/* Grid children default to min-width:auto, so wide content (the day tabs) would stretch the page sideways. */
.content-grid > * { min-width: 0; }
.donate-hero .btn { white-space: normal; text-align: center; }

.memorial-photos { display: grid; grid-template-columns: .8fr 1.2fr; gap: 16px; align-items: start; }
.memorial-link {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin: 10px 0 30px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--text);
}
.memorial-link:hover { background: var(--parchment); color: var(--text); }
.memorial-link b { display: block; color: var(--ink); }
.memorial-link small { color: var(--muted); }
.memorial-link > .svg-i { margin-inline-start: auto; color: var(--gold); }
.fopt.more { color: var(--ink-3); font-weight: 700; }

@media (max-width: 980px) {
  .holiday-grid { grid-template-columns: repeat(3, 1fr); }
  .about-band { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .holiday-grid { grid-template-columns: repeat(2, 1fr); }
  .memorial-photos { grid-template-columns: 1fr; }
  .article-item { padding: 20px; }
}

/* ---------- PDF viewer (Avnei Mishpat volumes) ---------- */
.pdf-dialog {
  width: min(1100px, 100vw - 32px); height: min(92vh, 1000px); max-width: none; max-height: none;
  padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--paper); color: var(--text);
  box-shadow: 0 30px 80px rgba(8, 24, 34, .45); overflow: hidden;
}
.pdf-dialog[open] { animation: pdf-in .2s ease-out; }
.pdf-dialog::backdrop { background: rgba(8, 24, 34, .62); backdrop-filter: blur(3px); }
@keyframes pdf-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.pdf-dialog-in { display: flex; flex-direction: column; height: 100%; }
.pdf-dialog-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--ink); color: #fff; flex: none;
}
.pdf-dialog-head h2 { color: #fff; font-size: 22px; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf-dialog-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--gold); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pdf-dialog-head .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.pdf-dialog-head .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.pdf-dialog-head .icon-btn { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.pdf-dialog-head .icon-btn:hover { background: rgba(255,255,255,.12); }
.pdf-dialog-frame { flex: 1; width: 100%; border: 0; background: #525659; }
.pdf-dialog-note { flex: none; margin: 0; padding: 8px 16px; font-size: 14px; color: var(--muted); text-align: center; border-top: 1px solid var(--line); }
body:has(.pdf-dialog[open]) { overflow: hidden; }
@media (max-width: 640px) {
  .pdf-dialog { width: 100vw; height: 100dvh; border-radius: 0; }
  .pdf-dialog-head { padding: 10px 12px; gap: 8px; }
  .pdf-dialog-head h2 { font-size: 18px; }
  .pdf-dialog-ic { display: none; }
  .pdf-newtab-label { display: none; }
  .pdf-dialog-head .btn-sm { padding: 9px 11px; }
}
@media (prefers-reduced-motion: reduce) { .pdf-dialog[open] { animation: none; } }

/* backdrop-filter makes the header the containing block of the fixed mobile menu, squeezing the menu
   into the header's height. On small screens use a solid header instead. */
@media (max-width: 980px) {
  .site-header { backdrop-filter: none; background: var(--paper); }
}

/* ---------- founders ---------- */
.founders { display: grid; gap: 18px; }
.founder {
  display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px;
}
.founder h2 { margin: 2px 0 6px; font-size: 26px; }
.founder p { margin: 0 0 10px; }
.founder .founder-role { color: var(--gold); font-weight: 600; }
.founder .founder-photo { margin: 0; }
.founder .founder-photo img { border-radius: var(--radius); width: 150px; height: auto; display: block; }
.founder-av {
  width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; justify-self: center;
  background: var(--parchment); border: 1px solid var(--line); color: var(--ink);
  font-family: var(--serif); font-size: 44px; font-weight: 700;
}
@media (max-width: 640px) {
  .founder { grid-template-columns: 1fr; text-align: center; }
  .founder .founder-photo img { margin: 0 auto; }
  .founder .link-more { justify-content: center; }
}

/* ---------- Zoom links ---------- */
.zoom-link { display: inline-flex; align-items: center; gap: 5px; color: #1f6fd1; font-weight: 600; }
.zoom-link:hover { color: var(--gold); }
.zoom-btn {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--text);
}
.zoom-btn:hover { border-color: var(--gold-2); background: var(--parchment); color: var(--text); }
.zoom-btn b { display: block; color: var(--ink); }
.zoom-btn small { color: var(--muted); font-size: 13px; }
.zoom-btn > .svg-i { margin-inline-start: auto; color: var(--gold); }

/* ---------- memorial day strip ("השיעורים היום לעילוי נשמת") ---------- */
.yahrzeit-strip { background: #1d2b36; color: #f1e4c4; font-size: 15px; }
.yahrzeit-strip .wrap { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 0; text-align: center; }
.yahrzeit-strip .svg-i { color: var(--gold-2); width: 18px; height: 18px; flex: none; }
.yahrzeit-strip b { color: #fff; }
