/*
 * HAR SHALOM — Section by Section: every plot of one section as its own box.
 *
 * File     public/harshalom/static/sections.css   (linked by app/harshalom/sections/page.tsx)
 * Version  0.007 · 2026-11-12 · harshalom/0.019-r4
 * Owner    Har Shalom release 0.015, lane survey-layout; release 0.016, lane sections; release 0.018,
 *          lane S (0.005); release 0.019, lane phone (0.006)
 * Markup   app/harshalom/sections/page.tsx, _parts/HsBoxSheet.tsx   Behaviour  static/js/sections.js
 *
 * The owner, 11 Nov 2026: "There has to be a layout in boxes, section by section." The section is a
 * table: the row letters across the top (A on the left, west), the plot numbers down both sides (plot
 * 1 at the top, north), a box per surveyed plot. A box with a grave is filled cream and names the
 * family; an empty box is plain white with its row and plot; a place with no plot is left bare.
 *
 * THREE EXPERIENCES. Computer (>= 1200px): the picker on the left, the section filling the rest of
 * the screen, scrolling inside itself (one screen, no page scroll). Tablet (700-1199px): the picker
 * over the section, the section the rest of the screen. Phone (< 700px): the title and the views, a
 * strip of sections, then the section one screen tall, scrolling both ways inside itself with the
 * row letters and the plot numbers held in view (sticky). Paper: one section on one page.
 *
 * LIGHT (DESIGN_V2): white boxes on the page colour, 1px lines, the green only as an accent, gold for
 * the box a link lights (#hs-box-F22, :target). Rule 40: the shell fills the screen; nothing caps it.
 *
 * Static file: no PostCSS, no nesting, no @import; every rule under .hs (BUILD_CONTRACT 5).
 *
 * EVERY NAME WHOLE (0.005, release 0.018). A box is at least as wide as its section's widest family name
 * needs (--hs-bx-w on the table, sections-model.ts boxRoom; --hs-bx-fit when static/js/sections.js
 * measured more), never cut with "…"; when that makes the section wider than its frame, it scrolls
 * sideways inside the frame (the row letters and plot numbers held). Paper keeps its own rules.
 *
 * A PHONE OPENS CLEAN (0.006, release 0.019). The owner, 11 Nov 2026: "on the mobile view ... instead of
 * having like a clean view with like buttons, it's like a whole bunch of empty fields". On a phone
 * (< 700px) where scripts run ((scripting: enabled)) and :has() is understood, the section opens with
 * where you are (the section's title and counts) and big buttons, 48px on a touch screen: See the
 * graves (the list, every whole name), Show the plots (the boxes) and Print. A part shows only once its
 * button is pressed (a link to its mark, .hs-boxes__at:target), one at a time, its twin button (×)
 * putting it away; a box an address names (#hs-box-F22) shows the boxes at once. Decided by width and
 * by what the browser says it can do, never by the user agent. With no JavaScript, from a tablet up
 * and on paper every rule below the marks' own is out of force: the page is 0.005's.
 *
 * CHANGELOG (Rule 45)
 *   0.007 · 2026-11-12 · harshalom/0.019-r4 (the lane phone check's one major, triage r3.json; Law 1) —
 *           with no surveyed section (the survey cleared or not yet imported) a phone hid the page's only
 *           message, "The plots are being laid out ... every grave is on the Cemetery Map": 0.006's
 *           phone hide of .hs-boxes__lead and .hs-boxes__loose is re-shown only through the sheet's
 *           marks, and with no section there is no sheet. The hide is now scoped to a page that draws
 *           a sheet (.hs-boxes:has(.hs-boxes__sheet)); the re-show rules still win (more specific).
 *           With a section, everything is as 0.006. Held: hs019-r4-sections-nosurvey.test.tsx.
 *   0.006 · 2026-11-12 · harshalom/0.019-phone (release 0.019, lane phone) — a phone opens clean (above):
 *           at 390x844 section 18 showed 32 boxes in its first screen, 25 of them empty, and no
 *           button; now its title, counts and three big buttons, the boxes or the list when asked for.
 *           New: .hs-boxes__at (the marks), __acts/__act (the buttons), __graves/__gl/__ga (the list);
 *           hidden by default, so a tablet, a computer, no JavaScript and paper are as 0.005. Hide
 *           goes back to the section's title with 8px of air above it (at 320px it sat 0.4px above
 *           the screen's top). The marks are drawn only on a phone, so an address naming one (a
 *           link to #hs-boxes-plots) moves nothing on a tablet or a computer.
 *   0.005 · 2026-11-11 · harshalom/0.018-sections (release 0.018, lane S, finding F6) — the owner, 11 Nov
 *           ("the names and everything. Terrible, horrible"): family names in the boxes were cut with
 *           "…" ("Kauf…", "Mendl…", "Wide…") at every width under 1920 (40 of 102 name lines in section
 *           18 at 1247x1222). Now whole: no ellipsis; each box at least the room its section's widest
 *           name needs (.hs-bx min-width with --hs-bx-w / --hs-bx-fit); a box's inside 3px a side (was
 *           4); a long Hebrew name 12px (.hs-bx__he--fit). The box's own name ("F22") 12px (was 11) and
 *           in the muted ink (was the faint grey). On paper every rule is as in 0.004.
 *   0.004 · 2026-11-11 · harshalom/0.016-sections (release 0.016, lane sections) — the live check of
 *           0.015 (11 Nov): (2) on paper the graves on no surveyed box were missing (the list sits in
 *           the picker's panel, which paper leaves out), though the printed count holds them: the
 *           page draws the list once more after the section (.hs-boxes__loose--paper), hidden on the
 *           screen and printed under the sheet, kept whole, on the same Letter page where it fits.
 *           (4) .hs-boxes__none, the line that says ?s= named no section (the away line's look).
 *   0.003 · 2026-11-11 · harshalom/0.015-fix2-map (second review, regression finding 6) — on an upright
 *           iPad the section chips were 38 px wide (820x1180) and 35 px (768x1024), under the site's
 *           44 px touch size: ten to a row while the picker's column has room for ten at 44 px, else as
 *           many as fit, each at least 44 px wide on any screen under 1200px and any touch screen. The
 *           views' links are 44 px tall there too (static/map.css).
 *   0.002 · 2026-11-11 · harshalom/0.015-survey, review fix 2 — .hs-boxes__away, the light line that
 *           says the section opened offline is not saved on this phone (static/js/sections.js).
 *   0.001 · 2026-11-11 · harshalom/0.015-survey, lane survey-layout — created.
 */

