:root {
  --ink: #0a2d4d;
  --ink-2: #183f66;
  --accent: #0f6abf;
  --gold: #c99a2e;
  --gold-soft: #fbf3df;
  --muted: #5b738b;
  --line: #e3ebf3;
  --bg: #f5f7fb;
  --card: #fff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(10, 45, 77, .08), 0 2px 8px rgba(10, 45, 77, .05);
}
* { font-variant-numeric: lining-nums tabular-nums; }
* { box-sizing: border-box; }
/* One font for everything, form controls included (they don't inherit by default). */
button, input, select, textarea, optgroup { font-family: inherit; font-size: inherit; font-variant-numeric: inherit; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Bona Nova', 'David Libre', 'Times New Roman', serif;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(15, 106, 191, .10), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(201, 154, 46, .08), transparent 35%),
    var(--bg);
  line-height: 1.5;
}
a { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.narrow { max-width: 720px; padding-top: 28px; padding-bottom: 40px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.time { font-variant-numeric: lining-nums tabular-nums; font-weight: 700; letter-spacing: .02em; }

.btn {
  display: inline-block; border: 0; border-radius: 999px; padding: 10px 20px; font: inherit; font-weight: 700;
  background: var(--ink); color: #fff; text-decoration: none; cursor: pointer;
}
.btn-light { background: #fff; color: var(--ink); }

/* hero */
.hero {
  background: linear-gradient(135deg, #0a2d4d 0%, #0f3f6c 55%, #12558f 100%);
  color: #fff;
  padding: 26px 0 0;
  box-shadow: 0 8px 30px rgba(10, 45, 77, .25);
}
.hero.slim { padding-bottom: 18px; }
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.logo { width: 64px; height: 64px; filter: invert(1); }
.logo-sm { width: 72px; }
.brand h1 { margin: 0; font-size: 34px; line-height: 1.1; }
.brand .sub { margin: 2px 0 0; opacity: .8; }
.today { text-align: left; }
.today-date { font-size: 17px; opacity: .92; }
.dayname { font-weight: 700; }
.today-parasha { font-size: 24px; color: #f3d58a; }
.holiday { color: #fff; font-size: 18px; }
.next-prayer {
  display: inline-block; margin-top: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
}
.nav { display: flex; gap: 6px; overflow-x: auto; padding-top: 18px; padding-bottom: 0; }
.nav a {
  color: #fff; text-decoration: none; padding: 9px 16px; border-radius: 12px 12px 0 0;
  background: rgba(255, 255, 255, .08); white-space: nowrap; font-weight: 700;
}
.nav a:hover { background: rgba(255, 255, 255, .2); }

.announce { background: var(--gold-soft); border-bottom: 1px solid #efdcae; }
.announce p { margin: 0; padding: 10px 0; font-weight: 700; color: #6b4d0f; }
.announce p::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 10px; background: var(--gold); transform: rotate(45deg); vertical-align: middle; }

/* grid of cards */
.grid {
  display: grid; gap: 20px; padding-top: 24px; padding-bottom: 12px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 760px) { .grid { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 22px 18px; border-top: 4px solid var(--accent);
}
.card.shabbat { border-top-color: var(--gold); }
.card h2 { margin: 0; font-size: 26px; }
.card > .muted { margin: 2px 0 12px; font-size: 14px; }
table.times { width: 100%; border-collapse: collapse; }
table.times th, table.times td { padding: 9px 4px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
table.times th { font-weight: 700; }
table.times th small { font-weight: 400; color: var(--muted); }
table.times th small.note { display: block; }
table.times td.time { text-align: left; font-size: 21px; color: var(--ink-2); white-space: nowrap; }
table.times tr:last-child th, table.times tr:last-child td { border-bottom: 0; }
table.times tr.sep td { padding-top: 14px; font-size: 13px; font-weight: 700; color: var(--gold); border-bottom: 1px solid #f1e3bd; }
table.times tr.hl th, table.times tr.hl td { background: var(--gold-soft); }
table.times tr.hl th { border-radius: 0 10px 10px 0; padding-right: 10px; }
table.times tr.hl td { border-radius: 10px 0 0 10px; padding-left: 10px; }
table.zmanim td.time { font-size: 17px; font-weight: 700; }
table.zmanim th { font-weight: 400; }

.shiurim { list-style: none; margin: 8px 0 0; padding: 0; }
.shiurim li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.shiurim li:last-child { border-bottom: 0; }
.sh-time { min-width: 70px; display: flex; flex-direction: column; align-items: center; background: #eef4fb; border-radius: 10px; padding: 6px; }
.sh-time .time { font-size: 18px; }
.sh-time .when { font-size: 12px; color: var(--muted); }
.sh-body { display: flex; flex-direction: column; }
.sh-body .speaker { font-size: 18px; font-weight: 700; color: var(--ink-2); }
.sh-time .when:only-child { font-size: 14px; font-weight: 700; color: var(--ink); margin: auto 0; }

/* events */
.section-title { font-size: 28px; margin: 26px 0 14px; }
.event-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); padding-bottom: 30px; }
.event-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease;
}
.event-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(10, 45, 77, .14); }
.event-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #e9eef4; }
.event-body { padding: 12px 16px 16px; }
.event-body h3 { margin: 0 0 4px; font-size: 19px; }
.event-body p { margin: 0; }
.excerpt { margin-top: 6px !important; color: #34526e; font-size: 15px; }
.event-full { width: 100%; border-radius: 12px; margin: 12px 0; }
.prose p { white-space: pre-line; }

.footer { padding: 22px 0 40px; color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 10px; }

/* install bar */
.install-bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; justify-content: center;
  padding: 8px 14px; background: linear-gradient(90deg, #0a2d4d, #0f6abf); color: #fff; font-weight: 600; font-size: 14px;
}
.install-bar[hidden] { display: none; }
.install-close { background: transparent; border: 1px solid rgba(255, 255, 255, .5); color: #fff; border-radius: 999px; width: 30px; height: 30px; cursor: pointer; }

@media (max-width: 640px) {
  .today { text-align: right; }
  .brand h1 { font-size: 28px; }
  .logo { width: 52px; height: 52px; }
  .today-parasha { font-size: 21px; }
  .card { padding: 18px 16px 14px; }
}

/* sign-up page */
.reg .lead { font-size: 18px; }
.notice { padding: 12px 16px; border-radius: 12px; font-weight: 700; margin-bottom: 14px; }
.notice.ok { background: #e3f5ea; color: #1d6b3e; }
.notice.err { background: #fbe6e3; color: #a12c1f; }
.reg-week { margin-bottom: 18px; }
.reg-slot { border-top: 1px solid var(--line); padding: 12px 0; }
.reg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: 15px; }
.pill.free { background: #e3f5ea; color: #1d6b3e; }
.pill.waiting { background: #fff4dc; color: #8a5a00; }
.pill.taken { background: #eef4fb; color: var(--ink); }
.reg-slot details summary { cursor: pointer; color: var(--accent); font-weight: 700; margin-top: 8px; }
.reg-form { display: grid; gap: 10px; margin-top: 10px; max-width: 420px; }
.reg-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.reg-form input { padding: 10px 12px; border: 1px solid #c9d6e3; border-radius: 10px; font-size: 17px; }
.reg-form .btn { justify-self: start; font-size: 17px; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.reg-slot { position: relative; }
.who-box { display: flex; align-items: center; gap: 10px; color: #fff; margin: 0; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.danger-txt { color: #a12c1f; border: 1px solid #e3b5ae; }
.small { font-size: 14px; }
