@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Frank+Ruhl+Libre:wght@500;700&family=Noto+Serif+Hebrew:wght@400;500;600;700&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400&display=swap");

:root {
  --navy: #17243b;
  --navy-2: #1f3354;
  --ink: #252522;
  --muted: #69675f;
  --faint: #8a877e;
  --parchment: #f7f4ee;
  --parchment-2: #efe9dd;
  --paper: #fcfbf8;
  --white: #ffffff;
  --gold: #ad8b45;
  --gold-2: #8a6d2c;
  --line: #ded9ce;
  --line-strong: #cfc8ba;
  --shadow: 0 12px 32px rgba(23, 36, 59, 0.06);
  --serif: "Cormorant Garamond", "Playfair Display", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --read: "Source Serif 4", Georgia, "Times New Roman", serif;
  --hebrew: "Noto Serif Hebrew", "Frank Ruhl Libre", "Times New Roman", serif;
  --wrap: 1180px;
  --read-width: 45rem;
  --header: 4.6rem;
  --radius: 2px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--parchment);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

/* Fixed parchment art — content scrolls above it */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("../assets/parchment-background.jpg") center center / cover no-repeat fixed;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(247, 244, 238, 0.78) 0%,
    rgba(247, 244, 238, 0.9) 50%,
    rgba(247, 244, 238, 0.94) 100%
  );
}

@media (prefers-reduced-motion: reduce) {
  body::before { background-attachment: scroll; position: absolute; }
  body::after { position: absolute; }
}

img { max-width: 100%; }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--gold-2); }

h1, h2, h3, h4, .serif { font-family: var(--serif); font-weight: 560; letter-spacing: -0.015em; line-height: 1.12; color: var(--navy); }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin: 0.15em 0; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin: 0 0 0.4em; }
h3 { font-size: 1.55rem; margin: 0 0 0.3em; }
p { margin: 0 0 0.9em; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--navy);
  color: white;
  padding: 0.5rem 0.8rem;
  z-index: 20;
}
.skip:focus { top: 0.5rem; color: white; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap { width: min(var(--wrap), calc(100% - 2.4rem)); margin-inline: auto; }
.narrow { width: min(44rem, calc(100% - 2.4rem)); margin-inline: auto; }
.kicker {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede { font-size: 1.18rem; color: var(--muted); }
.hebrew, .he {
  font-family: var(--hebrew);
  direction: rtl;
  text-align: right;
  line-height: 1.82;
  font-size: 1.08em;
}
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

::selection { background: rgba(201, 162, 39, 0.28); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 252, 248, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(var(--wrap), calc(100% - 2rem));
  margin-inline: auto;
  min-height: var(--header);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.wordmark {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--navy);
  margin-right: auto;
  flex-shrink: 0;
}
.wordmark:hover { color: var(--navy); opacity: 0.92; }
.wordmark-logo {
  display: block;
  height: 3.35rem;
  width: auto;
  max-width: min(11.5rem, 46vw);
  object-fit: contain;
  object-position: left center;
}
.mark {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  flex-shrink: 0;
}
.mark img { display: block; width: 2.35rem; height: 2.35rem; }
.wordmark-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}
.wordmark-sub {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.primary-nav { display: flex; align-items: center; gap: 0.15rem 0.85rem; }
.primary-nav a {
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--navy);
}
.primary-nav a[aria-current="page"] {
  color: var(--navy);
  box-shadow: inset 0 -2px 0 var(--gold);
}
.header-tools { display: flex; align-items: center; gap: 0.55rem; }
.icon-btn {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--navy);
  text-decoration: none;
}
.icon-btn:hover { border-color: var(--gold); color: var(--navy); }
.nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--navy);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.7rem;
  padding: 0.45rem 1.05rem;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: var(--navy);
}
.btn-gold { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-gold:hover { background: #d4b13a; color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--parchment); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-2); color: white; }
.btn-ghost { border-color: var(--line-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-outline-gold {
  border: 2px solid var(--gold);
  background: rgba(255, 252, 248, 0.65);
  color: var(--navy);
}
.btn-outline-gold:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-line { border-color: rgba(255, 252, 248, 0.45); color: var(--parchment); }
.btn-line:hover { color: white; border-color: white; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 4.2rem 0 3.2rem;
  background: transparent;
}
.hero--landing {
  padding: clamp(4rem, 10vw, 6rem) 0 clamp(3.5rem, 8vw, 5rem);
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.hero-landing {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 42rem;
  margin-inline: auto;
}
.hero-mission-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.25rem);
  margin: 0 auto 0.5rem;
  max-width: 36rem;
}
.hero-rule {
  flex: 0 1 3.5rem;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 35%, var(--gold) 65%, transparent);
  opacity: 0.85;
}
.hero-rabbi {
  margin: 0.9rem 0 0;
  font-family: var(--sans);
  font-size: clamp(0.92rem, 1.8vw, 1.02rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
}
.hero-diburim {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: clamp(2.75rem, 7vw, 4.25rem);
  line-height: 1.05;
  color: var(--navy);
}
.hero-mission {
  margin: 0;
  flex: 1 1 auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 1.5;
  color: var(--navy);
}
.hero-intro {
  margin: 0 auto 1.35rem;
  max-width: 34rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--muted);
}
.hero-tagline {
  margin: 0 auto 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
}
.hero-actions--landing {
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  margin-top: 1.75rem;
}
.btn-hero-primary {
  min-height: 3.1rem;
  padding-inline: 1.65rem;
  font-size: 0.82rem;
}
.hero-secondary-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem 0.75rem;
  font-size: 0.9rem;
}
.hero-secondary-links a {
  text-decoration: none;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.hero-secondary-links a:hover { color: var(--navy); }
.hero-secondary-links span { color: var(--line-strong); user-select: none; }

.section { padding: 4rem 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.section-head a { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 650; text-decoration: none; }

.week-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1.6rem;
  align-items: stretch;
}
.week-copy h2 { font-size: clamp(2.3rem, 4vw, 3.4rem); }
.week-he { font-size: 1.55rem; color: var(--navy); margin: 0.1rem 0 0.8rem; }
.meta-row, .chip-row { display: flex; flex-wrap: wrap; gap: 0.45rem 0.8rem; align-items: center; color: var(--muted); font-size: 0.92rem; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); display: inline-block; }
.actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.1rem; }

