/*
 * HAR SHALOM CEMETERY — the section plan (a section drawn like the office's sheets).
 *
 * Module   public/harshalom/static/plan.css  (linked as /harshalom/static/plan.css)
 * Version  0.012 · 2026-11-12 · harshalom/0.019-r4 (numbered on its own since; was with plan.js from 0.018)
 * Owner    lane S (was lane P: the section plan)
 * Used by  app/harshalom/find/page.tsx (<link … precedence="next" />); markup in
 *          app/harshalom/find/_parts/HsPlan.tsx, behaviour in static/js/plan.js
 *
 * A static file so the offline worker can keep it (never a bundler import). Every rule
 * is scoped under `.hs`; tokens come from static/hs.css. Two looks:
 *   - no JavaScript: a card in the finder's column, the drawing at its own size in a
 *     box that scrolls, its graves plain links;
 *   - .is-sheet (plan.js): the full-screen plan, between the site's top bar and the
 *     call bar (both stay: the Chevra Kadisha button is never covered), the drawing
 *     fitted to the screen and zoomed by plan.js.
 * Layers: the sheet at 44 sits above the call bar (40) and under the call bar's notes
 * (45), the top bar (50), the ☰ menu (58-60) and the photo lightbox (90).
 * Rule 40: the sheet fills the screen; only the grave view caps its reading column
 * (fullbleed-ok). Light palette (Rule 34): stone, green, gold.
 *
 * THREE EXPERIENCES (v3, audit V-08). Phone (< 700px): title, the plan, the list of the section's
 * graves under it, the bar. Tablet and computer: the list beside the plan (its own column, the width
 * of a side pane, --hs-side-w), the plan filling the rest. A short screen on its side: the hint row
 * goes, the bars get slimmer, the plan gets the height (V-07). The row letters and plot numbers
 * stand in strips outside the drawing (.hs-plan__ax), so they stay on screen while zoomed.
 *
 * CHANGELOG (Rule 45)
 *   0.012 · 2026-11-12 harshalom/0.019-r4 (the live check of 0.018, fault 1) — the plan's own list ('Names
 *     in section N') broke the names rule (Hebrew at most 2 lines, English 1) where it is narrow: at
 *     1247x1222 with Windows' classic scroll bars (list 280 px) section 9's Avraham Shie Schapiro took 3
 *     Hebrew lines and section 18's Menachem Mendel Toporowitz 2 English lines (the no-JavaScript card, 286
 *     px, the second); on an iPad 820x1180 and 768x1024 (255 px) 13 names in 9 sections; with no
 *     JavaScript on a 320 phone (254 px) 13. Under 18.74em of the list's own font (a container query on
 *     .hs-plan__items, as find.css's .hs-secview) the Hebrew name has the row's whole width and the pill
 *     sits at the end of the English name's line (Row · Plot keeps its room; 30 px tall for a mouse, 44 px
 *     on touch and under 1200 px). Screens only; paper and the wider lists are as 0.011 (the 295 px list
 *     at 1247 and 1440 with overlay scroll bars, 18.4em, takes the narrow rows too, as the section's own
 *     list does there). Measured (real Chrome, the live check's names probe, all 13 sections with graves,
 *     138 names): 0 past the rule at 1247 (with and without scroll bars), 1366, 1440, 1920, 1180, 820,
 *     768, 390 and 320, with and without JavaScript (was 2, 1, 13, 13, 13 and 13). Held:
 *     hs019-r4-plan-names.test.tsx.
 *   0.011 · 2026-11-11 harshalom/0.018-sections (release 0.018, lane S, finding F5) — a phone: the plan
 *     opened as a sheet of specks under the site's header (the drawing 280 px tall at 390x844, 69 px at
 *     320x640, 38 px at 375x548; two names of the list in view). The phone's plan now covers the header
 *     (plan.js placeSheet: top 0; the header scrolls with the page there and sits under the sheet),
 *     its top row keeps clear of the screen's safe area, and the list of names under the drawing gets
 *     part of that room (min(25dvh, 230px), was min(18dvh, 170px)), so a third name shows; the drawing
 *     is still taller than in 0.013 at every phone size. Tablets, computers and paper: unchanged.
 *   2026-11-06 harshalom/0.013-site (review round 2, A-03) — the section drawing keeps 0.012's size at every
 *     phone size (round 1's taller list made it 30-110px shorter: 161 -> 131px at 375x667, 306 -> 224px at
 *     390x844): the list's box grows only by the zoom row the bar gave up (44 + 6px), the strip is 56px (the
 *     circle and its gap) in place of the end padding, so the names get 0.012's height at two lines a name.
 *   2026-11-06 harshalom/0.013-site (audit 6 Nov, A-03) — a phone held upright: the list of the section's
 *     names is as tall as the screen allows past a ~220px plan (30% of it to 320px, was 140-152px), each name two
 *     lines, and it ends in a strip that does not scroll, where the Feedback circle (right) and the zoom
 *     buttons (left, out of the bar's second row) stand: the circle covered 34-43% of the "תהלים" links.
 *   2026-11-02 fix/hs-phone-tidy (v3.1, polish k) — the phone's list of the section's graves and the open
 *     grave end with the Feedback button's room, so their last line scrolls clear of it; the phone's list
 *     is a little shorter (18dvh, at most 170px), so the plan keeps the height the two-row bar took.
 *   2026-11-02 fix/hs-phone-tidy (v3.1, polish d) — the lit grave's whole name: it wraps to a second
 *     line instead of "Ni…" (390px) or "יצחק פרץ ב״ר אברהם של…" (820px). The bar under the plan keeps one
 *     height lit or not (R3-01), 76px from a tablet up; on a phone two rows (the name across the whole
 *     width, the zoom buttons under it), with the hint row above the plan folded into the bar.
 *   2026-11-02 feat/harshalom-v3-audit, review fix F1 — the bar under the plan keeps one height, lit or
 *     not, so the plan never moves under a finger (R3-01: a tap on a phone opened the wrong grave);
 *     the names in the list beside the plan wrap instead of losing the family name to "…" (R2-06).
 *   2026-11-02 feat/harshalom-v3-audit, lane L3m — the plan readable at every size (audit V-08): the
 *     list of the section's graves (.hs-plan__list) beside the plan on a tablet and a computer and
 *     under it on a phone, each name with its "תהלים" (.hs-plan__item-t, V-33); the row and plot
 *     strips (.hs-plan__ax) that stay while zoomed; the drawing's own letters and numbers only on the
 *     no-JavaScript card and on paper; short landscape screens give the plan the height (V-07);
 *     print: the whole section and its names, no buttons (V-16); text 13 px and touch 44 px floors
 *     on the plan's own controls (the bar, the tip, the list, the strips).
 *   2026-10-29 feat/harshalom-v2-light, fix lane "find" — the v2 reviews: .hs-plan__quiet (the title
 *     or the grave's box plan.js focuses after a tap or a click: no ring; the keyboard still gets
 *     Close / Back with theirs); Close, Back and a loose grave 44 px below a computer.
 *   2026-10-29 feat/harshalom-v2-light, lane S — v2 light (owner, 29 Oct: "reading on red or
 *     green"): graves are pale green cells with dark names, the lit grave pale gold; the sheet's
 *     bar, the grave's bar and the Close / Back buttons are white with dark words; the accent
 *     token (--hs-accent) instead of v1's --hs-green, now the office button's green.
 *   2026-10-28 feat/harshalom-cemetery-site, lane P — created.
 */

