/* Ohel Yaacob Congregation.
   Palette sampled from the sanctuary: white plaster, limestone from the ark, the deep blue shadow of the seats, mahogany.
   Rules: photo-led, hairlines instead of boxes, serif headings, no eyebrows, sentence case, lining figures. */
:root {
  --ivory: #fafaf7;
  --stone: #e9e3d8;
  --stone-2: #d6cfc2;
  --paper: #ffffff;
  --ink: #101c33;
  --ink-2: #39435a;
  --muted: #626c80;
  --accent: #214b9d;
  --accent-dk: #17356f;
  --accent-lt: #9fb3d9;
  --wood: #5a3220;
  --line: rgba(16, 28, 51, .16);
  --night: #101c33;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hebrew: "Frank Ruhl Libre", "Times New Roman", serif;

  --radius: 0px;
  --shadow: 0 12px 32px -18px rgba(16,28,51,.3);
  --header-h: 72px;
  --gutter: clamp(20px, 4.4vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; font-variant-numeric: lining-nums !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); font-synthesis: none; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink-2); background: var(--ivory); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent-dk); }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 400; line-height: 1.04; margin: 0 0 .5em; letter-spacing: -.012em; }
h2 { font-size: clamp(2.6rem, 5.4vw, 4.8rem); }
h3 { font-size: 1.9rem; }
p { margin: 0 0 1em; }
figure { margin: 0; }
[lang="he"] { font-family: var(--hebrew); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { width: calc(100% - var(--gutter) * 2); max-width: 1500px; margin-inline: auto; }
.section { padding: clamp(72px, 9vw, 136px) 0; }
.lead { font-family: var(--serif); font-size: clamp(1.7rem, 2.6vw, 2.3rem); color: var(--ink); line-height: 1.18; letter-spacing: -.005em; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-sub { font-size: 1.05rem; color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.split > .section-head { margin-bottom: 0; }

/* ---------- Buttons and links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 500 .95rem/1 var(--sans); padding: 1rem 1.6rem; border-radius: 0; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s; white-space: nowrap; }
.btn-small { padding: .68rem 1.1rem; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-accent { background: var(--ink); color: #fff; }
.btn-accent:hover { background: var(--accent); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--stone); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.link-arrow { font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); display: flex; align-items: center; color: var(--ink); background: var(--ivory); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header .container { max-width: none; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 36px; height: 36px; }
.brand-text { display: flex; align-items: baseline; gap: 12px; }
.brand-en { font: 400 1.55rem/1 var(--serif); }
.brand-he { font-size: 1rem; color: var(--wood); }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav a:not(.btn) { color: inherit; text-decoration: none; font-size: .95rem; position: relative; padding: 6px 0; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: currentColor; transition: right .25s; }
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; color: inherit; position: relative; margin-right: -10px; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .3s, top .3s; }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 26px; }
.nav-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero: the name and this Shabbat beside the ark ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--header-h); min-height: calc(100svh - var(--header-h)); }
.hero-text { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: clamp(28px, 4vw, 56px) clamp(24px, 3.4vw, 56px) clamp(24px, 3vw, 44px) var(--gutter); }
.hero-he { font-size: clamp(1.8rem, 2.9vw, 2.9rem); font-weight: 300; color: var(--wood); margin: 0 0 .3rem; line-height: 1.2; text-align: left; }
.hero h1 { font-size: clamp(4.6rem, 9.6vw, 10rem); line-height: .86; letter-spacing: -.025em; margin: 0; max-width: 5em; }
.hero-lede { font-size: 1.1rem; max-width: 24em; margin: clamp(18px, 2vw, 28px) 0 0; color: var(--ink-2); }
.hero-shabbat .link-arrow { display: inline-block; margin-top: 18px; }
.hs-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.hs-head { border-top: 1px solid var(--ink); }
.hs-row span { font-size: .95rem; color: var(--muted); }
.hs-row strong { font: 400 clamp(1.45rem, 1.9vw, 1.8rem)/1.1 var(--serif); color: var(--ink); text-align: right; }
.hero-photo { position: relative; overflow: hidden; background: var(--stone); min-height: 420px; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 60%; }

/* ---------- Opening statement ---------- */
.opener { padding: clamp(80px, 11vw, 176px) 0 clamp(56px, 7vw, 104px); }
.opener-text { font: 400 clamp(2.3rem, 5vw, 4.9rem)/1.06 var(--serif); letter-spacing: -.015em; color: var(--ink); max-width: 19em; margin: 0 0 clamp(24px, 3vw, 40px); }

/* ---------- Two photographs, offset ---------- */
.diptych-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(16px, 3vw, 48px); align-items: end; }
.diptych img { width: 100%; height: auto; }
.dp-tall { padding-top: clamp(40px, 12vw, 200px); }
.diptych figcaption, .photo-caption { font-size: .9rem; color: var(--muted); margin-top: 10px; }

/* ---------- Schedule ---------- */
.schedule-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 32px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 64px); }
.schedule-head h2 { margin: 0; }
.schedule-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(36px, 5vw, 80px); align-items: start; }
.day-card h3 { font-size: clamp(1.8rem, 2.5vw, 2.3rem); margin: 0; padding-bottom: .7rem; border-bottom: 1px solid var(--ink); }
.sat-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(32px, 4vw, 64px); }
.sched-group h4 { font: 500 .95rem/1.2 var(--sans); color: var(--wood); margin: 1.4rem 0 .3rem; }
.sched-list { list-style: none; margin: 0; padding: 0; }
.sched-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: .72rem 0; border-bottom: 1px solid var(--line); }
.sched-row .what { display: flex; flex-direction: column; color: var(--ink); line-height: 1.3; }
.sched-row .with { font-size: .88rem; color: var(--muted); margin-top: 2px; }
.sched-row .time { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); white-space: nowrap; line-height: 1.05; }
.sched-row.hl .what { font-weight: 600; }
.weekday { margin-top: clamp(36px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(36px, 5vw, 80px); }
.weekday h3 { font-size: clamp(1.8rem, 2.5vw, 2.3rem); margin: 0; padding-top: .55rem; }
.weekday .sched-list { border-top: 1px solid var(--ink); }
.schedule-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px 32px; margin-top: clamp(32px, 4vw, 56px); }
.schedule-notes { list-style: none; padding: 0; margin: 0; font-family: var(--serif); font-size: 1.4rem; line-height: 1.3; color: var(--ink); }
.schedule-links { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-left: auto; }
.schedule-stale { display: block; margin-top: .5rem; font-size: .95rem; color: var(--wood); }