.hs .hs-boxes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px 16px;
}

.hs .hs-boxes__side {
  min-width: 0;
}

.hs .hs-boxes__h {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin: 0 0 10px;
  font-family: var(--hs-serif);
  font-size: var(--hs-h2);
  font-weight: 700;
  color: var(--hs-accent-ink);
}

.hs .hs-boxes__yi {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--hs-muted);
}

.hs .hs-boxes__lead {
  margin: 10px 0 0;
  font-size: var(--hs-fs-sm);
  line-height: 1.45;
  color: var(--hs-muted);
}

/* Review fix 2: the line static/js/sections.js shows when the phone answered with the page it keeps
   (offline, any ?s= is the bare page: section 1). Light, like a note, never an alarm. 0.004: the same
   look for the line the server writes when ?s= names no section (.hs-boxes__none: "There is no
   section 99, so Section 1 is shown."). */
.hs .hs-boxes__away,
.hs .hs-boxes__none {
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 1px solid #ecd9a6;
  border-radius: var(--hs-r);
  background: #fff8e6;
  font-size: var(--hs-fs-sm);
  line-height: 1.45;
  color: var(--hs-ink);
}

.hs .hs-boxes__away[hidden] {
  display: none;
}

.hs .hs-boxes__pick {
  margin-top: 12px;
}

.hs .hs-boxes__pick-h {
  margin: 0 0 6px;
  font-size: var(--hs-fs-sm);
  font-weight: 700;
  color: var(--hs-ink);
}

