/*
 * HAR SHALOM CEMETERY — the yahrzeit calendar.
 *
 * Module   public/harshalom/static/yahrzeit.css  (served at /harshalom/static/yahrzeit.css)
 * Version  0.010 · 2026-11-11 · harshalom/0.018-pages2 (the count of its changelog entries; no
 *          line before 0.009)
 * Owner    lane T (Tehillim & Mishnayos, Yahrzeits, the names list); was lane B2
 * Linked   by app/harshalom/yahrzeit/page.tsx, a <link precedence="next"> after hs.css
 *
 * A STATIC FILE, NOT A BUNDLER IMPORT, so the offline worker (sw-harshalom.js) keeps it:
 * an import is served from /_next/, which the worker never touches (Rule 31), and the
 * calendar came up unstyled offline. It is served exactly as written: no PostCSS, no
 * nesting, no @import.
 *
 * Every rule is scoped under `.hs` (BUILD_CONTRACT item 5). v2 LOOK (OWNER_FEEDBACK_20261029
 * items 1, 8, 11; DESIGN_V2.md): light everywhere, the tokens of static/hs.css only (no colour is
 * written here), quiet outlined buttons, proportionate type. The selected day is a SOFT green with a
 * green outline (never white on solid green), today a thin gold ring, Shabbos a faint warm column,
 * a yahrzeit a small gold dot, the light Adar I copy grey and dashed.
 *
 * THREE LAYOUTS (item 11):
 *   PHONE    (< 700px)     the month, the selected day, then the month's list, one under the other
 *   TABLET   (700-1199px)  the month on the left, the note under it; the day beside them; the
 *                          month's list the whole width under both (0.018)
 *   COMPUTER (>= 1200px)   the month, the day and the month's list side by side: one screen, the two
 *                          lists scroll inside their panels and stop above the bottom of the
 *                          screen; the note sits under the month; a short laptop screen
 *                          (max-height 800px, e.g. 1366x768) gets tighter cells and spacing
 *                          hover states and focus rings
 * Rule 40: the page flexes; the cells grow with the screen. Only the note (prose) caps its line.
 *
 * CHANGELOG (Rule 45)
 *   2026-11-11 harshalom/0.018-pages2 (0.010) — P2-2: from 1200 to 1799px 0.009 gave the month's list
 *     its room by taking a fifth of the day card's (1.3 0.8 1.2), and the day card's names broke instead
 *     (every yahrzeit day picked in turn: 10 labels on two lines at 1200, 8 at 1247-1300, 5 at 1366-1536;
 *     main had 5, 5, 2, 1, 0). The room now comes from the calendar: 0.9 1 1.08, the calendar never
 *     under 372px (its days 47px across or more); below 1366px 14px between the columns and the two
 *     lists' sides 12px; and David's weekday names 12px while the days are under 57px across (to
 *     1535px), so each stays whole (at 14px "דאנערשטאג" ran into "פרייטאג" in a narrower calendar).
 *     Measured with every yahrzeit day picked: the day card 10/8/8/5 labels on two lines at
 *     1200/1247/1300/1440 before, 2/1/0/0 after (one nine-word name, two even lines); the month's list
 *     1 at 1200-1230 and 0 from 1247, as before. From 1800px and below 1200px nothing changes.
 *   2026-11-11 harshalom/0.018-pagesB (0.009) — the owner, 11 Nov ~4 PM ET, of Search a Name's names
 *     squeezed one word a line: "Same thing like this across the board." The audit found the same in
 *     the month's list here (R4): the narrowest column on the screen, 124-170px a name, up to three
 *     lines, one word alone on a line, at 320, 768-844, 1247 (his window), 1280 and 1366. Now a row's
 *     "תהלים" goes under the name when the whole name does not fit beside it; a two-line name splits
 *     evenly (text-wrap: balance, the day card's names too); a tablet's month list runs the whole
 *     width under the month and the day, each row's date, name and button together (so the Feedback
 *     button's corner sits on no name, R12); from 1200 to 1799px the day card gives the month's list
 *     a fifth of its width (1.3 0.8 1.2; the month keeps its width). Every name on one line from 430px
 *     up, two at most below, never under three words on a line (was one). R15: the smallest phones'
 *     days are 44px across at 320 (were 39), their dates 13px (were 9px), the weekday heads never
 *     under 12px (were 9.5-11.6px on every phone), and under 380px the luach's letters א׳ … שבת. Under
 *     370px the day card's two actions one under the other (each broke two words a line beside the other).
 *   2026-11-02 fix/hs-phone-tidy (v3.1) — the phone (ticket #1696): a name's two actions side by side in
 *     one even row, the note on the gutter. (Polish k needs nothing here: the lists' actions already carry
 *     data-oo-launcher-avoid, and room under a list that does not scroll would push the computer's one
 *     screen past the fold.)
 *   2026-11-02 fix/hs-phone-tidy (v3.1, polish i) — a tablet's left column is the month and the note
 *     together (.hs-yz-side), so no gap opens between them when the day beside is taller.
 *   2026-10-28 feat/harshalom-cemetery-site, lane B2 — created.
 *   2026-10-28 review round 2, lane X — moved from app/harshalom/yahrzeit/ to a static
 *     file the page links and the worker precaches (offline styles). No rule changed.
 *   2026-10-29 feat/harshalom-v2-light, lane T — rewritten for v2: light tokens only, the soft
 *     selected day (no solid green), the three layouts, the person card with its two actions
 *     ("Show on the map", "Tehillim"), the month's list (.hs-yz-ml).
 *   2026-10-29 feat/harshalom-v2-light, lane T (fit) — fits 1366x768 (review 29 Oct: main ended
 *     at 902px): the note is a grid item under the month, the two lists stop above the bottom of
 *     the screen, and a short screen tightens the cells; tablet touch targets 44px (the month
 *     list's "תהלים" was 34px, the month arrows and "Today" 40px).
 *   2026-11-02 feat/harshalom-v3-audit, lane L4 — audit V-54: an empty day's card shows the next
 *     yahrzeit (.hs-yz-next) instead of a blank; V-48: the day card keeps clear of the phone's
 *     call bar when a tap brings it up (scroll margins). The v3 tokens: 44px touch targets on any
 *     touch screen (the month arrows, "Today", every action, the month list's "תהלים"), the 13px
 *     text floor (the month's English, the key, the note, the list's English and Adar I tags,
 *     the dates in the cells from 380px; the 7-day grid on a narrower phone keeps 12px dates and
 *     David's scaled weekday names, which cannot fit 13px in a 43px cell).
 *   2026-11-02 feat/harshalom-v3-audit, review fix F3 — under 380px the dates in the cells are 13px
 *     too (R2-14: they were 12px at 360): the card, the gaps and the cells give up a few px of side
 *     padding so "17 Oct" fits whole.
 */

