:root {
  --bg: #0e0f12;
  --bg-raised: #17191e;
  --card: #1c1f26;
  --line: #343842;
  --text: #f6f3ec;
  --muted: #c9c2b6;
  --gold: #e2b657;
  --gold-deep: #8d6a22;
  --navy: #f6f3ec;
  --kosher: #0f7a45;
  --down: #a61d24;
  --serif: "Fraunces", "Frank Ruhl Libre", Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --hebrew: "Frank Ruhl Libre", "Times New Roman", serif;
  --header: 4.5rem;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; }

a { color: var(--gold); }
a:hover { color: #f3d48a; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}

h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
p { margin: 0; }

.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  background: var(--gold);
  color: #14120c;
  padding: 0.6rem 0.9rem;
  z-index: 50;
}

.skip:focus { transform: none; color: #14120c; }

.wrap {
  width: min(1080px, calc(100% - 1.5rem));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eruv-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.25rem 0.7rem;
  padding: 0.45rem 0.85rem;
  color: white;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 0.92rem;
}

a.eruv-strip:hover { color: white; }
.eruv-strip.is-kosher { background: var(--kosher); }
.eruv-strip.is-down { background: var(--down); }

.eruv-lead {
  letter-spacing: 0.04em;
  font-size: 1rem;
}

.eruv-hebrew {
  font-family: var(--hebrew);
  font-size: 1.15rem;
  unicode-bidi: isolate;
}

.eruv-meta,
.eruv-detail {
  font-weight: 500;
  font-size: 0.82rem;
}

.eruv-detail { flex-basis: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #0e0f12;
  border-bottom: 2px solid var(--gold);
}

.bar {
  display: flex;
  align-items: center;
  gap: 0.55rem 0.8rem;
  min-height: var(--header);
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: auto;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand:hover { color: var(--text); }

.mark, .brand-logo { color: var(--gold); flex: none; }
.brand-logo { width: 36px; height: 36px; object-fit: contain; display: block; }

.brand-he, .hero-he-name, .footer-he {
  font-family: var(--hebrew);
  letter-spacing: 0;
  text-transform: none;
}

.brand-he {
  display: block;
  color: var(--gold);
  font-size: 0.95rem;
  line-height: 1.15;
}

.brand-name {
  display: block;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.84rem;
  line-height: 1.15;
}

.brand-place {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 44px;
  min-height: 44px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 650;
  position: relative;
}

.header-phone span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.nav-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  min-height: 44px;
  padding: 0 0.95rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.header-login {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 0.65rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  background: transparent;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-login:hover,
.header-login:focus-visible {
  background: var(--gold);
  color: #1a1408;
}

.nav-toggle .when-open { display: none; }
.nav-toggle[aria-expanded="true"] .when-open { display: inline; }
.nav-toggle[aria-expanded="true"] .when-closed { display: none; }

#site-nav { display: none; }

#site-nav.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #12141a;
  border-bottom: 2px solid var(--gold);
  padding: 0.25rem 1.1rem 0.9rem;
  max-height: calc(100dvh - var(--header));
  overflow: auto;
}

#site-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 650;
  padding: 0.9rem 0.1rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.15rem;
}

#site-nav a[aria-current="page"] { color: var(--gold); }
.nav-phone { color: var(--gold) !important; }

.hero { padding: 1.4rem 0 0.4rem; }

.hero-copy {
  container-type: inline-size;
  max-width: none;
  text-align: center;
}

.hero-logo { display: flex; justify-content: center; margin-bottom: 0.35rem; }
.hero-logo .brand-logo { width: 76px; height: 76px; }
.hero-he-name { margin: 0.15rem 0 0; font-size: clamp(1.2rem, 3vw, 1.8rem); }
.sheet-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem 0.9rem; margin: 0.2rem 0 0; }
.home-sheet { text-align: center; }
.home-sheet-parsha { margin: 0.15rem 0 0; font-family: var(--hebrew); font-size: 1.7rem; line-height: 1.2; }
.footer-he { margin: 0; font-size: 1.15rem; }

.hero h1 {
  white-space: nowrap;
  font-size: clamp(1.05rem, 6.1cqi, 4.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-place,
.lede,
.panel-date,
.event-meta,
.source-note {
  color: var(--muted);
}

.hero-place {
  margin-top: 0.7rem;
  font-size: 1.15rem;
}

.hero-phone {
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: 1.55rem;
}

.hero-phone a { text-decoration: none; }

.hero-photo {
  margin: 1.15rem 0 0;
  border: 3px solid var(--gold);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

.hero-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: center 40%;
}

.panel,
.section,
.page { margin-top: 1.6rem; }

.page { padding-bottom: 2.6rem; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 0.9rem 1.1rem;
}

.panel-head,
.section-head {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  text-align: center;
}

.section-head h2::after,
.time-block > h2::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin: 0.45rem auto 0;
  background: var(--gold);
}

.hebrew-date,
.he-inline,
.time-he,
.hero-hebrew,
.fact-hebrew {
  font-family: var(--hebrew);
  unicode-bidi: isolate;
}

.hebrew-date,
.hero-hebrew {
  font-size: 1.7rem;
  line-height: 1.2;
  margin-top: 0.25rem;
}

.hebrew-date[hidden] { display: none; }

.text-link { font-weight: 650; white-space: nowrap; }

.time-block { margin-top: 1.15rem; text-align: center; }
.time-block:first-child { margin-top: 0; }

.time-list {
  display: grid;
  gap: 0.45rem;
  width: min(40rem, 100%);
  margin: 0.7rem auto 0;
}

.time-group {
  margin: 0.7rem 0 0.1rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 650;
}

.time-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.45rem 0.7rem;
  align-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
}