.hs .hs-boxes__pick-yi {
  font-weight: 600;
  color: var(--hs-muted);
}

.hs .hs-boxes__chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.hs .hs-boxes__chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--hs-line-2);
  border-radius: 8px;
  background: var(--hs-surface);
  color: var(--hs-accent-ink);
  text-decoration: none;
  line-height: 1.1;
}

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

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

.hs .hs-boxes__chip.is-sel {
  border-color: var(--hs-accent);
  background: var(--hs-accent);
  color: #fff;
}

.hs .hs-boxes__chip-n {
  font-size: 16px;
  font-weight: 700;
}

.hs .hs-boxes__chip-c {
  font-size: var(--hs-fs-min, 13px);
  opacity: 0.8;
}

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

.hs .hs-boxes__li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hs .hs-boxes__k {
  display: inline-block;
  width: 22px;
  height: 14px;
  border: 1px solid var(--hs-line-2);
  border-radius: 3px;
  background: var(--hs-surface);
}

.hs .hs-boxes__k--full {
  border-color: #d9c38a;
  background: #fff3d1;
}

.hs .hs-boxes__loose {
  margin-top: 12px;
}

.hs .hs-boxes__loose-h {
  margin: 0 0 4px;
  font-size: var(--hs-fs-sm);
  font-weight: 700;
}

.hs .hs-boxes__loose-l {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: var(--hs-fs-sm);
  line-height: 1.5;
}

.hs .hs-boxes__loose-l a {
  color: var(--hs-accent-ink);
}

.hs .hs-boxes__loose-w {
  color: var(--hs-muted);
}

/* 0.004: the same list once more after the section, for paper only (see PAPER). */
.hs .hs-boxes__loose--paper {
  display: none;
}

.hs .hs-boxes__print {
  margin-top: 14px;
}

/* ── the section ─────────────────────────────────────────────────────────── */

.hs .hs-boxes__sheet {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  scroll-margin-top: calc(var(--hs-sticky-top, 0px) + 8px);
}

.hs .hs-boxes__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 14px;
  margin: 0 2px 8px;
}

.hs .hs-boxes__title {
  margin: 0;
  font-family: var(--hs-serif);
  font-size: var(--hs-h2);
  font-weight: 700;
  color: var(--hs-accent-ink);
}

.hs .hs-boxes__title-he {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--hs-muted);
}

.hs .hs-boxes__meta,
.hs .hs-boxes__compass {
  margin: 0;
  font-size: var(--hs-fs-min, 13px);
  color: var(--hs-muted);
}

.hs .hs-boxes__compass {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

/* One screen tall at most, scrolling inside itself both ways (the headers held in view). */
.hs .hs-boxes__scroll {
  position: relative;
  min-height: 0;
  max-height: calc(100dvh - var(--hs-sticky-top, 0px) - var(--hs-callbar-h, 0px) - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--hs-line);
  border-radius: 8px;
  background: var(--hs-bg);
  -webkit-overflow-scrolling: touch;
}

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

.hs .hs-bx {
  /* the rows across: at least 58px each, wider when the screen has room */
  width: 100%;
  min-width: calc(var(--hs-bx-n, 18) * 60px + 72px);
  /* 0.005: and at least the room the section's widest name needs (HsBoxSheet --hs-bx-w; sections.js
     --hs-bx-fit when this browser draws it wider), so every name reads whole. A browser without max()
     keeps the line above. */
  min-width: calc(
    var(--hs-bx-n, 18) * max(60px, var(--hs-bx-fit, var(--hs-bx-w, 0px))) + 72px
  );
  border-collapse: separate;
  border-spacing: 2px;
  table-layout: fixed;
  font-size: var(--hs-fs-min, 13px);
}

.hs .hs-bx th {
  padding: 0;
  font-weight: 700;
  color: var(--hs-accent-ink);
  background: var(--hs-bg);
}

/* The row letters, held at the top while the section scrolls. */
.hs .hs-bx thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 26px;
  border-bottom: 1px solid var(--hs-line-2);
}

