/* "Candlelight" (Claude Design canvas "Shabbat Times & Jewish Calendar"): night sky above, warm flame accent, the next
   candle-lighting time as the hero. Mobile first. Fonts from our own origin (OFL). */
@font-face { font-family: Sora; src: url(/fonts/sora-latin-wght-normal.woff2) format('woff2'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Frank Ruhl Libre'; src: url(/fonts/frank-ruhl-libre-hebrew-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }

:root {
  --bg: #F6F3EC; --card: #fff; --ink: #1B1D2E; --ink2: #3B3E55; --muted: #5B5E73; --line: #EFEAE0; --edge: #E7E1D3;
  --night1: #0F1230; --night2: #1C2152; --night3: #3A2E5C; --sky-ink: #F4EFE4; --sky-dim: #C9C3D9;
  --flame: #F2B544; --flame-ink: #1B1D2E; --link: #2B3A8C; --radius: 20px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; --display: Sora, var(--font);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0B0D1F; --card: #15182E; --ink: #EEEAF4; --ink2: #CFCADB; --muted: #A29DB4; --line: #262A45; --edge: #262A45; --link: #A9B8FF; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); font-variant-numeric: tabular-nums; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 21px; margin: 0 0 12px; font-weight: 600; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: 14px; } .muted { color: var(--muted); } .strong { font-weight: 600; }
.he { font-family: 'Frank Ruhl Libre', serif; font-size: 1.1em; }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 2px; }

/* night band */
.night { background: linear-gradient(180deg, var(--night1) 0%, var(--night2) 62%, var(--night3) 100%); color: var(--sky-ink); padding-bottom: 48px; }
.night.slim { padding-bottom: 0; }
.night a { color: var(--sky-ink); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding-block: 14px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; text-decoration: none; color: inherit; }
.nav { display: flex; gap: 18px; flex-wrap: nowrap; font-size: 15px; order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--sky-dim); text-decoration: none; white-space: nowrap; padding: 6px 0; }
.nav a[aria-current] { color: var(--sky-ink); box-shadow: inset 0 -2px 0 var(--flame); }
.bar-tools { display: flex; gap: 8px; align-items: center; flex: 1 1 100%; order: 2; justify-content: flex-end; }
.search { position: relative; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 0 14px; min-height: 44px; flex: 1; color: var(--sky-dim); }
.search input { background: transparent; border: 0; color: var(--sky-ink); font: inherit; outline: none; width: 100%; min-width: 0; }
.search input::placeholder { color: var(--sky-dim); }
.results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 260px; background: var(--card); color: var(--ink); border-radius: 16px; box-shadow: 0 16px 40px rgba(10,12,40,.3); overflow: hidden; z-index: 30; }
.results a { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.results a:first-child { border-top: 0; }
.results a span { color: var(--muted); font-size: 13px; }
.results a:hover, .results a[aria-selected] { background: var(--bg); }
.chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.10); color: inherit; cursor: pointer; }
@media (min-width: 1000px) { .nav { order: 0; width: auto; flex: 1; justify-content: safe center; } .bar-tools { flex: 0 1 300px; order: 0; } }