/* ── the page ──────────────────────────────────────────────────────────── */

.hs .hs-yz-main {
  width: 100%;
  padding: 12px 12px 24px;
}

.hs .hs-yz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'cal' 'day' 'ml' 'note';
  gap: 12px;
  align-items: start;
}

/* v3.1 (polish i): the month and the note's wrapper. On a phone and a computer it steps aside and
   the grid places the month and the note by their areas, as before; on a tablet it is the left
   column (below). */
.hs .hs-yz-side {
  display: contents;
}

.hs .hs-yz-cal,
.hs .hs-yz-list,
.hs .hs-yz-ml {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-r);
  background: var(--hs-surface);
  box-shadow: var(--hs-shadow);
}

.hs .hs-yz-cal {
  grid-area: cal;
  padding: 10px 8px;
}

.hs .hs-yz-list {
  grid-area: day;
  padding: 12px;
  /* a tap on a day brings this card up (yahrzeit.js revealDay): clear of the header and the
     phone's call bar (audit V-48) */
  scroll-margin-top: calc(var(--hs-sticky-top, 0px) + 8px);
  scroll-margin-bottom: calc(var(--hs-callbar-h, 0px) + 8px);
}

.hs .hs-yz-ml {
  grid-area: ml;
  padding: 12px;
}

/* ── the month card ─────────────────────────────────────────────────────── */

.hs .hs-yz-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px 8px;
}

.hs .hs-yz-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--hs-line-2);
  border-radius: 50%;
  background: var(--hs-surface);
  color: var(--hs-accent);
  cursor: pointer;
}