.hs .hs-bx__corner {
  width: 34px;
}

/* The plot numbers, held at the left (and repeated at the right) while it scrolls sideways. */
.hs .hs-bx__plot {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 34px;
  font-size: var(--hs-fs-min, 13px);
  text-align: center;
}

.hs .hs-bx__plot--end {
  position: static;
  color: var(--hs-faint);
}

.hs .hs-bx thead .hs-bx__corner:first-child {
  left: 0;
  z-index: 3;
}

/* An empty line of plots is short; a line with a grave grows to its 44px link (the touch floor). */
.hs .hs-bx__c,
.hs .hs-bx__no {
  height: 32px;
  padding: 0;
  vertical-align: top;
}

.hs .hs-bx__c {
  position: relative;
  border: 1px solid var(--hs-line-2);
  border-radius: 4px;
  background: var(--hs-surface);
  scroll-margin: 40px 40px;
}

.hs .hs-bx__c.is-full {
  border-color: #d9c38a;
  background: #fff3d1;
}

/* A box with a grave: its name ("F22"), the Hebrew family name, the English under it (two children
   in one plot: one Hebrew name a line). Three tight lines: about the 44px touch floor. 0.005: 3px
   inside a side (sections-model.ts HS_BOX_PAD), and nothing in it is cut: the box is as wide as its
   names need (.hs-bx min-width). */
.hs .hs-bx__a {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  min-height: 44px;
  padding: 2px 3px 3px;
  border-radius: 3px;
  color: var(--hs-ink);
  text-decoration: none;
}

.hs .hs-bx__a:hover {
  background: #ffe9a8;
}

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

/* The box's own name, "F22", in the corner. 0.005: 12px in the muted ink (11px faint grey before). */
.hs .hs-bx__k {
  display: block;
  padding: 2px 3px 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--hs-muted);
  font-variant-numeric: tabular-nums;
}

.hs .hs-bx__a .hs-bx__k {
  padding: 0;
  color: #8c6a1c;
}

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

/* 0.005: a family name is one line and whole, never cut with "…" (the box is made wide enough). */
.hs .hs-bx__he,
.hs .hs-bx__en {
  display: block;
  white-space: nowrap;
  line-height: 1.2;
}

.hs .hs-bx__he {
  font-family: var(--hs-serif);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  text-align: right;
}

/* 0.005: a Hebrew name 13px would not fit (sections-model.ts boxHeSmall): 12px, the least. */
.hs .hs-bx__he--fit {
  font-size: 12px;
}

.hs .hs-bx__en {
  font-size: 12px;
  line-height: 1.15;
  color: var(--hs-muted);
}

/* Two children in one plot: two lines of names, a little smaller. */
.hs .hs-bx__c.is-two .hs-bx__en {
  display: none;
}

/* The box a link names (#hs-box-F22): lit gold, as the map lights a chosen grave. */
.hs .hs-bx__c:target {
  border-color: var(--hs-gold);
  box-shadow:
    0 0 0 2px #f5c84c,
    0 0 0 4px rgba(184, 137, 43, 0.25);
}

.hs .hs-bx__c:target .hs-bx__k {
  color: var(--hs-ink);
}

/* ── THE PHONE'S PARTS (0.006): drawn on every page, shown only on a phone (below) ── */

/* The buttons and the list: never shown from a tablet up, with no JavaScript, or on paper. */
.hs .hs-boxes__acts,
.hs .hs-boxes__graves {
  display: none;
}

/* The marks the buttons open (#hs-boxes-graves, #hs-boxes-plots): empty, at the head of the section.
   Not drawn here, so an address that names one moves nothing on a tablet or a computer (:target
   still matches); on a phone (below) they take no room and a button brings the section's title to
   the top of the screen. */
.hs .hs-boxes__at {
  display: none;
}

/* ── TABLET (700-1199px): the picker over the section ────────────────────── */