.time-en {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-weight: 650;
  text-align: left;
}

.time-at {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--gold);
  text-align: center;
  white-space: nowrap;
}

.shabbos-card .time-at { white-space: normal; }

.time-he {
  text-align: right;
  color: var(--text);
}

.time-row.is-passed { opacity: 0.55; }

.time-row.is-next {
  border-color: var(--gold);
  background: #241d10;
}

.next-flag {
  display: inline-block;
  background: var(--gold);
  color: #1a1408;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
  font-family: var(--sans);
}

.shabbos-card {
  margin: 1rem auto 0;
  width: min(40rem, 100%);
  padding: 0.95rem;
  border-radius: 16px;
  background: #101820;
  border: 1px solid #314155;
  text-align: center;
}

.shabbos-parsha {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin: 0.15rem 0 0.2rem;
}

.he-inline { margin-inline-end: 0.35rem; }

.more-link { margin-top: 0.85rem; }

.source-note,
.loading,
.zman-message {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.8rem;
}

.event-grid,
.announce-list { display: grid; gap: 0.8rem; }
.event-grid { justify-content: center; }
.announce-list { width: min(40rem, 100%); margin-inline: auto; }

.event-card,
.announce,
.empty,
.notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem 1rem;
}

.event-card h3 a { color: var(--text); text-decoration: none; }
.event-card h3 a:hover { color: var(--gold); }
.event-card p + p,
.announce p + p,
.prose p + p { margin-top: 0.55rem; }

.event-date {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.js [data-hide-when-past]:not(.is-current) { display: none; }

.page-head { max-width: 40rem; margin-inline: auto; padding-top: 0.2rem; text-align: center; }
.day-heading,
.source-note,
.empty,
.lede { text-align: center; }
.prose { margin-inline: auto; }
.davening-panel .hebrew-date,
.davening-panel .panel-date { text-align: center; }
.page-head .lede,
.memorial { margin-top: 0.75rem; }

.past-notice {
  margin-top: 1rem;
  background: #2a2212;
  border: 1px solid var(--gold-deep);
  color: var(--text);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
}

.fact-row {
  margin: 1.1rem 0 0;
  display: grid;
  gap: 0.65rem;
}

.fact-row div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
}

.fact-row dt {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fact-row dd {
  margin: 0.15rem 0 0;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.prose { margin-top: 1.1rem; max-width: 42rem; }

.schedule-table {
  display: grid;
  gap: 0.5rem;
}

.schedule-head { display: none; }

.schedule-row {
  display: grid;
  gap: 0.15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}

.schedule-row span[data-label="Time"] {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.event-photo {
  margin: 1.2rem 0 0;
  border: 2px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.event-photo img { display: block; width: 100%; }

.day-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.day-switch button,
.day-switch input,
.day-switch a {
  font: inherit;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  padding: 0 0.9rem;
}

.day-switch a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 650;
}

.day-switch form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.day-switch button { cursor: pointer; font-weight: 650; }
.day-switch input { flex: 1 1 10rem; }

.day-heading { margin-bottom: 0.4rem; }

.legend {
  list-style: none;
  padding: 0;
  margin: 1.15rem 0;
  display: grid;
  gap: 0.55rem;
}

.legend li {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
}

.legend li.is-on { border-color: var(--gold); }

.swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  flex: none;
}

.swatch.is-kosher { background: var(--kosher); }
.swatch.is-down { background: var(--down); }

.phone-panel {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: #1a1408;
  background: var(--gold);
  border-radius: 16px;
  padding: 1.05rem 1.1rem;
  margin-top: 1rem;
}

.phone-panel:hover { color: #1a1408; }

.phone-panel span {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.phone-panel strong {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  font-weight: 560;
}

.address-line { margin-top: 0.75rem; color: var(--muted); }
.about { margin-top: 1rem; display: grid; gap: 0.7rem; max-width: 40rem; }

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.link-list a {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  text-decoration: none;
  font-weight: 650;
  color: var(--text);
}

.site-footer {
  margin-top: 2.5rem;
  background: #090a0d;
  color: var(--text);
  border-top: 2px solid var(--gold);
  padding: 1.5rem 0 2rem;
}

.footer-grid { display: grid; gap: 0.4rem; justify-items: center; text-align: center; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-size: 1.3rem;
}

.footer-brand .mark { color: var(--gold); }

.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.9rem;
  margin-top: 0.35rem;
}

.copyright { color: var(--muted); font-size: 0.9rem; }

#content:focus { outline: none; }
#content, h2, h3 { scroll-margin-top: calc(var(--header) + 2.4rem); }

@media (min-width: 720px) {
  .hero-photo img { aspect-ratio: 16 / 8; }
  .fact-row { grid-template-columns: repeat(3, 1fr); }
  .header-phone span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
  .event-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 360px)); }
  .schedule-head,
  .schedule-row {
    grid-template-columns: 8rem 1fr auto;
    align-items: center;
    gap: 0.8rem;
  }
  .schedule-head {
    display: grid;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0 0.85rem;
  }
}

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  #site-nav {
    display: flex;
    align-items: center;
    gap: 0.1rem;
  }
  #site-nav a {
    border: 0;
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
    border-radius: 999px;
  }
  #site-nav a[aria-current="page"] { background: #2a2418; }
  .nav-phone { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  body { background: white; color: black; }
  .site-header, .nav-toggle, .day-switch { display: none !important; }
  .eruv-strip { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
