/* Printable Shabbat flyer: one US Letter page (8.5in × 11in = 816 × 1056 CSS px), in the website's own look and
   in the layout of the shul's own schedule sheets: white, a double frame, the emblem and the name at the top left
   with the address at the right of a thin rule, a hairline, the title tall in Big Shoulders Display, the piers,
   then the times, the highlighted ones in the emblem's blue. */
@page { size: letter; margin: 0; }

:root {
  --ink: #211a15; --ink-2: #463c34; --muted: #7b726a;
  --bronze: #211a15; --bronze-dk: #211a15; --bronze-lt: #8fd3ff; --gold: #8f877c; --gold-text: #463c34; --clay: #1f2fc4; --clay-dk: #17229a;
  --stone: #e4e1d9; --line: rgba(33,26,21, .14);
  --k: 1; /* content scale, set by print.js so everything fits on one page */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-synthesis: none; }
body {
  background: #d6d1c6; color: var(--ink);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}

/* ---------- Screen toolbar ---------- */
.toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: var(--ink); color: #efe2d6; font: 500 14px/1.2 "Instrument Sans", system-ui, sans-serif; }
.toolbar a { color: inherit; }
.tb-back { text-decoration: none; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tb-btn { white-space: nowrap; flex: none; }
.tb-back:hover { opacity: 1; }
.tb-note { opacity: .7; }
.tb-spacer { flex: 1; }
.tb-btn { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border: 1px solid #d9c6a6; background: #d9c6a6; color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; }
.tb-btn:hover { background: #fff; border-color: #fff; }
.tb-ghost { background: transparent; color: #efe2d6; border-color: rgba(217, 198, 166, .5); }
.tb-ghost:hover { background: rgba(217, 198, 166, .12); color: #fff; border-color: #d9c6a6; }
@media (max-width: 560px) { .tb-note { display: none; } .toolbar { gap: 8px; padding: 8px 10px; } .tb-btn { padding: 0 12px; } }

/* ---------- Stage (screen preview, scaled to fit) ---------- */
.stage { padding: 28px 16px 48px; display: flex; justify-content: center; overflow: hidden; } /* keeps phones from zooming out before the sheet is scaled */
.sheet-wrap { width: calc(816px * var(--view, 1)); height: calc(1056px * var(--view, 1)); }
.sheet-wrap > .sheet { transform: scale(var(--view, 1)); transform-origin: top left; }

/* ---------- The sheet ---------- */
.sheet { position: relative; overflow: hidden; width: 816px; height: 1056px; background: #fff; box-shadow: 0 18px 50px rgba(24, 33, 47, .2); }
.frame { position: absolute; inset: 22px; border: 3px solid var(--ink); pointer-events: none; }
.frame::after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--ink); }
.bsd { position: absolute; right: 44px; top: 38px; font: 400 16px/1 "Times New Roman", sans-serif; color: var(--bronze-dk); }

.heading { position: absolute; left: 62px; right: 62px; top: 58px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "logo shul addr" "rule rule rule" "title title title" "date date date" "ring ring ring"; column-gap: 14px; align-items: center; }
.logo { grid-area: logo; display: block; height: 62px; width: auto; margin: 0; }
.shul { grid-area: shul; margin: 0; font: 700 34px/1 "Big Shoulders Display", "Arial Narrow", sans-serif; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.addr { grid-area: addr; margin: 0; padding-left: 16px; border-left: 1.5px solid var(--clay); font: 500 14px/1.45 "Instrument Sans", sans-serif; color: var(--ink-2); text-align: left; }
.heading::after { content: ""; grid-area: rule; height: 1.5px; background: var(--clay); margin-top: 14px; }
.title { grid-area: title; margin: 30px 0 0; text-align: center; font: 700 76px/.95 "Big Shoulders Display", "Arial Narrow", sans-serif; letter-spacing: .005em; color: var(--ink); white-space: nowrap; }
.date { grid-area: date; margin: 8px 0 0; text-align: center; font: 400 17px/1.3 "Instrument Sans", sans-serif; color: var(--ink-2); }
.ring { grid-area: ring; margin: 16px auto 0; width: 174px; height: 33px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 116 22' fill='%238f877c'%3E%3Cpath d='M0 10h6v12H0zM10 7h6v15h-6zM20 4h6v18h-6zM30 0h6v22h-6zM50 3h6v19h-6zM60 5h6v17h-6zM70 7h6v15h-6zM80 9h6v13h-6zM90 11h6v11h-6zM100 13h6v9h-6zM110 15h6v7h-6z'/%3E%3Cpath fill='%231f2fc4' d='M40 1h6v21h-6z'/%3E%3C/svg%3E") center / contain no-repeat; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ring i { display: none; }

.content { position: absolute; left: 110px; right: 110px; top: 352px; bottom: 92px; display: flex; flex-direction: column; gap: calc(22px * var(--k)); }

/* A section: an Outfit heading in cobalt, then name and time on hairlines. */
.panel { break-inside: avoid; }
.panel-head { margin: 0 0 calc(4px * var(--k)); padding-bottom: calc(5px * var(--k)); border-bottom: 2px solid var(--ink); font: 600 calc(28px * var(--k))/1.05 "Big Shoulders Display", "Arial Narrow", sans-serif; letter-spacing: .01em; color: var(--ink); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: calc(6.5px * var(--k)) 0; border-bottom: 1px solid var(--line); }
.rows li > span:first-child { font: 400 calc(16.5px * var(--k))/1.3 "Instrument Sans", sans-serif; color: var(--ink); }
.rows li > span + span { font: 600 calc(25px * var(--k))/1.1 "Big Shoulders Display", "Arial Narrow", sans-serif; letter-spacing: .01em; color: var(--ink); white-space: nowrap; text-align: right; }
.rows li > span + span.long { white-space: normal; font: 500 calc(14.5px * var(--k))/1.35 "Instrument Sans", sans-serif; max-width: 58%; }
.rows .with { display: block; font-size: .82em; color: var(--muted); }
.rows li.hl > span:first-child { font-weight: 600; }
.rows li.hl > span + span { color: var(--clay); }

.callout { break-inside: avoid; margin-top: calc(4px * var(--k)); padding: calc(12px * var(--k)) 20px; background: var(--stone); border-radius: 0; text-align: center; }
.callout h2 { margin: 0 0 4px; font: 600 calc(24px * var(--k))/1.1 "Big Shoulders Display", "Arial Narrow", sans-serif; color: var(--bronze-dk); }
.callout p { margin: 3px 0 0; font: 400 calc(15px * var(--k))/1.4 "Instrument Sans", sans-serif; color: var(--ink); }

.foot { position: absolute; left: 60px; right: 60px; bottom: 50px; text-align: center; white-space: nowrap; font: 500 12.5px/1 "Instrument Sans", sans-serif; color: var(--ink-2); letter-spacing: .02em; }

.empty-msg { margin: 24px 0; font: 400 20px/1.4 "Big Shoulders Display", "Arial Narrow", sans-serif; text-align: center; color: var(--ink-2); }

/* ---------- Print / PDF ---------- */
@media print {
  body { background: #fff; }
  .toolbar { display: none !important; }
  .stage { padding: 0; display: block; }
  .sheet-wrap { width: auto; height: auto; }
  .sheet-wrap > .sheet { transform: none; }
  .sheet { box-shadow: none; width: 8.5in; height: 11in; }
}
body.pdf { background: #fff; }
body.pdf .toolbar { display: none; }
body.pdf .stage { padding: 0; display: block; }
body.pdf .sheet { box-shadow: none; }

/* Lining figures everywhere (the "font" shorthand above resets this, so set it last). */
.sheet, .sheet * { font-variant-numeric: lining-nums !important; }