.hero { display: grid; gap: 28px; padding-top: 24px; align-items: end; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 36px; } }
.hero-text { display: flex; flex-direction: column; gap: 12px; }
.hero-text.wide { grid-column: 1 / -1; max-width: 820px; }
.kicker { font-size: 15px; color: var(--sky-dim); }
.hero h1 { margin: 0; font-weight: 600; font-size: clamp(28px, 5vw, 42px); }
.meta { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: baseline; color: #DDD6EA; font-size: 15px; }
.lead { margin: 0; font-size: 18px; color: #E6E0F0; }
.dim { color: var(--sky-dim); margin: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn.flame { background: var(--flame); color: var(--flame-ink); }
.night .btn.flame { color: var(--flame-ink); }
.btn.ghost { background: transparent; color: var(--sky-ink); border-color: rgba(255,255,255,.3); }
.btn.ghost-dark { background: transparent; color: var(--ink); border-color: var(--edge); }
.btn[disabled] { opacity: .6; }
.linkish { background: none; border: 0; padding: 0; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }
.big-date { font-family: var(--display); font-size: clamp(34px, 7vw, 56px); font-weight: 700; margin: 0; }
.big-he { font-size: clamp(28px, 5vw, 40px); margin: 0; }

/* times cards */
.times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tcard { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.13); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tcard.main { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.18); }
.tlabel { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--sky-dim); }
.tcard.main .tlabel { color: #F7D58A; }
.tbig { font-family: var(--display); font-weight: 700; font-size: clamp(38px, 9vw, 60px); line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.tbig small { font-size: .38em; font-weight: 600; margin-left: 4px; }
.tsub { font-size: 13px; color: var(--sky-dim); }
.trow { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--sky-dim); }
.trow b { color: var(--sky-ink); font-size: 17px; }
.settings { display: flex; gap: 8px; flex-wrap: wrap; }
.settings select { background: rgba(255,255,255,.10); color: var(--sky-ink); border: 1px solid rgba(255,255,255,.22); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; min-height: 40px; max-width: 100%; }
.settings option { color: #1B1D2E; }

/* content */
.content { padding-block: 32px 56px; }
.page-h1 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 20px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.col-side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 20px; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 0 var(--edge); margin-bottom: 0; }
.content > .card, .content > .grid2, .content > .hgrid { margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2, .h1-card { margin: 0; }
.h1-card { font-size: 24px; }
.card-head a { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.prose p { margin: 0 0 10px; color: var(--ink2); }
.prose h2 { margin-top: 18px; } .prose h2:first-child { margin-top: 0; }
.tablebox { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
.list th { text-align: left; font-weight: 500; color: var(--muted); padding: 10px 8px; }
.list td { padding: 11px 8px; border-top: 1px solid var(--line); }
.list tr.now td { background: rgba(242,181,68,.12); }
.list tr.fast td:nth-child(2) { color: var(--ink2); }
.links { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.links.cols3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 16px; }
.links-inline a { margin-right: 10px; }
.hgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.hcard { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-decoration: none; color: var(--ink); background: var(--card); }
.hcard span { color: var(--muted); font-size: 14px; }
.hcard:hover { border-color: var(--flame); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.yrow { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.local { margin-top: 16px; }
.local h3 { font-size: 17px; margin: 0 0 6px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.form label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; min-height: 44px; }
.form input[type=date], .form input[type=number], .form select { font: inherit; font-size: 16px; color: var(--ink); background: var(--card); border: 1px solid var(--edge); border-radius: 12px; padding: 10px 12px; min-height: 46px; }
.form input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--night2); }
.row3 { display: grid; grid-template-columns: 1fr 2fr 1.4fr; gap: 10px; }
.result { display: flex; flex-direction: column; gap: 4px; background: var(--bg); border-radius: 14px; padding: 14px 16px; }
.result b { font-family: var(--display); font-size: 22px; }
.result-box:empty { display: none; }
.ad { min-height: 0; }
.ad[hidden] { display: none; }

/* footer */
.foot { border-top: 1px solid var(--edge); padding-block: 28px; background: var(--card); }
.foot-grid { display: grid; gap: 20px; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1fr 2fr; } }
.foot-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; font-size: 14px; }
.small-logo { color: var(--ink); font-size: 17px; }
.small-logo rect { fill: var(--ink); }

/* install prompt and toast (shared helper) */
.install { position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; background: var(--card); color: var(--ink2); border: 1px solid var(--edge); border-radius: 20px; box-shadow: 0 12px 40px rgba(16,24,40,.28); font-size: 15px; }
.install img { flex: none; border-radius: 10px; }
.install-body { flex: 1; min-width: 0; }
.install-body strong { display: block; color: var(--ink); margin-bottom: 2px; }
.install-body p { margin: 0; }
.install-ico { display: inline-flex; vertical-align: -4px; padding: 2px; border-radius: 6px; background: var(--bg); color: var(--ink); }
.install-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.install-buttons .btn { background: var(--bg); color: var(--ink); }
.install-buttons .btn.primary { background: var(--flame); color: var(--flame-ink); }
.install-steps { margin: 6px 0 0; padding-inline-start: 20px; display: grid; gap: 6px; }
body:has(#stats-consent, [data-stats-banner]:not([hidden])) .install { display: none; }
.install.with-arrow { bottom: calc(40px + env(safe-area-inset-bottom)); }
.install-arrow { position: fixed; bottom: calc(4px + env(safe-area-inset-bottom)); color: var(--flame); animation: install-bob 1s ease-in-out infinite; }
.install-arrow.center { left: calc(50% - 14px); } .install-arrow.end { right: 18px; }
@keyframes install-bob { 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .install-arrow { animation: none; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--night2); color: var(--sky-ink); padding: 10px 16px; border-radius: 999px; z-index: 60; margin: 0; }

/* print: the year table on paper */
@media print {
  .night, .foot, .noprint, .install, .toast, .ad { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card { box-shadow: none; padding: 0; }
  .list td, .list th { padding: 3px 6px; }
  .content { padding: 0; }
}