@media (min-width: 700px) {
  .hs .hs-boxes {
    gap: 12px;
    padding: 12px 16px;
  }

  .hs .hs-boxes__side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    column-gap: 18px;
    align-items: start;
  }

  .hs .hs-boxes__h,
  .hs .hs-boxes__side > .hs-views,
  .hs .hs-boxes__lead {
    grid-column: 1;
  }

  .hs .hs-boxes__pick {
    grid-column: 2;
    grid-row: 1 / span 4;
    margin-top: 0;
  }

  .hs .hs-boxes__chips {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    /* 0.003: ten to a row only while ten fit at 44 px (each at least a tenth of the row, less the
       gaps: a hair under, so rounding never makes it nine); a narrower picker (an upright iPad) takes
       as many 44 px chips as fit, in one row more. A browser without max() keeps the line above. */
    grid-template-columns: repeat(
      auto-fill,
      minmax(max(var(--hs-tap, 44px), (100% - 54px) / 10 - 0.1px), 1fr)
    );
  }

  .hs .hs-boxes__legend,
  .hs .hs-boxes__loose,
  .hs .hs-boxes__print {
    grid-column: 1 / -1;
  }

  .hs .hs-boxes__print {
    justify-self: start;
  }
}

/* Any screen under a computer's width and any touch screen: a chip is at least 44 px wide (0.003). */
@media (max-width: 1199px), (pointer: coarse) {
  .hs .hs-boxes__chip {
    min-width: var(--hs-tap, 44px);
  }
}

/* ── COMPUTER (>= 1200px): the picker on the left, the section the rest of one screen ─ */

@media (min-width: 1200px) {
  .hs .hs-boxes {
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    align-items: stretch;
    height: calc(100dvh - var(--hs-sticky-top, 0px));
    min-height: 560px;
  }

  .hs .hs-boxes__side {
    display: block;
    overflow: auto;
  }

  .hs .hs-boxes__pick {
    margin-top: 12px;
  }

  .hs .hs-boxes__chips {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .hs .hs-boxes__sheet {
    min-height: 0;
  }

  .hs .hs-boxes__scroll {
    flex: 1 1 auto;
    max-height: none;
  }

  .hs .hs-bx {
    min-width: calc(var(--hs-bx-n, 18) * 52px + 72px);
    /* 0.005: and the room the widest name needs, as above */
    min-width: calc(
      var(--hs-bx-n, 18) * max(52px, var(--hs-bx-fit, var(--hs-bx-w, 0px))) + 72px
    );
  }

  /* A mouse: an empty line of plots is shorter still. */
  .hs .hs-bx__c,
  .hs .hs-bx__no {
    height: 28px;
  }
}

/* ── PHONE (< 700px): a strip of sections, the section one screen tall ────── */

@media (max-width: 699px) {
  .hs .hs-boxes__side {
    padding: 10px 12px;
  }

  .hs .hs-boxes__side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
  }

  .hs .hs-boxes__h {
    margin: 0;
  }

  .hs .hs-boxes__lead,
  .hs .hs-boxes__away,
  .hs .hs-boxes__none,
  .hs .hs-boxes__pick,
  .hs .hs-boxes__legend,
  .hs .hs-boxes__loose,
  .hs .hs-boxes__print {
    grid-column: 1 / -1;
  }

  .hs .hs-boxes__lead {
    margin-top: 8px;
  }

  .hs .hs-boxes__pick-h,
  .hs .hs-boxes__legend,
  .hs .hs-boxes__print {
    display: none;
  }

  .hs .hs-boxes__chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .hs .hs-boxes__chip {
    flex: 0 0 48px;
  }

  .hs .hs-boxes__compass {
    margin-left: 0;
  }
}

/* ── PHONE, OPENED CLEAN (0.006): where you are, then big buttons ────────────────
   Only where the browser can test :has() (else the boxes stay the page, as 0.005) and says scripts
   run (with no JavaScript, as 0.005). The parts open by :target, with no script of their own. */