/* ---------- Classes: limestone ground, one wide table ---------- */
.classes { background: var(--stone); }
.classes h2 { margin-bottom: clamp(32px, 4vw, 56px); }
.class-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.class-list li { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 2fr) minmax(0, 3fr); gap: 4px 24px; align-items: baseline; padding: clamp(14px, 1.5vw, 20px) 0; border-bottom: 1px solid rgba(16,28,51,.22); }
.c-name { font: 400 clamp(1.6rem, 2.4vw, 2.2rem)/1.12 var(--serif); color: var(--ink); }
.c-with { color: var(--ink-2); }
.c-when { color: var(--ink); text-align: right; }

/* ---------- Insight and rabbis, side by side ---------- */
.people-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 7vw, 120px); }
.people h2 { font-size: clamp(2.2rem, 3.6vw, 3.4rem); margin-bottom: .7em; }
.insight-title { font-size: clamp(1.6rem, 2.1vw, 2rem); line-height: 1.12; margin-bottom: .5em; }
.insight-body { max-width: 36em; }
.insight-body p:last-child { margin-bottom: 0; }
.insight .link-arrow { display: inline-block; margin-top: 1.2rem; }
.rabbi-list { border-top: 1px solid var(--ink); margin-bottom: 1.4rem; }
.rabbi-row { display: flex; align-items: center; gap: 18px; padding: .8rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.rabbi-row:hover .rabbi-row-name { color: var(--accent); }
.rabbi-row img { width: 56px; height: 70px; object-fit: cover; flex-shrink: 0; }
.rabbi-row-name { font: 400 clamp(1.6rem, 2.2vw, 2.1rem)/1.12 var(--serif); color: var(--ink); transition: color .2s; }
.rabbi-row-title { margin-left: auto; color: var(--muted); font-size: .95rem; text-align: right; }

/* ---------- Verse, then the building ---------- */
.verse { text-align: center; padding: clamp(64px, 9vw, 136px) 0 clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); }
.sb-he { font-size: clamp(2.4rem, 6vw, 5.4rem); font-weight: 300; line-height: 1.22; margin: 0 0 .5rem; color: var(--ink); }
.sb-en { font-family: var(--serif); font-size: clamp(1.35rem, 2.1vw, 1.8rem); color: var(--wood); margin: 0; }
.sanctuary-band { position: relative; height: clamp(320px, 74vh, 860px); overflow: hidden; background: var(--stone); }
.sb-media { position: absolute; inset: -6% 0; background: var(--band-img, url("/images/exterior.jpg")) center 72% / cover no-repeat; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }

/* ---------- Visit ---------- */
.visit { padding: clamp(40px, 5vw, 72px) 0 clamp(64px, 8vw, 112px); }
.visit-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 3fr)); gap: 24px clamp(20px, 3vw, 48px); align-items: start; }
.visit h2 { font-size: clamp(2.2rem, 3.6vw, 3.4rem); margin: 0; }
.visit-item { display: block; text-decoration: none; color: inherit; border-top: 1px solid var(--ink); padding-top: 10px; min-width: 0; }
.visit-item span { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 4px; }
.visit-item strong { font: 400 clamp(1.35rem, 1.75vw, 1.65rem)/1.18 var(--serif); color: var(--ink); overflow-wrap: anywhere; transition: color .2s; }
.visit-item:hover strong { color: var(--accent); }

/* ---------- Donate ---------- */
.donate { background: var(--night); color: #c6cede; padding: clamp(72px, 9vw, 136px) 0; }
.donate-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.donate h2 { color: #fff; margin: 0; }
.ways { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.4); }
.ways li { border-bottom: 1px solid rgba(255,255,255,.18); }
.ways a, .ways li > div { display: block; padding: clamp(14px, 1.6vw, 22px) 0; text-decoration: none; color: inherit; }
.ways strong { display: block; font: 400 clamp(1.7rem, 2.5vw, 2.3rem)/1.1 var(--serif); color: #fff; margin-bottom: 4px; }
.ways a strong::after { content: " →"; font-family: var(--sans); font-size: .7em; }
.ways a:hover strong { color: var(--accent-lt); }
.ways span { display: block; max-width: 38em; font-size: 1rem; }

/* ---------- Contact page ---------- */
.detail-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.detail-rows li { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 4px 24px; padding: .95rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.detail-rows span:first-child { color: var(--muted); font-size: .95rem; }
.detail-rows .val { font: 400 clamp(1.45rem, 2.1vw, 1.85rem)/1.2 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
.detail-rows a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.detail-rows a:hover { color: var(--accent); }
.map-frame { display: block; width: 100%; height: clamp(320px, 46vh, 520px); border: 0; filter: saturate(.7); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #a9b4c9; padding: clamp(48px, 6vw, 80px) 0 28px; font-size: .95rem; }
.donate + .site-footer { padding-top: 0; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-block: 40px; border-top: 1px solid rgba(255,255,255,.18); border-bottom: 1px solid rgba(255,255,255,.18); }
.footer-brand { display: flex; align-items: flex-start; gap: 16px; }
.footer-brand img { width: 44px; height: 44px; flex-shrink: 0; }
.footer-brand p { margin: 0; }
.footer-name { font: 400 1.75rem/1.05 var(--serif); color: #fff; }
.footer-he { color: #c6cede; font-size: 1.1rem; margin-top: 4px !important; }
.footer-place { font-size: .92rem; margin-top: 6px !important; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-h { font: 400 1.35rem/1.2 var(--serif); color: #fff; margin: 0 0 4px; }
.site-footer a { color: #d6deee; text-decoration: none; transition: color .2s; overflow-wrap: anywhere; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 20px; font-size: .85rem; }
.footer-base p { margin: 0; }
.site-footer .muted { color: #8f9bb3; }
.site-footer .muted a { color: #a9b4c9; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Sponsorships on the schedule ---------- */
.section-head-row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 32px; flex-wrap: wrap; }
.section-head-row h2 { margin: 0; }
.sponsor-note { margin-top: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); padding: 20px 0; }
.sponsor-icon { display: none; }
.sponsor-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sponsor-line { font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; color: var(--ink); margin: 0; }
.sponsor-ded { margin: 2px 0 0; color: var(--ink-2); }

/* ---------- Events ---------- */
.event-cards { --n: 4; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 32px; }
.event-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; border-top: 1px solid var(--ink); }
.event-card-media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.event-card:not(.has-image) .event-card-media { aspect-ratio: auto; }
.event-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.event-card:hover .event-card-media img { transform: scale(1.03); }
.date-tile { display: flex; align-items: baseline; gap: 8px; padding: 14px 0 0; color: var(--ink); }
.dt-m { font: 400 1.4rem/1 var(--serif); color: var(--wood); }
.dt-d { font: 400 2.8rem/1 var(--serif); }
.dt-w { font-size: .9rem; color: var(--muted); }
.date-chip { position: absolute; left: 0; top: 0; background: var(--ivory); color: var(--ink); min-width: 56px; padding: 8px 10px; text-align: center; font: 400 1.7rem/1 var(--serif); }
.date-chip span { display: block; font: 400 1rem/1.2 var(--serif); color: var(--wood); }
.event-card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 0 0; flex: 1; }
.event-card-title { font: 400 1.7rem/1.1 var(--serif); color: var(--ink); margin-bottom: 4px; }
.event-card-meta { font-size: .9rem; color: var(--muted); line-height: 1.45; }
.event-cards-single { grid-template-columns: 1fr; }

.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--stone); }

/* ---------- Homepage photo strip ---------- */
.gallery-home { padding-top: 0; }
.gallery-home .section-head { margin-bottom: 32px; }
.photo-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.photo-strip::-webkit-scrollbar { display: none; }
.strip-controls { display: flex; align-items: center; gap: 8px; }
.strip-controls .link-arrow { margin-left: 16px; }
.strip-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.strip-btn:disabled { opacity: .35; cursor: default; }
.strip-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.strip-controls.no-scroll .strip-btn { display: none; }
@media (hover: none) { .strip-btn { display: none; } .strip-controls .link-arrow { margin-left: 0; } }
.photo-strip a { flex: 0 0 auto; height: clamp(220px, 28vw, 380px); aspect-ratio: var(--r); scroll-snap-align: start; overflow: hidden; background: var(--stone); }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.photo-strip a:hover img { transform: scale(1.03); }

/* ---------- Sub-pages: title beside a photograph ---------- */
.sub-page main { min-height: 60vh; }
.page-hero, .pg-hero { margin-top: var(--header-h); padding: clamp(48px, 7vw, 104px) var(--gutter) clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.page-hero h1, .pg-hero h1 { font-size: clamp(3.4rem, 8vw, 7.4rem); line-height: .92; letter-spacing: -.022em; margin-bottom: .22em; }
.page-hero-lede { font-size: clamp(1.05rem, 1.3vw, 1.2rem); color: var(--ink-2); max-width: 30em; margin: 0; }
.page-hero .container, .pg-hero .container { width: 100%; max-width: none; }
.page-hero.with-photo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); padding: 0; min-height: clamp(380px, 56vh, 620px); }
.ph-text { display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(36px, 5vw, 72px) clamp(24px, 3.4vw, 56px) clamp(28px, 3.4vw, 48px) var(--gutter); }
.ph-photo { position: relative; overflow: hidden; background: var(--stone); min-height: 280px; }
.ph-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-body { padding: clamp(40px, 6vw, 72px) 0 clamp(72px, 10vw, 128px); }
.photo-full img { width: 100%; height: clamp(320px, 72vh, 860px); object-fit: cover; object-position: 60% 60%; }
.side-photo img { width: 100%; height: auto; }

/* Filter chips + segmented control */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 .9rem/1 var(--sans); padding: .62rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; transition: all .2s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .count { opacity: .55; margin-left: 4px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.segmented button { font: 500 .9rem/1 var(--sans); padding: .6rem 1.1rem; border: 0; border-radius: 999px; background: none; color: var(--ink-2); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 500; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--stone-2); position: relative; cursor: pointer; transition: background .2s; margin: 0; flex-shrink: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(16px); }
.empty-state { padding: clamp(40px, 6vw, 72px) 0; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.empty-state p { margin: 0; max-width: 32em; }
.empty-state .empty-title { font: 400 2rem/1.15 var(--serif); color: var(--ink); margin-bottom: .4rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .sb-media { transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .event-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-cards.event-cards-single { grid-template-columns: 1fr; }
  .schedule-grid, .weekday { grid-template-columns: 1fr; gap: 32px; }
  .weekday { gap: 0; }
  .weekday h3 { padding-top: 0; padding-bottom: .7rem; }
  .visit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .visit h2 { grid-column: 1 / -1; }
  .people-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .nav { position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch; gap: 0; background: var(--ivory); color: var(--ink); padding: 8px var(--gutter) 28px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.3); transform: translateY(-8px); opacity: 0; pointer-events: none; visibility: hidden; transition: all .25s; }
  .nav a:not(.btn) { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav a[aria-current="page"] { color: var(--accent); }
  .nav .btn { margin-top: 18px; }
  .nav-open .nav { transform: none; opacity: 1; pointer-events: auto; visibility: visible; }
  .nav-toggle { display: block; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo { order: -1; height: 58svh; min-height: 300px; }
  .hero-photo img { object-position: 64% 60%; }
  .hero-text { padding: 28px var(--gutter) 32px; }
  .hero h1 { font-size: clamp(4.6rem, 19vw, 9rem); max-width: none; }
  .page-hero.with-photo { grid-template-columns: 1fr; min-height: 0; }
  .ph-photo { order: -1; height: 40svh; }
  .ph-text { padding: 28px var(--gutter); }
  .split, .donate-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .class-list li { grid-template-columns: 1fr auto; }
  .c-name { grid-column: 1 / -1; }
  .c-when { text-align: right; grid-column: 2; grid-row: 2; }
  .c-with { grid-column: 1; grid-row: 2; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-he { display: none; }
  .hs-date { display: none; }
  .diptych-grid { grid-template-columns: 1fr; }
  .dp-tall { padding-top: 0; width: 72%; margin-left: auto; }
  .sat-groups { grid-template-columns: 1fr; }
  .schedule-links { margin-left: 0; }
  .class-list li { grid-template-columns: 1fr; }
  .c-with, .c-when { grid-column: 1; grid-row: auto; text-align: left; }
  .c-with:empty { display: none; }
  .visit-grid { grid-template-columns: 1fr; }
  .rabbi-row { flex-wrap: wrap; gap: 2px 16px; }
  .rabbi-row-title { margin-left: 0; flex-basis: 100%; text-align: left; }
  .detail-rows li { grid-template-columns: 1fr; }
  .event-cards, .event-cards-single { grid-template-columns: 1fr; gap: 20px; }
  .sponsor-note { grid-template-columns: 1fr; }
  .footer-top { gap: 28px 20px; }
  .footer-top > .footer-col:last-child { grid-column: 1 / -1; }
}
