:root {
  --black: #0a0a0a;
  --ink: #1d1a15;
  --cream: #efe6d2;
  --cream-2: #e4d8bd;
  --paper: #fbf7ee;
  --page: #f4eee1;
  --gold: #a8874a;
  --gold-soft: #c7ab72;
  --muted: #5f574a;
  --line: rgba(168,135,74,.32);
  --radius: 14px;
  --serif: "Frank Ruhl Libre", "David Libre", "Times New Roman", serif;
  --sans: "Heebo", "Assistant", "Arial Hebrew", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--page);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #6d5320; }
a:focus-visible, .btn:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 8px;
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--paper); color: var(--black); padding: .5rem 1rem; border-radius: 8px; z-index: 10; }
.skip:focus { top: 1rem; }
[hidden] { display: none !important; }

/* ---------- hero (black band, like the logo) ---------- */
.hero {
  position: relative;
  background: #000;
  color: var(--cream);
  text-align: center;
  padding: 0 1.25rem 2.6rem;
  border-bottom: 3px double var(--gold);
}
.bh { margin: 0; padding-top: .7rem; text-align: start; font-family: var(--serif); font-size: .85rem; color: var(--cream-2); opacity: .85; }
.topnav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem 1.1rem;
  padding: .4rem 0 0; font-size: .95rem;
}
.topnav a { color: var(--cream-2); text-decoration: none; padding: .35rem .15rem; border-bottom: 1px solid transparent; }
.topnav a:hover { color: #fff; border-bottom-color: var(--gold-soft); }
.hero-inner { max-width: 40rem; margin: 0 auto; padding-top: 1.4rem; }
.logo-h1 { margin: 0; }
.logo { width: min(78vw, 360px); margin: 0 auto; }
.tagline {
  margin: .9rem 0 1.6rem;
  display: flex; justify-content: center;
  font-family: var(--serif); font-size: clamp(1.3rem, 5.4vw, 1.6rem); color: var(--gold-soft);
  align-items: center; gap: .8rem;
}
.tagline::before, .tagline::after { content: "❖"; font-size: .6em; opacity: .8; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .65rem 1.4rem;
  border-radius: 999px; border: 1.5px solid var(--black);
  background: var(--black); color: var(--cream);
  font-weight: 500; font-size: 1rem; text-decoration: none; line-height: 1.2;
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: #2a251c; }
.btn svg { width: 21px; height: 21px; fill: currentColor; flex: none; }
.btn-cream { background: var(--cream); color: var(--black); border-color: var(--cream); }
.btn-cream:hover { background: #fff; }
.btn-outline { background: transparent; color: var(--black); }
.btn-outline:hover { background: var(--black); color: var(--cream); }

/* ---------- sections ---------- */
main { max-width: 46rem; margin: 0 auto; padding: 0 1.1rem; }
.section { padding: 2.5rem 0 .75rem; scroll-margin-top: 1rem; }
.section-head { text-align: center; margin-bottom: 1.3rem; }
.eyebrow { display: block; color: var(--gold); font-size: .85rem; font-weight: 500; letter-spacing: .06em; margin-bottom: .1rem; }
.section h2 { font-family: var(--serif); font-weight: 700; color: var(--black); font-size: clamp(1.7rem, 7vw, 2.2rem); line-height: 1.2; margin: 0; }
.ornament { text-align: center; color: var(--gold); letter-spacing: .5em; font-size: .9rem; margin: 1.6rem 0 0; padding-inline-start: .5em; }
.ornament.small { margin: 1.6rem 0; }

/* the black masthead band from the printed letter */
.masthead-band {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem .9rem;
  background: var(--black); color: #fff;
  font-family: var(--serif); font-weight: 700; font-size: 1.02rem;
  padding: .45rem 1rem; line-height: 1.5;
}

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 28px rgba(20,15,5,.08); }
.card h3 { font-family: var(--serif); color: var(--black); font-size: 1.7rem; line-height: 1.25; margin: 0; }
.latest-body { display: flex; gap: 1.1rem; padding: 1.2rem; align-items: center; }
.latest-thumb { flex: 0 0 34%; max-width: 150px; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.12); background: #fff; }
.latest-text { flex: 1; min-width: 0; }
.issue-meta { color: var(--muted); font-size: .95rem; margin: .25rem 0 1rem; }
.latest-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.latest-actions .btn { padding-inline: 1.1rem; }
@media (max-width: 480px) {
  .latest-actions { display: grid; }
  .latest-actions .btn { width: 100%; }
}

/* ---------- archive ---------- */
.archive-tools { display: grid; gap: .8rem; margin-bottom: 1.2rem; }
.search input {
  width: 100%; min-height: 48px; padding: .6rem 1rem;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: #8b8273; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  font: inherit; font-size: .92rem; min-height: 40px; padding: .3rem 1rem; cursor: pointer;
  border-radius: 999px; border: 1.5px solid var(--black); background: transparent; color: var(--black);
}
.chip[aria-pressed="true"] { background: var(--black); color: var(--cream); }
.year-group { margin-bottom: 1.3rem; }
.year-title { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 .55rem; color: var(--black); border-bottom: 1px solid var(--line); padding-bottom: .25rem; }
.year-title span { color: var(--gold); font-size: .95em; }
.archive-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.archive-link {
  display: flex; justify-content: space-between; align-items: baseline; gap: .8rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  border-inline-start: 4px solid var(--black);
  padding: .8rem 1rem; text-decoration: none; color: var(--ink);
}
.archive-link:hover { border-inline-start-color: var(--gold); background: #fff; }
.archive-title { font-family: var(--serif); font-size: 1.18rem; font-weight: 700; color: var(--black); }
.archive-meta { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 1rem; border: 1.5px dashed var(--line); border-radius: 10px; margin: 0 0 1rem; }
.archive-note { text-align: center; color: var(--muted); font-size: .92rem; margin: .6rem 0 0; }


/* ---------- subscribe ---------- */
.subscribe { padding-bottom: 3rem; }
.subscribe-card {
  text-align: center; color: var(--cream); background: #000;
  border-radius: 20px; padding: 2rem 1.4rem 2.2rem;
  border: 1px solid #000; outline: 1px solid var(--gold); outline-offset: -8px;
}
.logo-small { width: 150px; margin: 0 auto .6rem; }
.subscribe-card h2 { color: var(--cream); font-family: var(--serif); font-size: clamp(1.55rem, 6vw, 2rem); margin: 0; }
.subscribe-card p { color: var(--cream-2); margin: .6rem auto 1.4rem; max-width: 28rem; }
.btn-wa { background: var(--cream); color: var(--black); border-color: var(--cream); }
.btn-wa:hover { background: #fff; }
.subscribe-card.compact { padding: 1.6rem 1.2rem 1.8rem; margin: 2rem 0 1rem; }
.subscribe-card.compact h2 { margin-bottom: 1rem; font-size: 1.4rem; }

/* ---------- footer ---------- */
.footer { text-align: center; color: var(--cream-2); background: #000; font-size: .9rem; padding: 1.6rem 1rem 2.2rem; }
.footer p { margin: 0; }
.footer-name { font-family: var(--serif); color: var(--cream); font-size: 1.3rem; }

/* ---------- issue page ---------- */
.hero-issue { padding-bottom: 0; border-bottom: 0; }
.hero-issue .topnav { padding-top: 1rem; }
.logo-link { display: block; width: 150px; margin: .8rem auto .2rem; }
.logo-sm { width: 150px; }
.hero-issue h1 { font-family: var(--serif); font-size: clamp(2.1rem, 9vw, 3.2rem); line-height: 1.15; margin: .2rem 0 1rem; color: var(--cream); }
.hero-issue .masthead-band { background: #000; border-top: 1px solid var(--gold); border-bottom: 3px double var(--gold); margin: 0 -1.25rem; padding-inline: 1.25rem; }
.issue-main { max-width: 40rem; padding-top: 1.4rem; }
.letter {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.25rem; box-shadow: 0 10px 28px rgba(20,15,5,.07);
  font-family: var(--serif); font-size: 1.16rem; line-height: 1.9; text-align: justify;
}
.letter p { margin: 0 0 1rem; }
.letter .letter-bh { text-align: start; font-size: .9rem; color: var(--muted); margin-bottom: .6rem; }
.letter .verse { font-weight: 700; color: var(--black); text-align: start; font-size: 1.2rem; }
.original { margin-top: 2.2rem; text-align: center; }
.original h2 { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 .4rem; color: var(--black); }
.original-note { color: var(--muted); margin: 0 0 1rem; font-size: .95rem; }
.pages { display: grid; gap: 1rem; }
.page-img { display: block; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.issue-actions { display: flex; justify-content: center; margin-top: 1.2rem; }
.issue-nav { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: 2rem; }
.issue-nav-link { display: flex; flex-direction: column; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); text-decoration: none; color: var(--black); font-family: var(--serif); font-weight: 700; font-size: 1.1rem; }
.issue-nav-link small { font-family: var(--sans); font-weight: 400; color: var(--muted); font-size: .82rem; }
.issue-nav-link.older { text-align: end; }
.back-wrap { text-align: center; margin: .5rem 0 2.5rem; }
.back { color: var(--black); }

@media (min-width: 760px) {
  body { font-size: 1.1rem; }
  .hero { padding-bottom: 3.4rem; }
  .hero-issue { padding-bottom: 0; }
  .logo { width: 400px; }
  .section { padding-top: 3.4rem; }
  .latest-body { padding: 1.6rem 1.8rem; gap: 1.8rem; }
  .letter { padding: 2.2rem 2.4rem; }
}

/* the issue itself: only the PDF */
.pdf-frame { display: block; width: 100%; height: min(88vh, 1100px); background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.pdf-fallback { display: block; text-decoration: none; }
.pdf-fallback img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.pdf-fallback .btn { margin-top: 1rem; }
@media (max-width: 700px) { .pdf-frame { height: auto; aspect-ratio: 1159 / 1500; } }
.issue-actions { flex-wrap: wrap; gap: .6rem; }
.original .original-note { margin-top: .8rem; }

/* ================= umbrella: home tiles + section pages ================= */
.hero-home { padding-bottom: 1.6rem; }
.hero-home .logo-h1 { padding-top: .6rem; }
.hero-home .logo { width: min(66vw, 320px); }
.footer-name a { color: inherit; text-decoration: none; }

.tiles {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem;
  margin: 1.4rem 0 0;
}
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center; justify-content: center; min-height: 150px; padding: 1.1rem .6rem 1rem;
  background: var(--paper); color: var(--black); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(20,15,5,.08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tile::after { content: ""; position: absolute; inset: 6px; border: 1px solid var(--line); border-radius: 10px; pointer-events: none; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(20,15,5,.13); border-color: var(--gold); }
.tile:active { transform: translateY(0); }
.tile:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: var(--radius); }
.tile-medallion, .section-medallion, .mini-icon {
  display: grid; place-items: center; border-radius: 50%;
  background: #000; color: var(--gold-soft);
  box-shadow: 0 0 0 2px #000, 0 0 0 3px var(--gold);
}
.tile-medallion { width: 66px; height: 66px; margin-bottom: .7rem; }
.ornament-icon { width: 62%; height: 62%; display: block; }
.tile-title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.18rem, 5.4vw, 1.5rem); line-height: 1.2; }

/* section pages */
.hero-section { padding-bottom: 1.8rem; }
.hero-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: .55rem; }
.hero-bar .bh { padding-top: 0; }
.back-home { color: var(--cream-2); text-decoration: none; font-size: .95rem; padding: .45rem .1rem; display: inline-flex; gap: .35rem; align-items: center; min-height: 44px; }
.back-home:hover { color: #fff; }
.hero-section .logo-link { width: 120px; margin: .4rem auto .9rem; }
.hero-section .logo-sm { width: 120px; }
.section-medallion { width: 76px; height: 76px; margin: 0 auto .6rem; }
.section-medallion.small { width: 64px; height: 64px; }
.hero-section h1 { font-family: var(--serif); font-size: clamp(2.1rem, 9.5vw, 3.1rem); line-height: 1.15; margin: 0; color: var(--cream); }
.section-sub { margin: .35rem 0 0; color: var(--gold-soft); font-family: var(--serif); font-size: 1.12rem; }

.media-section { padding-top: 1.8rem; }
.coming-soon {
  text-align: center; background: var(--paper); border: 1.5px dashed var(--gold);
  border-radius: var(--radius); padding: 2rem 1.2rem 1.6rem;
}
.coming-soon p { margin: .8rem 0 0; font-family: var(--serif); font-size: 1.35rem; color: var(--black); }

.rec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.rec { background: var(--paper); border: 1px solid var(--line); border-inline-start: 4px solid var(--black); border-radius: 12px; padding: .85rem .9rem .9rem; }
.rec-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; }
.rec-num { flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: #000; color: var(--gold-soft); font-size: .9rem; font-weight: 500; }
.rec-text { flex: 1; min-width: 0; }
.rec-title { font-family: var(--serif); font-size: 1.2rem; line-height: 1.3; margin: 0; color: var(--black); }
.rec-meta { color: var(--muted); font-size: .88rem; margin: .1rem 0 0; }
.rec-dl { flex: none; font-size: .85rem; color: var(--muted); padding: .4rem .2rem; }
.rec audio, .simcha audio { width: 100%; display: block; height: 44px; }
.track-now { margin: 0 0 .45rem; font-size: .9rem; color: var(--muted); }
.track-now b { color: var(--black); font-weight: 600; }
.tracks { list-style: none; margin: .7rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.track { display: flex; align-items: center; gap: .4rem; border-bottom: 1px solid var(--line); }
.track-play { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; background: none; border: 0; padding: .7rem .1rem; font: inherit; color: var(--ink); text-align: start; cursor: pointer; min-height: 48px; }
.track-n { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold); font-size: .82rem; }
.track-name { flex: 1; min-width: 0; font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.track-dur { flex: none; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; direction: ltr; }
.track-dl { flex: none; font-size: .85rem; color: var(--muted); padding: .6rem .3rem; }
.track.is-current .track-n { background: #000; border-color: #000; color: var(--gold-soft); }
.track.is-current .track-name { font-weight: 600; color: var(--black); }
.media-section .search { display: block; margin-bottom: 1rem; }

.simcha-list { display: grid; gap: 1rem; }
.simcha { padding: 0 0 1rem; }
.simcha-head { padding: 1rem 1.1rem .6rem; }
.simcha-head h3 { font-size: 1.45rem; }
.simcha-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: .8rem; }
.simcha-photos.one { grid-template-columns: 1fr; }
.simcha-photos img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.simcha-photos.one img { aspect-ratio: auto; }
.simcha video { width: 100%; display: block; margin-bottom: .8rem; background: #000; }
.simcha-audio, .simcha-actions { padding: 0 1.1rem; margin-top: .5rem; }
.simcha-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.other-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: 2.2rem 0 0; }
.mini-tile { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; padding: .8rem .3rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; color: var(--black); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: .98rem; line-height: 1.2; min-height: 44px; }
.mini-tile:hover { border-color: var(--gold); }
.mini-icon { width: 40px; height: 40px; }
.back-wrap .back-home { color: var(--black); }
.section-page .subscribe { padding-bottom: 0; }

@media (min-width: 760px) {
  .tiles { gap: 1.1rem; margin-top: 2.2rem; }
  .tile { min-height: 190px; }
  .tile-medallion { width: 80px; height: 80px; }
  .hero-home { padding-bottom: 2.2rem; }
}