@supports selector(:has(*)) {
  @media screen and (max-width: 699px) and (scripting: enabled) {
    /* The side keeps the title, the views and the strip of sections; its lead (about the boxes) and
       the graves on no box (they are in the list) wait for the buttons. Only on a page that draws a
       section (0.007): with no surveyed section there is no sheet and no button, and the lead is the
       page's one message ("The plots are being laid out ... every grave is on the Cemetery Map"). */
    .hs .hs-boxes:has(.hs-boxes__sheet) .hs-boxes__side .hs-boxes__lead,
    .hs .hs-boxes:has(.hs-boxes__sheet) .hs-boxes__side .hs-boxes__loose {
      display: none;
    }

    .hs .hs-boxes:has(.hs-boxes__at--plots:target) .hs-boxes__side .hs-boxes__lead,
    .hs .hs-boxes:has(.hs-bx__c:target) .hs-boxes__side .hs-boxes__lead {
      display: block;
    }

    .hs .hs-boxes__acts {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 8px;
      margin: 2px 0 10px;
    }

    .hs .hs-boxes__at {
      display: block;
      height: 0;
      overflow: hidden;
      scroll-margin-top: calc(var(--hs-sticky-top, 0px) + 8px);
    }

    /* Hide goes back to the section's title (#hs-boxes-title): a little air above it. */
    .hs .hs-boxes__title {
      scroll-margin-top: calc(var(--hs-sticky-top, 0px) + 8px);
    }

    .hs .hs-boxes__act {
      display: flex;
      justify-content: flex-start;
      gap: 10px;
      width: 100%;
      min-height: 48px;
      padding: 10px 14px;
      font-size: 16px;
      font-weight: 600;
      line-height: 1.25;
      text-align: left;
      color: var(--hs-accent-ink);
      background: var(--hs-surface);
    }

    .hs .hs-boxes__act-t {
      flex: 1 1 auto;
      min-width: 0;
    }

    .hs .hs-boxes__act-go {
      flex: 0 0 auto;
      font-size: 22px;
      line-height: 1;
      color: var(--hs-muted);
    }

    .hs .hs-boxes__act[hidden],
    .hs .hs-boxes__act.hs-boxes__act--x {
      display: none;
    }

    /* Nothing asked for: the boxes and the compass above them wait for their button. */
    .hs
      .hs-boxes__sheet:not(:has(.hs-bx__c:target))
      > .hs-boxes__at--plots:not(:target)
      ~ .hs-boxes__scroll,
    .hs
      .hs-boxes__sheet:not(:has(.hs-bx__c:target))
      > .hs-boxes__at--plots:not(:target)
      ~ .hs-boxes__top
      .hs-boxes__compass {
      display: none;
    }

    /* The list asked for: under the buttons; its button becomes "Hide the graves". */
    .hs .hs-boxes__at--graves:target ~ .hs-boxes__graves {
      display: block;
    }

    .hs .hs-boxes__at--graves:target ~ .hs-boxes__acts .hs-boxes__act--graves {
      display: none;
    }

    .hs .hs-boxes__at--graves:target ~ .hs-boxes__acts .hs-boxes__act--graves-x,
    .hs .hs-boxes__graves .hs-boxes__act.hs-boxes__gx {
      display: flex;
    }

    /* The boxes asked for (their button, or a box an address names): "Hide the plots". */
    .hs .hs-boxes__at--plots:target ~ .hs-boxes__acts .hs-boxes__act--plots,
    .hs .hs-boxes__sheet:has(.hs-bx__c:target) .hs-boxes__acts .hs-boxes__act--plots {
      display: none;
    }

    .hs .hs-boxes__at--plots:target ~ .hs-boxes__acts .hs-boxes__act--plots-x,
    .hs .hs-boxes__sheet:has(.hs-bx__c:target) .hs-boxes__acts .hs-boxes__act--plots-x {
      display: flex;
    }

    /* The list: one row a grave, the whole Hebrew name, the English under it, where it lies. */
    .hs .hs-boxes__gl {
      margin: 0;
      padding: 0;
      list-style: none;
      border: 1px solid var(--hs-line);
      border-radius: 8px;
      background: var(--hs-surface);
    }

    .hs .hs-boxes__gl > li + li {
      border-top: 1px solid var(--hs-line);
    }

    .hs .hs-boxes__ga {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-height: 48px;
      padding: 8px 12px;
      color: var(--hs-ink);
      text-decoration: none;
      overflow-wrap: anywhere;
    }

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

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

    .hs .hs-boxes__ga-he {
      font-family: var(--hs-serif);
      font-size: 17px;
      font-weight: 700;
      line-height: 1.3;
      text-align: right;
    }

    .hs .hs-boxes__ga-en {
      font-size: 15px;
      font-weight: 600;
      line-height: 1.3;
      color: var(--hs-accent-ink);
    }

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

    .hs .hs-boxes__graves .hs-boxes__gx {
      margin-top: 10px;
    }
  }
}

