:root {
  --page: #f4efec;
  --card: #ffffff;
  --ink: #241d19;
  --ink-2: #6f645c;
  --hairline: #e8e0da;
  --raised: #f5efeb;
  --teal: #0d7d74;
  --teal-soft: #e3f0ee;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.card {
  max-width: 720px;
  margin: 24px auto 64px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 40px 28px 32px;
  box-shadow: 0 1px 3px rgba(36, 29, 25, 0.06);
}
@media (max-width: 760px) {
  .card { margin: 0 auto; border-radius: 0; border-left: 0; border-right: 0; padding: 28px 18px; }
}

.page-header h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.fact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 14px;
  margin: 0 0 16px;
}
.fact-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex: none; }
.intro { font-size: 17px; color: var(--ink); margin: 0 0 8px; }

.file-nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  margin: 20px 0 24px;
}
.file-nav a { padding: 10px 0; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.file-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); }
@media (max-width: 600px) { .file-nav a { display: inline-flex; align-items: center; min-height: 44px; } }

.photo { margin: 20px 0; }
.photo-btn { display: block; width: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; }
.photo img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.photo figcaption, .caption { font-size: 13px; color: var(--ink-2); margin-top: 8px; }

.facts { margin: 20px 0; display: flex; flex-direction: column; }
.fact { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.fact:first-child { border-top: 1px solid var(--hairline); }
.fact dt { flex: 0 0 110px; font-size: 13px; color: var(--ink-2); font-weight: 600; padding-top: 2px; }
.fact dd { margin: 0; flex: 1; }

.group { margin-top: 40px; }
.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 6px;
}
.group h2 { font-size: 22px; margin: 0 0 14px; letter-spacing: -0.01em; }
.group p { margin: 0 0 14px; }

.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.row:first-child { border-top: 1px solid var(--hairline); }
.row-num { flex: none; font-weight: 700; color: var(--teal); font-size: 14px; min-width: 18px; }
.row-body { flex: 1; }
.row-name { font-weight: 600; }
.row-detail { color: var(--ink-2); font-size: 14.5px; margin-top: 2px; }
.row-value { flex: none; font-weight: 700; font-size: 17px; }

.steps { margin: 0 0 16px; padding-inline-start: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 10px 0 10px 42px; border-bottom: 1px solid var(--hairline); }
.steps li:first-child { border-top: 1px solid var(--hairline); }
[dir="rtl"] .steps li { padding: 10px 42px 10px 0; }
.steps li::before {
  content: counter(step);
  position: absolute; inset-inline-start: 0; top: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--teal-soft); color: var(--teal);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.callout {
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 20px 0;
}
.callout-title { font-weight: 700; margin: 0 0 6px !important; }
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }

.key-sentence { font-size: 17px; font-weight: 600; }

.closing {
  margin-top: 40px; padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-size: 13.5px; color: var(--ink-2);
}

/* Day picker */
.day-picker { display: flex; flex-direction: column; gap: 12px; }
.day-picker-head { display: flex; align-items: center; justify-content: space-between; }
.day-picker-title { font-weight: 600; font-size: 14px; }
.day-nav {
  min-width: 44px; min-height: 44px;
  border: 1px solid var(--hairline); border-radius: 8px;
  background: transparent; color: var(--ink);
  font: inherit; font-size: 18px; cursor: pointer;
}
.day-nav:disabled { opacity: 0.35; cursor: default; }
.day-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-head { font-size: 12px; color: var(--ink-2); text-align: center; padding: 4px 0; }
.day-cell {
  position: relative; min-height: 44px;
  border: 1px solid var(--hairline); border-radius: 8px;
  background: transparent; color: var(--ink);
  font: inherit; font-size: 14px; cursor: pointer; padding: 0 0 6px;
}
.day-cell.shabbat { background: var(--raised); }
.day-cell.chanukah::after {
  content: ''; position: absolute; bottom: 5px; inset-inline-start: 50%;
  transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%;
  background: var(--teal);
}
[dir="rtl"] .day-cell.chanukah::after { transform: translateX(50%); }
.day-cell.selected { background: var(--teal); border-color: var(--teal); color: #fff; }
.day-cell.selected.chanukah::after { background: #fff; }
.day-cell:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.day-cell:disabled { opacity: 0.35; cursor: default; }
.day-summary { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.copy-btn {
  border: 1px solid var(--teal); color: var(--teal); background: transparent;
  border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; min-height: 44px;
}
.copy-btn.copied { background: var(--teal); color: #fff; }
.caption.small { font-size: 13px; color: var(--ink-2); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(20, 14, 10, 0.92);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 14px; inset-inline-end: 18px;
  background: none; border: 0; color: #fff; font-size: 34px; cursor: pointer; line-height: 1;
}