.hs .hs-yz-nav[disabled] {
  opacity: 0.35;
  cursor: default;
}

/* The bar reads right to left: "previous" sits on the right and points right. */
.hs .hs-yz-nav--prev .hs-yz-chev {
  transform: scaleX(-1);
}

.hs .hs-yz-month {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0;
  text-align: center;
}

.hs .hs-yz-month__he {
  font-family: var(--hs-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--hs-ink);
}

.hs .hs-yz-month__en {
  font-family: var(--hs-sans);
  font-size: var(--hs-fs-min);
  font-weight: 500;
  color: var(--hs-muted);
}

.hs .hs-yz-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

/* Weekday heads: David's Yiddish names, small English under each. */
.hs .hs-yz-dows {
  margin-bottom: 3px;
}

.hs .hs-yz-dow {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 2px 0;
  font-family: var(--hs-serif);
  /* 0.018 (R15): never under 12px (it was 9.5-11.6px on every phone under 444px); under 380px the
     heads are letters (below), where a whole name cannot be 12px with air beside it */
  font-size: clamp(12px, 2.7vw, 14px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--hs-accent-ink);
  text-align: center;
  white-space: nowrap;
}

.hs .hs-yz-dow small {
  font-family: var(--hs-sans);
  /* a phone's seven 43px columns: 12px (0.018, R15: it was 11px; "Wed" is 25px); the 13px floor from
     a tablet up (below) */
  font-size: 12px;
  font-weight: 500;
  color: var(--hs-muted);
}

.hs .hs-yz-dow--shabbos,
.hs .hs-yz-dow--shabbos small {
  color: var(--hs-gold);
}

/* ── the days ───────────────────────────────────────────────────────────── */

.hs .hs-yz-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 52px;
  padding: 4px 2px 11px;
  border: 1px solid var(--hs-line);
  border-radius: 8px;
  background: var(--hs-surface);
  color: var(--hs-ink);
  font: inherit;
  cursor: pointer;
}

.hs .hs-yz-day__n {
  font-family: var(--hs-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}

.hs .hs-yz-day__c {
  margin-top: 1px;
  font-family: var(--hs-sans);
  /* 12px only where seven 43px cells cannot hold "17 Oct" at 13px (a phone under 380px) */
  font-size: var(--hs-fs-min);
  line-height: 1.1;
  color: var(--hs-muted);
  white-space: nowrap;
}

.hs .hs-yz-day__dot {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--hs-gold);
}

.hs .hs-yz-day__dot--light {
  background: var(--hs-line-2);
}

/* Shabbos: a faint warm column (the page's own light stone where color-mix is not known). */
.hs .hs-yz-day--shabbos {
  background: var(--hs-bg);
  background: color-mix(in srgb, var(--hs-gold) 7%, var(--hs-surface));
}

/* Today: a thin gold ring. */
.hs .hs-yz-day--today {
  border-color: var(--hs-gold);
  box-shadow: inset 0 0 0 1px var(--hs-gold);
}

/* The selected day: soft green with a green outline, dark green numeral. */
.hs .hs-yz-day[aria-pressed='true'] {
  border-color: var(--hs-accent);
  background: var(--hs-accent-soft);
  box-shadow: inset 0 0 0 1px var(--hs-accent);
}

.hs .hs-yz-day[aria-pressed='true'] .hs-yz-day__n {
  color: var(--hs-accent-ink);
}

.hs .hs-yz-day--today[aria-pressed='true'] {
  box-shadow:
    inset 0 0 0 1px var(--hs-accent),
    0 0 0 2px var(--hs-gold);
}

/* ── the foot of the month card ─────────────────────────────────────────── */

.hs .hs-yz-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 10px 4px 2px;
}

.hs .hs-yz-today {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--hs-line-2);
  border-radius: 999px;
  background: var(--hs-surface);
  color: var(--hs-accent-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.hs .hs-yz-today [lang='yi'] {
  font-family: var(--hs-serif);
  font-size: 15px;
}

.hs .hs-yz-key {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  font-size: var(--hs-fs-min);
  color: var(--hs-muted);
}

.hs .hs-yz-key__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hs .hs-yz-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hs-gold);
}

.hs .hs-yz-dot--light {
  background: var(--hs-line-2);
}