/* ── the card (no JavaScript, and the shell plan.js fills) ──────────────── */

.hs .hs-plan__top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hs .hs-plan__head {
  flex: 1;
  min-width: 0;
}

.hs .hs-plan__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  margin: 0;
  font-family: var(--hs-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--hs-accent);
}

.hs .hs-plan__he {
  font-size: 19px;
}

.hs .hs-plan__meta {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--hs-muted);
}

.hs .hs-plan__help {
  margin: 8px 0;
  font-size: var(--hs-fs-min, 13px);
  line-height: 1.35;
  color: var(--hs-muted);
}

.hs .hs-plan__help p {
  margin: 0;
}

.hs .hs-plan__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 2px;
}

.hs .hs-plan__key {
  display: inline-block;
  width: 14px;
  height: 9px;
  border: 1px solid #9aa39d;
  border-radius: 2px;
  background: #fff;
}

.hs .hs-plan__key--on {
  border-color: var(--hs-accent);
  background: #dcebe2;
}

.hs .hs-plan__key + span {
  margin-inline-end: 8px;
}

.hs .hs-plan__help .hs-plan__guess {
  margin-top: 2px;
  color: #7a5a12;
}

.hs .hs-plan__stage {
  position: relative;
  max-height: 72vh;
  overflow: auto;
  border: 1px solid var(--hs-stone-2);
  border-radius: 10px;
  background: var(--hs-stone);
  -webkit-overflow-scrolling: touch;
}

.hs .hs-plan__svg {
  display: block;
  max-width: none;
}

/* ── the drawing ────────────────────────────────────────────────────────── */

.hs .hs-plan__k {
  fill: #fff;
  stroke: #9aa39d;
  stroke-width: 1;
}

.hs .hs-plan__k--free {
  fill: none;
  stroke: #b9b3a6;
  stroke-dasharray: 2 2;
}

.hs .hs-plan__k.is-on {
  fill: #dcebe2;
  stroke: var(--hs-accent);
}

/* An empty plot under the pointer or the finger. */
.hs .hs-plan__k.is-lit {
  fill: #fbf1d9;
  stroke: var(--hs-gold);
  stroke-width: 2.5;
}

/* A grave under the pointer or the finger (and, with no JavaScript, hovered or focused). */
.hs .hs-plan__g.is-lit .hs-plan__k,
.hs .hs-plan:not(.is-sheet) .hs-plan__g:hover .hs-plan__k,
.hs .hs-plan:not(.is-sheet) .hs-plan__g:focus-visible .hs-plan__k {
  fill: #f6dc9c;
  stroke: #8a6a1f;
  stroke-width: 2.5;
}

.hs .hs-plan__g:focus-visible {
  outline: none;
}