/* ── PAPER: one section on one page ──────────────────────────────────────── */

@media print {
  @page {
    size: letter portrait;
    margin: 0.35in;
  }

  .hs .hs-boxes {
    display: block;
    height: auto;
    padding: 0;
  }

  .hs .hs-boxes__side,
  .hs .hs-boxes__compass {
    display: none;
  }

  /* 0.006: the phone's marks take no room on paper (the buttons and the list are never printed). */
  .hs .hs-boxes__at {
    display: none;
  }

  .hs .hs-boxes__sheet {
    display: block;
    padding: 0;
    border: 0;
    box-shadow: none;
    break-inside: avoid;
  }

  .hs .hs-boxes__top {
    margin: 0 0 4pt;
  }

  .hs .hs-boxes__title {
    font-size: 13pt;
  }

  .hs .hs-boxes__meta {
    font-size: 8pt;
  }

  .hs .hs-boxes__scroll {
    max-height: none;
    overflow: visible;
    border: 0;
    background: #fff;
  }

  .hs .hs-bx {
    min-width: 0;
    border-spacing: 1pt;
    font-size: 6pt;
  }

  .hs .hs-bx thead th {
    position: static;
    height: auto;
    font-size: 7pt;
    background: #fff;
  }

  .hs .hs-bx__plot {
    position: static;
    width: 16pt;
    font-size: 6.5pt;
    background: #fff;
  }

  .hs .hs-bx__corner {
    width: 16pt;
  }

  .hs .hs-bx__c,
  .hs .hs-bx__no {
    height: 17pt;
  }

  .hs .hs-bx__c {
    border-color: #999;
    border-radius: 1pt;
    box-shadow: none;
  }

  .hs .hs-bx__c.is-full {
    border-color: #8c6a1c;
    background: #fff3d1;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .hs .hs-bx__a {
    min-height: 0;
    padding: 0.5pt 1.5pt;
    /* as in 0.004: paper keeps one section on one page, its boxes as narrow as they were */
    overflow: hidden;
  }

  .hs .hs-bx__k {
    padding: 0.5pt 1.5pt 0;
    font-size: 5.5pt;
    color: #666;
  }

  /* A filled box: the names only (the row and plot are in the margins). */
  .hs .hs-bx__a .hs-bx__k {
    display: none;
  }

  .hs .hs-bx__he,
  .hs .hs-bx__en {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hs .hs-bx__he {
    font-size: 6.5pt;
  }

  .hs .hs-bx__en {
    font-size: 5.5pt;
    color: #333;
  }

  /* 0.004: the graves on no surveyed box, under the sheet (the picker's panel is left out), whole,
     on the sheet's page when they fit there. */
  .hs .hs-boxes__loose--paper {
    display: block;
    margin: 8pt 0 0;
    break-inside: avoid;
  }

  .hs .hs-boxes__loose--paper .hs-boxes__loose-h {
    margin: 0 0 2pt;
    font-size: 9pt;
  }

  .hs .hs-boxes__loose--paper .hs-boxes__loose-l {
    padding-left: 12pt;
    font-size: 8pt;
    line-height: 1.4;
  }

  .hs .hs-boxes__loose--paper a {
    color: #000;
    text-decoration: none;
  }

  .hs .hs-boxes__loose--paper .hs-boxes__loose-w {
    color: #333;
  }
}