/* ── the selected day ───────────────────────────────────────────────────── */

.hs .hs-yz-sel,
.hs .hs-yz-mh {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0 0 10px;
}

.hs .hs-yz-sel__he {
  align-self: stretch;
  font-family: var(--hs-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--hs-accent-ink);
  text-align: right;
}

.hs .hs-yz-sel__en {
  font-family: var(--hs-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--hs-muted);
}

.hs .hs-yz-people {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs .hs-yz-person__card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-r);
  background: var(--hs-surface);
  color: var(--hs-ink);
}

.hs .hs-yz-person__also {
  font-size: var(--hs-fs-min);
  color: var(--hs-muted);
}

.hs .hs-yz-person__name {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.hs .hs-yz-person__he {
  font-family: var(--hs-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--hs-ink);
  text-align: right;
  /* 0.018 (R4): a name that needs two lines splits them evenly (5 words and 4, never 8 and "גליק"
     alone); a browser without it breaks as before */
  text-wrap: balance;
}

.hs .hs-yz-person__en {
  font-size: 13px;
  color: var(--hs-muted);
}

.hs .hs-yz-person__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  font-size: 13px;
  color: var(--hs-muted);
}

.hs .hs-yz-person__plot {
  font-weight: 600;
  color: var(--hs-accent-ink);
}

.hs .hs-yz-person__plot [lang='yi'] {
  font-family: var(--hs-serif);
}

/* The two actions: quiet outlined buttons, an icon and the words in both languages. */
.hs .hs-yz-person__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.hs .hs-yz-act {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 4px 12px;
  border: 1px solid var(--hs-line-2);
  border-radius: 999px;
  background: var(--hs-surface);
  color: var(--hs-accent-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.hs .hs-yz-act svg {
  flex: none;
  color: var(--hs-accent);
}

.hs .hs-yz-act__txt {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
}

.hs .hs-yz-act__txt [lang] {
  font-family: var(--hs-serif);
  font-size: 14px;
}

/* The light Adar I copy: grey, dashed, "not the yahrzeit". */
.hs .hs-yz-person--light .hs-yz-person__card {
  border-style: dashed;
  border-color: var(--hs-line-2);
  background: var(--hs-bg);
}

.hs .hs-yz-person--light .hs-yz-person__he,
.hs .hs-yz-person--light .hs-yz-person__plot {
  color: var(--hs-muted);
}

.hs .hs-yz-person--light .hs-yz-person__en,
.hs .hs-yz-person--light .hs-yz-person__meta {
  color: var(--hs-faint);
}

.hs .hs-yz-none {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 10px 4px 4px;
  color: var(--hs-muted);
  text-align: center;
}

.hs .hs-yz-none [lang='yi'] {
  font-family: var(--hs-serif);
  font-size: 16px;
}

.hs .hs-yz-none__en {
  font-size: 13px;
}

/* An empty day: the next yahrzeit under the "no yahrzeits" line (audit V-54). */
.hs .hs-yz-next {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--hs-line);
}

.hs .hs-yz-next__h {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--hs-ink);
}

.hs .hs-yz-next__h [lang='yi'] {
  order: 2;
  font-family: var(--hs-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--hs-accent-ink);
}

.hs .hs-yz-next__en {
  order: 1;
}