.hs .hs-plan__t {
  fill: var(--hs-ink);
  font-family: var(--hs-sans);
  font-weight: 600;
  text-anchor: middle;
  pointer-events: none;
}

.hs .hs-plan__t--he {
  font-family: var(--hs-serif);
  font-weight: 700;
}

.hs .hs-plan__g.is-lit .hs-plan__t,
.hs .hs-plan:not(.is-sheet) .hs-plan__g:hover .hs-plan__t {
  fill: #1b1407;
}

.hs .hs-plan__row {
  font-family: var(--hs-serif);
  font-size: 14px;
  font-weight: 700;
  fill: var(--hs-accent);
  text-anchor: middle;
}

.hs .hs-plan__num {
  font-family: var(--hs-sans);
  font-size: 11px;
  fill: var(--hs-muted);
}

.hs .hs-plan__num--l {
  text-anchor: end;
}

.hs .hs-plan__num--r {
  text-anchor: start;
}

.hs .hs-plan__row.is-lit,
.hs .hs-plan__num.is-lit {
  fill: var(--hs-gold);
  font-weight: 800;
}

/* ── nothing to draw; the graves with no plot ───────────────────────────── */

.hs .hs-plan__none {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 28px 16px;
  font-size: 16px;
  text-align: center;
  color: var(--hs-muted);
}

.hs .hs-plan__none [lang] {
  font-family: var(--hs-serif);
  font-size: 18px;
}

.hs .hs-plan__loose {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #ead7a3;
  border-radius: 10px;
  background: #fff7e3;
  font-size: var(--hs-fs-min, 13px);
}

.hs .hs-plan__loose-h {
  margin: 0 0 6px;
  color: #7a5a12;
}

.hs .hs-plan__loose-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs .hs-plan__loose-list > li {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.hs .hs-plan__loose-item {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid #ead7a3;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.hs .hs-plan__loose-he {
  font-family: var(--hs-serif);
  font-size: 16px;
  font-weight: 700;
}

.hs .hs-plan__loose-rp {
  font-size: var(--hs-fs-min, 13px);
  color: var(--hs-muted);
}

/* ── the list of the section's graves (audit V-08) ──────────────────────── */

.hs .hs-plan__list {
  margin-top: 10px;
}

.hs .hs-plan__list-h {
  margin: 0 0 6px;
  font-size: var(--hs-fs-min, 13px);
  font-weight: 700;
  color: var(--hs-muted);
}

.hs .hs-plan__items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs .hs-plan__item {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border: 1px solid var(--hs-line);
  border-radius: 8px;
  background: var(--hs-surface);
}

.hs .hs-plan__item.is-lit {
  border-color: var(--hs-gold);
  background: #fdf6e3;
  box-shadow: inset 3px 0 0 var(--hs-gold);
}

.hs .hs-plan__item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-height: 44px;
  padding: 5px 10px;
  border-radius: 8px 0 0 8px;
  color: var(--hs-ink);
  text-decoration: none;
}

.hs .hs-plan__item-main:hover {
  background: var(--hs-accent-soft);
}

.hs .hs-plan__item-main:focus-visible,
.hs .hs-plan__item-t:focus-visible {
  outline: 2px solid var(--hs-accent);
  outline-offset: -2px;
}

/* A name wraps, never "…" (review R2-06: on a tablet and at 1280-1440 the cut took the family name,
   the part that tells who it is). Most take one or two lines; a very long one takes what it needs. */