.week-side { display: flex; flex-direction: column; gap: 0.8rem; }
.scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 210px;
  padding: 1.1rem 1.15rem;
  overflow: hidden;
  background: #e4d3b4;
  border: 1px solid var(--line);
}
.scene-word {
  position: relative;
  max-width: 100%;
  font-family: var(--hebrew);
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  line-height: 1.48;
  text-align: right;
  color: rgba(23, 36, 59, 0.84);
  text-shadow: 0 1px 0 rgba(255, 252, 248, 0.4);
}
.wash-sand { background: linear-gradient(160deg, #f3e6cf 0%, #e4c99a 45%, #c7b08a 100%); }
.wash-dusk { background: linear-gradient(165deg, #efe6d4 0%, #d5c4a1 40%, #8ea0b5 140%); }
.wash-clay { background: linear-gradient(160deg, #f6efe4, #ddc2a4 70%, #c47d55); }
.wash-desert { background: linear-gradient(165deg, #f7f1e4, #e6d3a4 50%, #c4a36a); }
.wash-olive { background: linear-gradient(160deg, #f3eee4, #d9d2bc 45%, #8aa089); }
.wash-lamp { background: linear-gradient(160deg, #fbf6ea, #f0ddb0 50%, #d2ae58); }
.wash-navy { background: linear-gradient(165deg, #f7f4ee, #d5dbe6 40%, #8b97b0); }
.wash-sea { background: linear-gradient(165deg, #f4efe4, #d5ddd4 40%, #7f92a3); }

.player {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem 0.9rem;
  align-items: center;
  padding: 0.95rem 1rem;
  background: var(--navy);
  color: var(--parchment);
}
.player-play {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  border: 0;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.95rem;
  cursor: pointer;
}
.player-play:disabled { cursor: default; opacity: 0.85; }
.player-kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.player-title { margin: 0.1rem 0 0; font-family: var(--serif); font-size: 1.2rem; color: white; line-height: 1.15; }
.player-status { margin: 0.15rem 0 0; font-size: 0.82rem; color: rgba(244, 239, 230, 0.75); }
.player-time { font-variant-numeric: tabular-nums; font-size: 0.82rem; color: rgba(244, 239, 230, 0.8); }
.player-wave { display: flex; align-items: center; gap: 2px; height: 28px; grid-column: 1 / -1; }
.player-wave i {
  display: block;
  width: 2px;
  height: 30%;
  background: rgba(201, 162, 39, 0.85);
  transform-origin: center;
}
.player.is-ready .player-wave i { animation: wave 1.2s ease-in-out infinite; }
.player.is-playing .player-wave i { animation-play-state: running; }
.player:not(.is-playing) .player-wave i { animation-play-state: paused; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}
.player-bar {
  grid-column: 1 / -1;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  border: 0;
  padding: 0;
  width: 100%;
}
.player-bar span { display: block; height: 100%; width: 0; background: var(--gold); }
.player audio { position: absolute; width: 0; height: 0; overflow: hidden; }

.explore-grid, .card-grid, .project-grid, .resource-grid, .video-grid {
  display: grid;
  gap: 0.9rem;
}
.explore-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-grid { grid-template-columns: 1.3fr 1fr 1fr; }
.video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.explore-card, .entry, .panel, .info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  box-shadow: none;
}
.explore-card {
  min-height: 8.5rem;
  padding: 1.05rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.explore-card:hover { border-color: var(--line-strong); color: inherit; }
.entry:hover { border-color: var(--line-strong); color: inherit; }
.explore-card strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 560; color: var(--navy); }
.explore-card span { color: var(--muted); font-size: 0.86rem; }
.icon-line { width: 1.6rem; height: 1.6rem; color: var(--muted); }

.index-list { display: flex; flex-direction: column; gap: 0; }
.index-entry {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.index-entry:first-child { border-top: 1px solid var(--line); }
.index-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.index-title { margin: 0 0 0.35rem; font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 600; }
.index-title a { text-decoration: none; color: var(--navy); }
.index-title a:hover { color: var(--gold-2); }
.index-excerpt { margin: 0 0 0.35rem; color: var(--muted); font-size: 0.98rem; max-width: 40rem; }
.index-meta { margin: 0; font-size: 0.86rem; color: var(--faint); }

.entry { display: flex; flex-direction: column; min-height: 100%; }
.entry .scene {
  min-height: 148px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.95rem 1rem;
}
.entry-body { padding: 1rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.entry h3 { font-size: 1.55rem; }
.entry h3 a { text-decoration: none; color: var(--navy); }
.entry .excerpt { color: var(--muted); font-size: 0.98rem; }
.entry .meta { margin-top: auto; padding-top: 0.6rem; color: var(--faint); font-size: 0.85rem; }

.series-band, .keeper, .subscribe-band {
  background: rgba(255, 252, 248, 0.9);
  backdrop-filter: blur(8px);
  border-block: 1px solid var(--line);
}
.series-grid, .keeper-grid, .subscribe-grid, .about-grid, .piece-layout, .sa-layout {
  display: grid;
  gap: 2rem;
}
.series-grid { grid-template-columns: 1.2fr 0.8fr; align-items: center; }
.series-list { list-style: none; margin: 0; padding: 0; }
.series-list li { border-top: 1px solid var(--line); }
.series-list a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; text-decoration: none; color: var(--navy); }
.series-list a:hover { color: var(--gold-2); }

.sa-home-card { padding: 1.3rem 1.3rem 1.2rem; background: var(--navy); color: var(--parchment); }
.sa-home-card h3, .sa-home-card p { color: var(--parchment); }
.sa-home-card h3 { font-size: 2rem; }
.chelek-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; margin: 1rem 0; }
.chelek-mini a {
  display: block;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(244, 239, 230, 0.2);
  text-decoration: none;
  color: var(--parchment);
  font-size: 0.92rem;
}
.chelek-mini a:hover { border-color: var(--gold); color: white; }
.plain-card { padding: 1.2rem; background: rgba(255, 252, 248, 0.88); backdrop-filter: blur(6px); border: 1px solid var(--line); }

.values { background: var(--navy); color: var(--parchment); }
.values h2, .values p { color: var(--parchment); }
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.value-grid h3 { color: white; font-size: 1.45rem; }
.value-grid p { color: rgba(244, 239, 230, 0.78); margin: 0; }

.keeper-grid { grid-template-columns: 180px 1fr; align-items: center; }
.keeper img, .byline img, .about-photo img { display: block; object-fit: cover; }
.keeper img {
  width: 180px;
  height: 220px;
  object-position: 50% 18%;
  border: 1px solid var(--line);
}
.about-grid { grid-template-columns: minmax(0, 1fr) minmax(230px, 320px); align-items: start; }
.about-photo {
  margin: 0;
  background: white;
  padding: 0.6rem 0.6rem 0.7rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.about-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  max-height: none;
  object-fit: cover;
  object-position: 50% 18%;
}
.about-photo figcaption { margin-top: 0.55rem; font-size: 0.82rem; color: var(--muted); }
.byline { display: flex; align-items: center; gap: 0.75rem; }
.byline img {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  object-position: 50% 16%;
  border: 1px solid var(--line);
}

.subscribe-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
.form { display: grid; gap: 0.7rem; }
.form label { display: grid; gap: 0.25rem; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.form input, .form select, .search-input, .tool-input {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--ink);
  font: inherit;
  padding: 0.45rem 0.7rem;
}
.form-note, .status {
  margin: 0;
  padding: 0.75rem 0.85rem;
  background: var(--parchment);
  border-left: 2px solid var(--gold);
  color: var(--ink);
  font-size: 0.95rem;
}

.site-footer { background: var(--navy); color: rgba(244, 239, 230, 0.82); padding: 2.6rem 0 1.4rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1.5rem; }
.site-footer a { color: var(--parchment); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer h2 { color: white; font-size: 1.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.footer-links, .footer-meta { display: flex; flex-wrap: wrap; gap: 0.45rem 0.9rem; list-style: none; margin: 0; padding: 0; }
.legal { margin-top: 1.6rem; padding-top: 0.9rem; border-top: 1px solid rgba(244, 239, 230, 0.15); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.85rem; }

.page-hero { padding: 2.4rem 0 0.4rem; }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }

.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0 0.8rem; }
.chip, .seg {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  text-decoration: none;
}
.chip[aria-pressed="true"], .seg[aria-current="true"], .chip.is-on { background: var(--navy); color: var(--parchment); border-color: var(--navy); }
.page-hero--library { padding-bottom: 1.25rem; }
.library-editorial { font-size: 1.02rem; max-width: 38rem; }
.library-search-top { max-width: 28rem; margin-top: 1.1rem; }
.library-spotlight { margin: 0 0 2rem; padding: 1.5rem 1.35rem; background: var(--paper); border: 1px solid var(--line); }
.library-spotlight-title { margin: 0.15rem 0 0.5rem; font-size: clamp(1.65rem, 3vw, 2.2rem); }
.library-spotlight-title a { text-decoration: none; color: var(--navy); }
.library-spotlight-lede { margin: 0 0 0.9rem; color: var(--muted); max-width: 40rem; }
.library-section-title { font-size: 1.45rem; margin: 0 0 0.65rem; }
.filters--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
  scrollbar-width: thin;
}
.filters--scroll .chip { flex: 0 0 auto; }
.library-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; align-items: start; }
.side-card { padding: 0.75rem 0; background: transparent; border: 0; position: sticky; top: calc(var(--header) + 0.8rem); }
.side-card--sefer h2 { font-size: 1.1rem; letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--sans); color: var(--muted); font-weight: 600; }
.side-card h2 { font-size: 1.3rem; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list button, .side-list a {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  font: inherit;
  color: var(--navy);
  padding: 0.45rem 0;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
}
.count { color: var(--faint); }
.results-meta { color: var(--muted); margin: 0.2rem 0 0.8rem; }
.empty {
  padding: 1.5rem;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 252, 248, 0.5);
}

.calendar-list { display: grid; gap: 0.7rem; margin-bottom: 1rem; }
.calendar-item { padding: 0.9rem 1rem; background: var(--paper); border: 1px solid var(--line); }
.calendar-item h3 { margin-bottom: 0.15rem; }

.piece-layout { grid-template-columns: minmax(0, 1fr); align-items: start; }
.piece-layout--read { max-width: var(--read-width); margin-inline: auto; }
.piece-read { width: 100%; }
.toc { display: none; }
.piece-kicker, .piece-parsha { margin-top: 1.4rem; }
.piece-title { font-size: clamp(2.2rem, 4.5vw, 3.35rem); margin-bottom: 0.35rem; }
.piece-he { font-size: clamp(1.55rem, 3vw, 2.05rem); margin: 0.2rem 0 0.65rem; }
.byline--compact { margin: 0.65rem 0 0; }
.byline-text { margin: 0; font-size: 0.95rem; }
.piece-layout--read .tools { margin-top: 1.25rem; margin-bottom: 0.25rem; }
.related-heading { margin-top: 2.6rem; }
.pdf-study-guide { margin: 1.5rem 0 2rem; }
.pdf-study-guide .pdf-frame {
  display: block;
  width: 100%;
  min-height: 70vh;
  border: 1px solid rgba(26, 39, 68, 0.12);
  border-radius: 8px;
  background: #fff;
}
.article-body,
.piece-body {
  max-width: var(--read-width);
  margin-inline: auto;
  font-family: var(--read);
  font-size: clamp(1.08rem, 1rem + 0.2vw, 1.22rem);
  line-height: 1.78;
  text-align: left;
  margin-top: 3.2rem;
}
.article-body p,
.piece-body p { margin-bottom: 1.35em; }
.article-body h2,
.piece-body h2 { margin-top: 2.6em; margin-bottom: 0.8em; font-size: 1.65rem; }
.article-body h3,
.piece-body h3 { margin-top: 2em; margin-bottom: 0.65em; font-size: 1.35rem; }
.piece-body .pasuk {
  margin: 1.3rem 0;
  padding: 0.2rem 1rem 0.2rem 0;
  border-right: 2px solid var(--gold);
}
.piece-body .pasuk p { margin: 0; font-size: 1.45rem; }
.piece-body cite { display: block; margin-top: 0.25rem; font-style: normal; font-family: var(--sans); font-size: 0.86rem; letter-spacing: 0.04em; color: var(--gold-2); text-align: right; }
.translit { font-style: italic; color: var(--muted); }
.sources {
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-strong);
}
.sources li { margin: 0.35rem 0; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.pager a { text-decoration: none; max-width: 46%; }
.pager small { display: block; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-size: 0.72rem; }

.crumbs { font-size: 0.85rem; color: var(--muted); margin: 0 0 0.6rem; }
.crumbs a { color: var(--muted); text-decoration: none; }

.sa-hero p { max-width: 42rem; }
.stat-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1rem 0 0; }
.stat { min-width: 8rem; padding: 0.7rem 0.8rem; background: var(--paper); border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--navy); font-weight: 560; }
.chelek-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; }
.chelek-card { padding: 1rem; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: inherit; display: block; min-height: 11rem; }
.chelek-card:hover { border-color: var(--gold); color: inherit; }
.sa-layout { grid-template-columns: 210px minmax(0, 1fr); }
.siman-rail { display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 0.4rem; }
.sa-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0.8rem 0 1rem;
}
.sa-col { background: var(--paper); border: 1px solid var(--line); padding: 0.9rem 1rem; }
.sa-col h3 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-2); font-family: var(--sans); }
.sa-he p { font-size: 1.35rem; }
.rema { margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px solid var(--line); }
.commentary-bar { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 0.8rem; }
.commentary-panel { padding: 0.9rem 1rem; background: #f7f1e6; border: 1px solid var(--line); margin-bottom: 0.8rem; }
.forthcoming { color: var(--muted); }

.tools { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1rem 0; }
.search-hero { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; }
.result { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.result h2 { font-size: 1.8rem; margin: 0; }
.result h2 a { text-decoration: none; }
mark { background: rgba(201, 162, 39, 0.35); color: inherit; padding: 0 0.1em; }

.video-section { margin-top: 2.4rem; }
.video-section:first-of-type { margin-top: 0; }
.video-section-head { margin-bottom: 1rem; }
.video-section-head h2 { font-family: var(--serif); font-size: 1.65rem; font-weight: 600; margin: 0; }
.video-card { background: var(--paper); border: 1px solid var(--line); }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--navy); }
.video-frame iframe, .video-frame .video-hold { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-hold { display: grid; place-items: center; color: var(--parchment); text-align: center; padding: 1rem; }
.video-card .pad { padding: 0.9rem 1rem 1rem; }

.resource-list { display: grid; gap: 0.55rem; }
.resource-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.resource-row:hover { border-color: var(--gold); color: inherit; }
.tag {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-2);
}

.callout {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
}

body[data-page="shulchan"] {
  font-size: 1rem;
}
body[data-page="shulchan"] .page-hero h1,
body[data-page="shulchan"] .sa-hero h1 {
  font-family: var(--sans);
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 600;
}
body[data-page="shulchan"] .lede {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}
body[data-page="shulchan"] .stat,
body[data-page="shulchan"] .chelek-card {
  border-radius: 4px;
  font-family: var(--sans);
}
body[data-page="shulchan"] .kicker { color: var(--navy); }

@media (max-width: 1040px) {
  .explore-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.4rem 1.2rem 0.9rem;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 0.55rem 0; width: 100%; }
  .nav-toggle { display: inline-flex; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
  .project-grid, .chelek-grid, .value-grid { grid-template-columns: 1fr 1fr; }
  .library-layout, .piece-layout, .sa-layout { grid-template-columns: 1fr; }
  .side-card, .toc { position: static; }
}

@media (max-width: 800px) {
  body { font-size: 1.125rem; }
  .wrap { width: min(var(--wrap), calc(100% - 2.75rem)); }
  .hero { padding: 2.4rem 0 2rem; }
  .section { padding: 3rem 0; }
  .article-body,
  .piece-body {
    font-size: 1.125rem;
    line-height: 1.78;
    margin-top: 2.5rem;
  }
  .week-grid, .series-grid, .keeper-grid, .subscribe-grid, .about-grid, .footer-grid, .card-grid, .video-grid {
    grid-template-columns: 1fr;
  }
  .explore-grid { grid-template-columns: 1fr 1fr; }
  .btn, .chip, .icon-btn, .nav-toggle { min-height: 2.75rem; }
  .project-grid, .chelek-grid, .value-grid { grid-template-columns: 1fr; }
  .sa-pair { grid-template-columns: 1fr; }
  .sa-he { order: -1; }
  .keeper img { width: min(100%, 240px); height: 300px; }
  .about-photo { order: -1; max-width: 18rem; }
  .search-hero, .resource-row { grid-template-columns: 1fr; }
  .header-tools .btn { padding-inline: 0.7rem; }
  .pager { flex-direction: column; }
  .pager a { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .player-wave i { animation: none !important; }
}

@media print {
  .site-header, .site-footer, .tools, .player, .subscribe-band, .toc, .hero-actions, .actions, .nav-toggle { display: none !important; }
  body { background: white; color: black; }
  a { color: black; text-decoration: none; }
  .piece-body { font-size: 12pt; }
}