/* the day: a quiet button that selects it in the calendar */
.hs .hs-yz-next__d {
  justify-self: start;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--hs-line-2);
  border-radius: 999px;
  background: var(--hs-surface);
  color: var(--hs-accent-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.hs .hs-yz-next__d [lang] {
  font-family: var(--hs-serif);
  font-size: 15px;
}

.hs .hs-yz-next__d:focus-visible {
  outline: 2px solid var(--hs-accent);
  outline-offset: 2px;
}

@media (hover: hover) {
  .hs .hs-yz-next__d:hover {
    border-color: var(--hs-accent);
    background: var(--hs-accent-soft);
  }
}

/* ── the month's list ───────────────────────────────────────────────────── */

.hs .hs-yz-mh {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 10px;
}

.hs .hs-yz-mh__en {
  font-size: 16px;
  font-weight: 650;
  color: var(--hs-ink);
}

.hs .hs-yz-mh__he {
  font-family: var(--hs-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--hs-accent-ink);
}

.hs .hs-yz-mlist,
.hs .hs-yz-mpeople {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs .hs-yz-mday {
  display: grid;
  /* room for "דאנערשטאג" at the 13px floor */
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px solid var(--hs-line);
}

.hs .hs-yz-mday__d {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  min-height: 44px;
  padding: 4px 2px;
  border: 1px solid var(--hs-line);
  border-radius: 8px;
  background: var(--hs-surface);
  color: var(--hs-ink);
  font: inherit;
  line-height: 1.15;
  cursor: pointer;
}

.hs .hs-yz-mday__n {
  font-family: var(--hs-serif);
  font-size: 17px;
  font-weight: 700;
}

.hs .hs-yz-mday__w {
  font-family: var(--hs-serif);
  font-size: var(--hs-fs-min);
  color: var(--hs-accent-ink);
}

.hs .hs-yz-mday__c {
  font-size: var(--hs-fs-min);
  color: var(--hs-muted);
  white-space: nowrap;
}

.hs .hs-yz-mday--today .hs-yz-mday__d {
  border-color: var(--hs-gold);
  box-shadow: inset 0 0 0 1px var(--hs-gold);
}

.hs .hs-yz-mday--sel .hs-yz-mday__d {
  border-color: var(--hs-accent);
  background: var(--hs-accent-soft);
}

.hs .hs-yz-mpeople {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 0.018 (R4): a row is the name, then "תהלים". When the whole name does not fit beside the button,
   the button goes UNDER it (flex-wrap; the name's basis is its own one-line width), so the name keeps
   the row's whole width and reads as a whole name, never two or three words a line. A row that fits
   is drawn exactly as before. */
.hs .hs-yz-mrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  min-height: 40px;
}

.hs .hs-yz-mrow .hs-yz-person__name {
  flex: 1 1 auto;
  min-width: 0;
}

.hs .hs-yz-mrow .hs-yz-person__he {
  font-size: 15px;
}

.hs .hs-yz-mrow .hs-yz-person__en {
  font-size: var(--hs-fs-min);
}

.hs .hs-yz-mrow .hs-yz-person__acts {
  flex: none;
  margin: 0;
  /* under the name, it keeps to the row's end, where it sits beside a name that fits */
  margin-inline-start: auto;
}

.hs .hs-yz-mrow .hs-yz-act {
  min-height: 34px;
  padding: 2px 10px;
}

.hs .hs-yz-mrow--light .hs-yz-person__he,
.hs .hs-yz-mrow--light .hs-yz-person__en {
  color: var(--hs-faint);
}

.hs .hs-yz-mrow__also {
  flex: none;
  padding: 0 6px;
  border: 1px dashed var(--hs-line-2);
  border-radius: 999px;
  font-family: var(--hs-serif);
  font-size: var(--hs-fs-min);
  color: var(--hs-muted);
}

/* A month-list row keeps the name wide: "תהלים" says it, the English word stays for a screen
   reader (the day's card shows both). */
.hs .hs-yz-mrow .hs-yz-act__txt > span:last-child {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── the note ───────────────────────────────────────────────────────────── */

/* Prose: the line length is capped for reading. fullbleed-ok */
.hs .hs-yz-note {
  grid-area: note;
  justify-self: center;
  width: 100%;
  max-width: 720px; /* fullbleed-ok: reading column */
  margin: 2px 0 0;
  padding: 0 6px;
  font-size: var(--hs-fs-min);
  color: var(--hs-muted);
}

.hs .hs-yz-note p {
  margin: 0;
}

.hs .hs-yz-note p + p {
  margin-top: 4px;
}

.hs .hs-yz-note [lang='yi'] {
  font-family: var(--hs-serif);
  font-size: 14px;
  text-align: right;
}

/* ── hover and focus (a mouse or a keyboard) ───────────────────────────── */

@media (hover: hover) {
  .hs .hs-yz-day:hover,
  .hs .hs-yz-mday__d:hover {
    border-color: var(--hs-accent);
  }

  .hs .hs-yz-nav:hover:not([disabled]),
  .hs .hs-yz-today:hover,
  .hs .hs-yz-act:hover {
    border-color: var(--hs-accent);
    background: var(--hs-accent-soft);
  }

  .hs a.hs-yz-person__name:hover .hs-yz-person__he {
    color: var(--hs-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.hs .hs-yz-day:focus-visible,
.hs .hs-yz-nav:focus-visible,
.hs .hs-yz-today:focus-visible,
.hs .hs-yz-act:focus-visible,
.hs .hs-yz-mday__d:focus-visible,
.hs .hs-yz-person__name:focus-visible {
  outline: 2px solid var(--hs-accent);
  outline-offset: 2px;
}

/* ── TABLET (700-1199px): the month beside the day and the month's list ─── */

@media (min-width: 700px) {
  .hs .hs-yz-main {
    padding: 16px 20px 28px;
  }

  /* v3.1 (polish i): the month and the note are one column (.hs-yz-side), the day beside them — the
     note sits right under the month even when the day beside it is taller (at 820x1180 a ~180px gap
     opened between them).
     0.018 (R4): the month's list runs the WHOLE width under both. In the right column it was the
     narrowest column on the screen (126-160px for a name beside the date and "תהלים": three lines a
     name at 768) while the left one stood empty under the note. */
  .hs .hs-yz-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-areas: 'side day' 'ml ml';
    grid-template-rows: auto auto;
    gap: 16px;
  }

  .hs .hs-yz-side {
    grid-area: side;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
  }

  .hs .hs-yz-note {
    justify-self: stretch;
    max-width: none;
    margin: 0;
  }

  .hs .hs-yz-cal {
    padding: 12px 10px;
  }

  .hs .hs-yz-day {
    min-height: 58px;
  }

  .hs .hs-yz-dow small {
    font-size: var(--hs-fs-min);
  }

  .hs .hs-yz-act,
  .hs .hs-yz-mday__d {
    min-height: 44px;
  }
}

/* A phone or a tablet is touched (and so is a big touch screen): every target 44px (DESIGN_V2;
   review 29 Oct at 820x1180; audit V-26: the arrows and "Today" were 40px, the list's 34px). */
@media (pointer: coarse), (max-width: 1199.98px) {
  .hs .hs-yz-act,
  .hs .hs-yz-mrow .hs-yz-act,
  .hs .hs-yz-mday__d,
  .hs .hs-yz-today,
  .hs .hs-yz-next__d {
    min-height: var(--hs-tap);
  }

  .hs .hs-yz-nav {
    width: var(--hs-tap);
    height: var(--hs-tap);
  }

  /* the name is the link to the grave: a finger-sized target, the words in its middle */
  .hs a.hs-yz-person__name {
    min-height: var(--hs-tap);
    justify-content: center;
  }
}

/* ── COMPUTER (>= 1200px): all three side by side, on one screen ────────── */

@media (min-width: 1200px) {
  .hs .hs-yz-main {
    padding: 16px 24px 28px;
  }

  .hs .hs-yz-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      'cal day ml'
      'note day ml';
    grid-template-rows: auto 1fr;
    gap: 20px;
  }

  /* the wrapper steps aside again: the month and the note take their own areas */
  .hs .hs-yz-side {
    display: contents;
  }

  /* The note under the month, its width (not the reading cap: the column is narrower). */
  .hs .hs-yz-note {
    margin: -6px 0 0;
  }

  /* The two lists scroll inside their panels and stop above the bottom of the screen, so the
     page itself fits: the header, the page title (~64px), the page's top and bottom room. */
  .hs .hs-yz-list,
  .hs .hs-yz-ml {
    position: sticky;
    top: calc(var(--hs-sticky-top, 0px) + 12px);
    max-height: calc(100vh - var(--hs-sticky-top, 0px) - 112px);
    max-height: calc(100dvh - var(--hs-sticky-top, 0px) - 112px);
    overflow-y: auto;
    padding: 14px 16px;
  }

  .hs .hs-yz-day {
    min-height: 62px;
  }

  .hs .hs-yz-day__n {
    font-size: 20px;
  }

  .hs .hs-yz-day__c {
    font-size: var(--hs-fs-min);
  }

  .hs .hs-yz-act,
  .hs .hs-yz-mday__d {
    min-height: 36px;
  }

  .hs .hs-yz-mrow .hs-yz-act {
    min-height: 32px;
  }
}

/* 0.018 (R4): a tablet's month list runs the whole width (above), so a row keeps its name, then
   "תהלים", together: the date, the name and the button side by side, never the name at one end of a
   700-1100px row and the button at the other. The space after them stays clear, so the Feedback
   button's corner sits over no name and no "תהלים" (R12). */
@media (min-width: 700px) and (max-width: 1199.98px) {
  .hs .hs-yz-mrow {
    justify-content: flex-start;
  }

  .hs .hs-yz-mrow .hs-yz-person__name {
    flex: 0 1 auto;
  }

  .hs .hs-yz-mrow .hs-yz-person__acts {
    margin-inline-start: 0;
  }
}

/* 0.018 (R4): 1200-1799px — the month's list takes the room the day card does not need. With three
   equal-ish columns (1.3 1 1) it was the narrowest column on the screen: 153px for a name at the
   owner's 1247x1222, eight of nine names on two or three lines. From 1800px the three columns as
   before (every name already fits).
   0.018 (pages2, P2-2): the room comes from the CALENDAR, not the day card (1.3 0.8 1.2 broke the day
   card's names instead: 10 labels on two lines at 1200, 5 at 1440). The calendar takes 0.9 of a share
   and never less than 372px (its days 47px across, a finger's 44 too); below 1366px the columns sit
   14px apart and the two lists' sides are 12px (after the short-screen block, below); and while its
   days are under 57px (to 1535px) David's weekday names are 12px, so each stays whole with air beside
   it (at 14px "דאנערשטאג" is 61px and ran into "פרייטאג"). */
@media (min-width: 1200px) and (max-width: 1799.98px) {
  .hs .hs-yz-layout {
    grid-template-columns: minmax(372px, 0.9fr) minmax(0, 1fr) minmax(0, 1.08fr);
  }
}

@media (min-width: 1200px) and (max-width: 1535.98px) {
  .hs .hs-yz-dow {
    font-size: 12px;
  }
}

/* A big touch screen (a 1366px tablet held sideways): the computer's slimmer actions stay 44px. */
@media (min-width: 1200px) and (pointer: coarse) {
  .hs .hs-yz-act,
  .hs .hs-yz-mrow .hs-yz-act,
  .hs .hs-yz-mday__d {
    min-height: var(--hs-tap);
  }
}

/* A short laptop screen (1366x768, 1280x720 …): tighter room and cells, so it still fits. */
@media (min-width: 1200px) and (max-height: 800px) {
  .hs .hs-yz-main {
    padding: 12px 24px 12px;
  }

  .hs .hs-yz-layout {
    gap: 16px;
  }

  .hs .hs-yz-cal {
    padding: 8px 10px;
  }

  .hs .hs-yz-bar {
    padding-bottom: 4px;
  }

  .hs .hs-yz-day {
    min-height: 52px;
    padding: 3px 2px 10px;
  }

  .hs .hs-yz-day__n {
    font-size: 18px;
  }

  .hs .hs-yz-foot {
    padding-top: 6px;
  }

  .hs .hs-yz-list,
  .hs .hs-yz-ml {
    max-height: calc(100vh - var(--hs-sticky-top, 0px) - 100px);
    max-height: calc(100dvh - var(--hs-sticky-top, 0px) - 100px);
    padding: 12px 14px;
  }
}

/* 0.018 (pages2, P2-2): 1200-1365px, after the short-screen block so it holds at 1280x800 too: the
   columns 14px apart and the two lists' sides 12px, the room their names need (see the 1200-1799
   block above). */
@media (min-width: 1200px) and (max-width: 1365.98px) {
  .hs .hs-yz-layout {
    column-gap: 14px;
  }

  .hs .hs-yz-list,
  .hs .hs-yz-ml {
    padding-right: 12px;
    padding-left: 12px;
  }
}

/* ── small phones ───────────────────────────────────────────────────────── */

@media (max-width: 379px) {
  .hs .hs-yz-day__n {
    font-size: 16px;
  }

  /* v3 review (R2-14): the dates keep the 13px floor here too ("17 Oct" is 42px wide). The room
     comes from the card's side padding (4px), the gap between days (2px) and the cell's own side
     padding (0, the date is centred), so a 360px phone's cell holds it whole. */
  .hs .hs-yz-cal {
    padding-inline: 4px;
  }

  .hs .hs-yz-grid {
    gap: 2px;
  }

  .hs .hs-yz-day {
    padding-inline: 0;
  }

  .hs .hs-yz-day__c {
    font-size: var(--hs-fs-min);
    letter-spacing: -0.02em;
  }
}

@media (max-width: 339px) {
  .hs .hs-yz-cal {
    padding: 8px 4px;
  }
}

/* 0.018 (R15): the smallest phones. The days were 39px across at 320 (under a finger's width), their
   dates 9px and David's weekday names 9.5px.
   - Under 360px the month card gives the days its side room (2px, from the 16px gutter; the bar and
     the foot keep 8px), and the days 1px between them: seven days of 44px across at 320, 52px high
     as before. The dates stay 13px (the 9px rule is gone; "17 Oct" fits the 42px inside a 44px day).
   - Under 380px the weekday heads are the luach's letters, א׳ ב׳ ג׳ ד׳ ה׳ ו׳ שבת, 15px, over the
     English 12px: a whole Yiddish name cannot be 12px there with air between the names
     (דאנערשטאג is 53px; at 360 only 2.5px would part it from its neighbour). The heads are hidden
     from a screen reader already (aria-hidden); every day button says its weekday in words. */
@media (max-width: 359.98px) {
  .hs.hs-page.hs-yz:not(.hsa) > main .hs-yz-cal.hs-panel:not(.hs-panel .hs-panel) {
    padding-left: max(2px, env(safe-area-inset-left));
    padding-right: max(2px, env(safe-area-inset-right));
  }

  .hs .hs-yz-bar,
  .hs .hs-yz-foot {
    padding-inline: 8px;
  }

  .hs .hs-yz-grid {
    column-gap: 1px;
  }
}

@media (max-width: 379.98px) {
  .hs .hs-yz-dow > span {
    display: none;
  }

  .hs .hs-yz-dow::before {
    font-size: 15px;
    line-height: 1.15;
  }

  /* Sunday … Shabbos, in the order the heads are written (the grid reads right to left) */
  .hs .hs-yz-dow:nth-child(1)::before {
    content: '\5D0\5F3';
  }

  .hs .hs-yz-dow:nth-child(2)::before {
    content: '\5D1\5F3';
  }

  .hs .hs-yz-dow:nth-child(3)::before {
    content: '\5D2\5F3';
  }

  .hs .hs-yz-dow:nth-child(4)::before {
    content: '\5D3\5F3';
  }

  .hs .hs-yz-dow:nth-child(5)::before {
    content: '\5D4\5F3';
  }

  .hs .hs-yz-dow:nth-child(6)::before {
    content: '\5D5\5F3';
  }

  .hs .hs-yz-dow:nth-child(7)::before {
    content: '\5E9\5D1\5EA';
  }
}

/* ── printing: the month and the lists, no chrome ───────────────────────── */

@media print {
  .hs .hs-yz-nav,
  .hs .hs-yz-today,
  .hs .hs-yz-person__acts {
    display: none !important;
  }

  .hs .hs-yz-list,
  .hs .hs-yz-ml {
    position: static;
    max-height: none;
    overflow: visible;
    box-shadow: none;
  }
}

/* v3.1 (ticket #1696, "on the phone the site looks very very messy") — a phone's day list: each
   name's two actions side by side in one even row (they stacked, one under the other, at different
   widths), each with its Yiddish over its English; the note on the 16px gutter like everything else. */
@media (max-width: 699.98px) {
  .hs .hs-yz-list .hs-yz-person__acts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hs .hs-yz-list .hs-yz-person__acts .hs-yz-act {
    justify-content: center;
    min-height: var(--hs-tap, 44px);
    padding: 4px 8px;
  }

  .hs .hs-yz-list .hs-yz-person__acts .hs-yz-act__txt {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hs .hs-yz-note {
    padding: 0;
  }
}

/* 0.018: under 370px the two side by side are under 150px each, and "Show on the map" and
   "ווייז אויף דער מאפע" broke two words a line inside the button (320, 360): one under the other,
   each the card's width. */
@media (max-width: 369.98px) {
  .hs .hs-yz-list .hs-yz-person__acts {
    grid-template-columns: minmax(0, 1fr);
  }
}