.hs .hs-plan__item-main > span {
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.hs .hs-plan__item-he {
  font-family: var(--hs-serif);
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  color: var(--hs-accent-ink);
}

.hs .hs-plan__item-en {
  font-size: 14px;
  font-weight: 600;
}

.hs .hs-plan__item-rp {
  font-size: var(--hs-fs-min, 13px);
  color: var(--hs-muted);
}

/* "תהלים": Tehillim & Mishnayos for this name (owner item 7). */
.hs .hs-plan__item-t {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-inline-start: 1px solid var(--hs-line);
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: var(--hs-accent-ink);
  font-family: var(--hs-serif);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.hs .hs-plan__item-t:hover {
  background: var(--hs-accent-soft);
}

.hs .hs-plan__loose-list .hs-plan__item-t {
  border: 1px solid #ead7a3;
  border-radius: 8px;
  background: #fff;
}

/* 0.012 (round 4, R5; the live check of 0.018, fault 1): A NARROW LIST, whatever the screen and the
   pointer, as the section's own list does (find.css 0.018.4, .hs-secview: under 18.75em of the list's own
   font). The names had the row less the pill's column (56 px and more): at the owner's 1247 window with
   Windows' scroll bars (list 280 px) section 9's Avraham Shie Schapiro took 3 Hebrew lines and section
   18's Menachem Mendel Toporowitz 2 English lines; on an iPad (255 px) 13 names in 9 sections did; with
   no JavaScript on a 320 phone (254 px) 13 too. Now the Hebrew name has the row's whole width, the
   English name and Row · Plot sit under it at the row's end, and the pill sits at the end of that last
   line (Row · Plot keeps its room and is as tall as the pill: 30 px for a mouse from 1200 px, 44 px on a
   touch screen and under 1200 px). Screens only: paper keeps its rows. The markup is unchanged. */
@media screen {
  .hs .hs-plan__items {
    container: hs-planl / inline-size;
  }

  @container hs-planl (max-width: 18.74em) {
    .hs .hs-plan__item {
      --hs-plan-pill-w: 60px;
      position: relative;
    }

    .hs .hs-plan__item-main {
      flex-direction: row;
      flex-wrap: wrap;
      align-items: baseline;
      align-content: center;
      justify-content: flex-end;
      column-gap: 8px;
      border-radius: 8px;
    }

    .hs .hs-plan__item-he {
      flex: 1 0 100%;
      min-width: 0;
    }

    .hs .hs-plan__item-en {
      flex: 0 1 auto;
      min-width: 0;
      text-align: right;
    }

    .hs .hs-plan__item-rp {
      display: inline-flex;
      align-items: center;
      min-height: 30px;
    }

    /* the pill's room at the end of the last line (the pill: 5 px in from the row's end, the name's
       link 10 px in, 8 px between) */
    .hs .hs-plan__item-main > :last-child {
      margin-inline-end: calc(var(--hs-plan-pill-w) - 5px + 8px);
    }

    .hs .hs-plan__item-t {
      position: absolute;
      right: 5px;
      bottom: 5px;
      z-index: 1;
      width: var(--hs-plan-pill-w);
      min-width: 0;
      min-height: 30px;
      padding: 0;
      border: 1px solid var(--hs-line);
      border-radius: 8px;
      background: var(--hs-surface);
    }
  }
}

/* The pill is 44 px tall under 1200 px and on any touch screen (the touch rule at the end of this
   file): so is the last line's Row · Plot in a narrow list. */
@media screen and (max-width: 1199px), screen and (pointer: coarse) {
  @container hs-planl (max-width: 18.74em) {
    .hs .hs-plan__item-rp {
      min-height: var(--hs-tap, 44px);
    }
  }
}

/* ── the full-screen plan (plan.js) ─────────────────────────────────────── */

.hs .hs-plan.is-sheet {
  position: fixed;
  top: var(--hs-plan-top, calc(56px + env(safe-area-inset-top)));
  right: 0;
  bottom: var(--hs-callbar-h);
  left: 0;
  z-index: 44;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
  border: 0;
  border-radius: 0;
  background: var(--hs-stone);
  box-shadow: none;
  overscroll-behavior: contain;
}

.hs .hs-plan.is-sheet .hs-plan__top {
  flex: none;
  padding: 8px 12px;
  border-bottom: 1px solid var(--hs-line);
  background: var(--hs-surface);
  color: var(--hs-ink);
}

.hs .hs-plan.is-sheet .hs-plan__title {
  font-size: 18px;
  color: var(--hs-accent-ink);
}

.hs .hs-plan.is-sheet .hs-plan__he {
  color: var(--hs-muted);
}

.hs .hs-plan.is-sheet .hs-plan__meta {
  color: var(--hs-muted);
}

.hs .hs-plan__close,
.hs .hs-plan__back {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--hs-line-2);
  border-radius: var(--hs-r);
  background: var(--hs-surface);
  color: var(--hs-accent-ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.hs .hs-plan__close:hover,
.hs .hs-plan__back:hover {
  border-color: var(--hs-accent);
  background: var(--hs-accent-soft);
}

.hs .hs-plan__back [lang] {
  font-family: var(--hs-serif);
  font-size: 16px;
  font-weight: 600;
}

.hs .hs-plan.is-sheet .hs-plan__help {
  flex: none;
  margin: 0;
  padding: 5px 12px;
  border-bottom: 1px solid var(--hs-stone-2);
  background: #fff;
  font-size: var(--hs-fs-min, 13px);
}

.hs .hs-plan.is-sheet .hs-plan__stage {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  cursor: default;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.hs .hs-plan.is-sheet .hs-plan__stage:focus-visible {
  outline-offset: -3px;
}

.hs .hs-plan__stage.is-dragging {
  cursor: grabbing;
}

.hs .hs-plan.is-sheet .hs-plan__svg {
  position: absolute;
  top: 0;
  left: 0;
}

/* The strips beside the drawing carry the letters and numbers on screen (they stay while zoomed);
   the drawing's own are for the no-JavaScript card and for paper. */
.hs .hs-plan.is-sheet .hs-plan__axis {
  display: none;
}

.hs .hs-plan__ax {
  display: none;
}

.hs .hs-plan.is-sheet .hs-plan__ax {
  position: absolute;
  z-index: 2;
  display: block;
  overflow: hidden;
  background: rgba(251, 250, 247, 0.96);
  color: var(--hs-muted);
  font-family: var(--hs-sans);
  font-size: var(--hs-fs-min, 13px);
  line-height: 1;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.hs .hs-plan.is-sheet .hs-plan__ax[hidden] {
  display: none;
}

.hs .hs-plan.is-sheet .hs-plan__ax--top {
  top: 0;
  right: 0;
  left: 0;
  height: 26px;
  border-bottom: 1px solid var(--hs-line);
}

.hs .hs-plan.is-sheet .hs-plan__ax--l,
.hs .hs-plan.is-sheet .hs-plan__ax--r {
  top: 26px;
  bottom: 0;
  width: 30px;
}

.hs .hs-plan.is-sheet .hs-plan__ax--l {
  left: 0;
  border-right: 1px solid var(--hs-line);
}

.hs .hs-plan.is-sheet .hs-plan__ax--r {
  right: 0;
  border-left: 1px solid var(--hs-line);
}

.hs .hs-plan__axr,
.hs .hs-plan__axp {
  position: absolute;
  white-space: nowrap;
  pointer-events: none;
}

.hs .hs-plan__axr {
  top: 0;
  font-family: var(--hs-serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 26px;
  color: var(--hs-accent);
  transform: translateX(-50%);
}

.hs .hs-plan__axp {
  right: 0;
  left: 0;
  text-align: center;
  transform: translateY(-50%);
}

.hs .hs-plan__axr.is-thin,
.hs .hs-plan__axp.is-thin,
.hs .hs-plan__axr.is-out {
  visibility: hidden;
}

.hs .hs-plan__axr.is-lit:not(.is-out),
.hs .hs-plan__axp.is-lit {
  visibility: visible;
  color: #8a6a1f;
  font-weight: 800;
}

.hs .hs-plan.is-sheet .hs-plan__none {
  position: absolute;
  inset: 0;
  justify-content: center;
}

.hs .hs-plan.is-sheet .hs-plan__loose {
  flex: none;
  max-height: 26vh;
  margin: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border-width: 1px 0 0;
  border-radius: 0;
}

/* The list of the section's graves: on a phone under the plan, a few names high, scrolling. */
.hs .hs-plan.is-sheet .hs-plan__list {
  position: relative;
  flex: none;
  max-height: min(22dvh, 200px);
  margin: 0;
  padding: 8px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--hs-line);
  background: var(--hs-surface);
  -webkit-overflow-scrolling: touch;
}

/* v3.1 (polish k): on a phone the list's last name (and its תהלים) scrolls clear of the Feedback
   button, which floats over the list's bottom right, above the bar. */
@media (max-width: 699.98px) {
  .hs .hs-plan.is-sheet .hs-plan__list {
    /* a little shorter (was min(22dvh, 200px)), so the plan keeps the height the two-row bar took */
    max-height: min(18dvh, 170px);
    padding-bottom: calc(8px + var(--hs-launcher-room, 0px));
  }

  /* 0.011 (F5): the plan covers the site's header on a phone (plan.js placeSheet sets its top to 0), so
     its own top row keeps clear of a notch or the status bar of an app added to the home screen. */
  .hs .hs-plan.is-sheet .hs-plan__top {
    padding-top: max(8px, env(safe-area-inset-top));
  }
}

/* Inside the list the graves with no plot are its last part: no box of their own to scroll. */
.hs .hs-plan.is-sheet .hs-plan__list .hs-plan__loose {
  max-height: none;
  margin-top: 8px;
  overflow: visible;
  border-width: 1px;
  border-radius: 8px;
}

/* The label beside the pointer, or above the finger. */
.hs .hs-plan__tip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: min(320px, calc(100% - 8px));
  padding: 6px 10px;
  border: 2px solid var(--hs-gold);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  line-height: 1.25;
  pointer-events: none;
}

.hs .hs-plan__tip.is-empty {
  border-color: #9aa39d;
}

.hs .hs-plan__tip-he {
  font-family: var(--hs-serif);
  font-size: 18px;
  font-weight: 700;
  text-align: right;
  color: var(--hs-accent);
}

.hs .hs-plan__tip-en {
  font-size: 14px;
  font-weight: 600;
}

.hs .hs-plan__tip-rp,
.hs .hs-plan__tip-no,
.hs .hs-plan__tip-hint {
  font-size: var(--hs-fs-min, 13px);
  color: var(--hs-muted);
}

/* Under the plan: the lit grave with "Open", and the zoom buttons. One height whatever it holds
   (review R3-01): when a grave lit, the bar grew 64 -> 73px, the plan shrank under the finger and
   every grave moved, so a tap on a phone opened the grave beside the one touched. */
.hs .hs-plan__foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  min-height: 64px;
  padding: 6px 8px 6px 10px;
  border-top: 1px solid var(--hs-stone-2);
  background: #fff;
}

/* v3.1 (polish d): the bar holds a lit name on up to two lines, so it is a little taller (one height
   whatever it holds, R3-01); the name's box no longer squeezes to nothing beside the buttons. */
.hs .hs-plan.is-sheet .hs-plan__foot {
  height: 76px;
  min-height: 76px;
}

.hs .hs-plan__open {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.hs .hs-plan__open-names {
  flex: 1 1 auto;
}

.hs .hs-plan__open-rp {
  max-width: 9em;
  text-align: end;
}

/* A PHONE: two rows of one height — the lit grave (or the hint) across the whole width, the zoom
   buttons under it on the right — so the name has the width instead of 30px beside three buttons.
   The hint row above the plan steps aside (the bar says the whole hint while nothing is lit, plan.js
   idleText), so the plan keeps its height; the legend stays. */
@media (max-width: 699.98px) {
  .hs .hs-plan.is-sheet .hs-plan__foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 76px 44px;
    grid-template-areas:
      'bar bar'
      '. zoom';
    align-items: stretch;
    row-gap: 6px;
    height: auto;
    min-height: 0;
    padding: 6px 16px;
  }

  .hs .hs-plan.is-sheet .hs-plan__bar {
    grid-area: bar;
    min-height: 0;
  }

  .hs .hs-plan.is-sheet .hs-plan__zoom {
    grid-area: zoom;
  }

  .hs .hs-plan.is-sheet .hs-plan__hint {
    display: none;
  }

  .hs .hs-plan.is-sheet .hs-plan__help {
    padding: 4px 16px;
  }

  .hs .hs-plan.is-sheet .hs-plan__idle {
    align-self: center;
  }

  /* The lit grave: the names across, "Row · Plot" under them, "Open ›" at the end — the row and plot
     no longer take a column of their own beside the name. (The row/plot span steps out of the way
     with display: contents, so its text and its "Open ›" land in the button's own grid.) */
  .hs .hs-plan.is-sheet .hs-plan__open {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      'names go'
      'rp go';
    align-content: center;
    column-gap: 8px;
    padding: 4px 10px;
  }

  .hs .hs-plan.is-sheet .hs-plan__open-names {
    grid-area: names;
  }

  .hs .hs-plan.is-sheet .hs-plan__open-rp {
    display: contents;
  }

  .hs .hs-plan.is-sheet .hs-plan__open-rp b {
    grid-area: go;
    align-self: center;
  }

  .hs .hs-plan.is-sheet .hs-plan__open-he {
    font-size: 15px;
  }
}

/* 0.013 (audit 6 Nov, A-03) — A PHONE: THE LIST OF NAMES IS USABLE, AND THE FEEDBACK BUTTON SITS ON
   NONE OF ITS LINKS. At 390x844 the list was a 152px box (140px at 360x780): two names at a time, and
   the floating Feedback circle (44px, 12px above this bar, on the right) covered 34-43% of its "תהלים"
   links at every scroll position: the sheet is a fixed layer, so the page never scrolls it away, and
   room at the END of the list only helped the last name. Now, on a phone held upright:
     · the list ends in a strip that does not scroll (--hs-plan-strip, its own white bottom edge): the
       Feedback circle sits in the strip's right end, never over a name or a link;
     · the zoom buttons (+ − ⤢) stand in the strip's left end — they were a row of their own in the
       bar below, under an empty half — so the bar is one row;
     · each name is two lines (Hebrew; English with Row · Plot), not three, so more names show at once.
   🩸 THE DRAWING KEEPS 0.012's SIZE AT EVERY SCREEN (review round 2). The section drawing is what a
   finger slides on to find a name, and it takes whatever height the list and the bar leave. So the
   list's box grows by exactly the zoom row the bar gave up (44px + its 6px gap) and no more: list + bar
   together are as tall as in 0.012, and the drawing is too (round 1's taller list cost the drawing
   30px at 375x667 and 82px at 390x844). Inside that box the 56px strip replaces the 8px end padding
   and the Feedback room 0.012 left at the end, so the names get the same height they had in 0.012
   (2px more), at two lines a name instead of three.
   Only while the list is shown (:has; with no :has the v3.1 layout stays), only upright and on screen
   (a short screen on its side keeps its own layout below; paper keeps the print rules). */
@media screen and (max-width: 699.98px) and (min-height: 560.02px) {
  .hs .hs-plan.is-sheet:has(.hs-plan__list:not([hidden])) {
    /* the Feedback circle (44px) + its 12px gap above the bar (launcher-floor.ts LAUNCHER_FLOOR_GAP) */
    --hs-plan-strip: 56px;
  }

  .hs .hs-plan.is-sheet:has(.hs-plan__list:not([hidden])) .hs-plan__list {
    /* 0.012's box (the rule above) + the bar's zoom row (44px) and its row gap (6px). 0.011 (F5): with
       the header's room the plan gained, the list takes min(25dvh, 230px) (was min(18dvh, 170px)): a
       third name shows, and the drawing is still taller than before at every size. */
    max-height: calc(min(25dvh, 230px) + 44px + 6px);
    padding-bottom: 0;
    border-bottom: var(--hs-plan-strip) solid var(--hs-surface);
  }

  .hs .hs-plan.is-sheet:has(.hs-plan__list:not([hidden])) .hs-plan__foot {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 76px;
    grid-template-areas: 'bar';
  }

  .hs .hs-plan.is-sheet:has(.hs-plan__list:not([hidden])) .hs-plan__zoom {
    position: absolute;
    left: max(16px, env(safe-area-inset-left));
    bottom: calc(100% + (var(--hs-plan-strip) - 44px) / 2);
  }

  /* two lines a name: the Hebrew, then the English with its Row · Plot at the end */
  .hs .hs-plan.is-sheet .hs-plan__list .hs-plan__item-main {
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    align-items: baseline;
    column-gap: 8px;
  }

  .hs .hs-plan.is-sheet .hs-plan__list .hs-plan__item-he {
    flex: 1 0 100%;
  }

  .hs .hs-plan.is-sheet .hs-plan__list .hs-plan__item-rp {
    margin-inline-start: auto;
  }
}

/* A very long name (over 40 Hebrew or 28 English letters, plan.js marks it): a size smaller, so it is
   whole on two lines on a phone, and on two lines beside the buttons from a tablet up. */
.hs .hs-plan .hs-plan__open.is-long .hs-plan__open-he {
  font-size: 13.5px;
}

.hs .hs-plan__bar {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hs .hs-plan__bar .hs-plan__item-t {
  align-self: stretch;
  min-height: 50px;
  border: 1px solid var(--hs-line-2);
  border-radius: 10px;
  background: var(--hs-surface);
}

.hs .hs-plan__idle {
  margin: 0;
  font-size: var(--hs-fs-min, 13px);
  line-height: 1.3;
  color: var(--hs-muted);
}

.hs .hs-plan__open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 4px 10px;
  border: 1px solid #c9d8ce;
  border-radius: 10px;
  background: var(--hs-green-3);
  color: var(--hs-ink);
  text-align: start;
  cursor: pointer;
}

.hs .hs-plan__open-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hs .hs-plan__open-names > span {
  /* v3.1 (polish d): the whole name, wrapping to a second line, never cut to "Ni…" — the bar keeps
     one height lit or not (R3-01), tall enough for it (below). The two-line cap is only a guard. */
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.hs .hs-plan__open-he {
  font-family: var(--hs-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--hs-accent);
}

.hs .hs-plan__open-en {
  font-size: var(--hs-fs-min, 13px);
}

.hs .hs-plan__open-rp {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
  font-size: var(--hs-fs-min, 13px);
  color: var(--hs-muted);
}

.hs .hs-plan__open-rp b {
  font-size: 15px;
  color: var(--hs-accent);
}

.hs .hs-plan__zoom {
  flex: none;
  display: flex;
  gap: 6px;
}

.hs .hs-plan__zbtn {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hs-stone-3);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  color: var(--hs-accent);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.hs .hs-plan__zbtn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* The grave's full information, above the plan (the plan stays as it was under it). */
.hs .hs-plan__info {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  background: var(--hs-stone);
}

.hs .hs-plan__infotop {
  flex: none;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--hs-line);
  background: var(--hs-surface);
}

.hs .hs-plan__infobody {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 14px calc(24px + var(--hs-launcher-room, 0px)); /* v3.1 polish k: clear of the Feedback button */
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.hs .hs-plan__infobody .hs-grave {
  max-width: 720px; /* fullbleed-ok: the grave's reading column */
  margin: 0 auto;
  padding: 14px 12px;
  border: 1px solid var(--hs-stone-2);
  border-radius: var(--hs-r);
  background: #fff;
}

.hs .hs-plan__infobody .hs-grave__photo {
  width: 150px;
  height: 200px;
}

.hs .hs-plan__infobody .hs-grave__photo img {
  width: 100%;
  height: 100%;
}

.hs .hs-plan__tomap {
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
}

.hs .hs-plan__tomap [lang] {
  font-family: var(--hs-serif);
  font-size: 16px;
}

@media (min-width: 900px) {
  .hs .hs-plan.is-sheet .hs-plan__help {
    padding: 6px 20px;
  }

  .hs .hs-plan.is-sheet .hs-plan__top {
    padding: 8px 20px;
  }
}

/* ── TABLET and COMPUTER: the list beside the plan, the plan filling the rest (audit V-08) ── */

@media (min-width: 700px) {
  .hs .hs-plan.is-sheet {
    display: grid;
    grid-template-columns: var(--hs-side-w, 300px) minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      'top top'
      'list help'
      'list stage'
      'list foot';
  }

  .hs .hs-plan.is-sheet .hs-plan__top {
    grid-area: top;
  }

  .hs .hs-plan.is-sheet .hs-plan__help {
    grid-area: help;
  }

  .hs .hs-plan.is-sheet .hs-plan__stage {
    grid-area: stage;
  }

  .hs .hs-plan.is-sheet .hs-plan__foot {
    grid-area: foot;
  }

  .hs .hs-plan.is-sheet .hs-plan__list {
    grid-area: list;
    max-height: none;
    min-height: 0;
    padding: 10px 12px 16px;
    border-top: 0;
    border-right: 1px solid var(--hs-line);
  }

  /* The legend on the hint's line, not a line of its own. */
  .hs .hs-plan.is-sheet .hs-plan__help {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 16px;
  }

  .hs .hs-plan.is-sheet .hs-plan__legend {
    margin-top: 0;
  }
}

/* A computer: a little more room for the names. */
@media (min-width: 1200px) {
  .hs .hs-plan.is-sheet .hs-plan__ax--top {
    height: 28px;
  }

  .hs .hs-plan.is-sheet .hs-plan__ax--l,
  .hs .hs-plan.is-sheet .hs-plan__ax--r {
    top: 28px;
    width: 34px;
  }

  .hs .hs-plan__axr {
    line-height: 28px;
  }
}

/* A phone: one plot strip (the left one); the plan keeps the width. */
@media (max-width: 699px) {
  .hs .hs-plan.is-sheet .hs-plan__ax--r {
    display: none;
  }
}

/* ── A SHORT SCREEN ON ITS SIDE (a phone held sideways, a short window): the plan gets the height
   (audit V-07). The hint row goes (the legend stays in the list's place on paper), the bars get
   slimmer, the list narrower beside the plan. ── */

@media (orientation: landscape) and (max-height: 560px) {
  .hs .hs-plan.is-sheet {
    display: grid;
    grid-template-columns: min(var(--hs-side-w, 300px), 34vw) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      'top top'
      'list stage'
      'list foot';
  }

  .hs .hs-plan.is-sheet .hs-plan__top {
    grid-area: top;
    padding: 4px 12px;
  }

  .hs .hs-plan.is-sheet .hs-plan__title {
    font-size: 16px;
  }

  .hs .hs-plan.is-sheet .hs-plan__meta {
    display: none;
  }

  .hs .hs-plan.is-sheet .hs-plan__help {
    display: none;
  }

  .hs .hs-plan.is-sheet .hs-plan__stage {
    grid-area: stage;
  }

  .hs .hs-plan.is-sheet .hs-plan__list {
    grid-area: list;
    max-height: none;
    min-height: 0;
    padding: 6px 8px;
    border-top: 0;
    border-right: 1px solid var(--hs-line);
  }

  .hs .hs-plan.is-sheet .hs-plan__foot {
    grid-area: foot;
    height: 53px; /* the 44px buttons and their padding; the same lit or not (R3-01) */
    min-height: 0;
    padding: 4px 8px;
  }

  .hs .hs-plan.is-sheet .hs-plan__open {
    min-height: 44px;
    padding: 2px 10px;
  }

  .hs .hs-plan.is-sheet .hs-plan__bar .hs-plan__item-t {
    min-height: 44px;
  }
}

/* ── PRINT (audit V-16): the whole section and its names, no buttons. plan.js marks the page
   .hs-plan-printing while the open plan prints (find.css hides the plan on a grave's print). ── */

@media print {
  .hs.hs-plan-printing .hs-plan.is-sheet:not([hidden]) {
    position: static !important;
    display: block !important;
    padding: 0;
    background: #fff;
  }

  .hs.hs-plan-printing .hs-find > :not(.hs-plan),
  .hs.hs-plan-printing .hs-footer {
    display: none !important;
  }

  .hs.hs-plan-printing .hs-plan__close,
  .hs.hs-plan-printing .hs-plan__hint,
  .hs.hs-plan-printing .hs-plan__foot,
  .hs.hs-plan-printing .hs-plan__ax,
  .hs.hs-plan-printing .hs-plan__tip,
  .hs.hs-plan-printing .hs-plan__info,
  .hs.hs-plan-printing .hs-plan__item-t,
  .hs .hs-ctx {
    display: none !important;
  }

  .hs.hs-plan-printing .hs-plan.is-sheet .hs-plan__top,
  .hs.hs-plan-printing .hs-plan.is-sheet .hs-plan__help {
    padding: 0 0 6px;
    border: 0;
  }

  .hs.hs-plan-printing .hs-plan.is-sheet .hs-plan__stage {
    position: static;
    height: auto;
    overflow: visible;
    border: 0;
    background: #fff;
  }

  /* The whole drawing (plan.js sets its viewBox), as wide as the page and never taller than it. */
  .hs.hs-plan-printing .hs-plan.is-sheet .hs-plan__svg {
    position: static;
    display: block;
    width: 100% !important;
    max-height: 9in;
    height: auto !important;
    margin: 0 auto;
    break-inside: avoid;
  }

  .hs.hs-plan-printing .hs-plan.is-sheet .hs-plan__axis {
    display: inline;
  }

  .hs.hs-plan-printing .hs-plan.is-sheet .hs-plan__list {
    max-height: none;
    overflow: visible;
    border: 0;
    padding: 8px 0 0;
  }

  .hs.hs-plan-printing .hs-plan__items {
    display: block;
    columns: 2;
  }

  .hs.hs-plan-printing .hs-plan__item {
    break-inside: avoid;
    margin-bottom: 4px;
  }

  .hs.hs-plan-printing .hs-plan__k,
  .hs.hs-plan-printing .hs-plan__item {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs .hs-plan__open,
  .hs .hs-plan__zbtn {
    transition: none;
  }
}

/* v2: the light on an empty plot (one rect over the path that draws them all). */
.hs .hs-plan__hl {
  pointer-events: none;
}

/* v2 fixes: what plan.js focuses after a tap or a click (the plan's title, the grave's box) shows no
   ring: a ring there tells a finger nothing. The keyboard gets Close / Back, with their ring. */
.hs .hs-plan__quiet:focus {
  outline: none;
}

/* Touch (phone and tablet): every control at least 44 px. */
@media (max-width: 1199px), (pointer: coarse) {
  .hs .hs-plan__close,
  .hs .hs-plan__back,
  .hs .hs-plan__loose-item,
  .hs .hs-plan__item-main,
  .hs .hs-plan__item-t {
    min-height: var(--hs-tap, 44px);
  }
}
