/*
 * HAR SHALOM CEMETERY — one grave's own page (/harshalom/plot/<cell>).
 *
 * Module   public/harshalom/static/plot.css  (linked as /harshalom/static/plot.css)
 * Owner    lane S (Search a Name, the full map, the grave view, grave pages, the plan)
 *
 * Only the page's own layout; the grave is styled in static/find.css and the map in
 * static/map.css, which this page links too. All static files (not bundler imports) so the
 * offline worker can keep them. Every rule under `.hs`.
 *
 * v2 (owner, 29 Oct 2026), three layouts:
 *   phone     the grave first, then the map (a good part of the screen), one column;
 *   tablet    the grave on the left, the map on the right, one screen;
 *   computer  the same, wider; the grave column capped so the names stay readable
 *             (fullbleed-ok), the map filling the rest (Rule 40).
 *
 * CHANGELOG (Rule 45)
 *   2026-11-02 feat/harshalom-v3-audit, review fix F1 — the tablet rule that lets the map fill its
 *     pane is for the screen only, so the grave's page prints its map on Letter and A4 (R3-02).
 *   2026-11-02 feat/harshalom-v3-audit, lane L3 — audit V-07: the map fills its pane on a tablet and an
 *     iPad on its side (it opens zoomed on the grave, so no grey bands; the photo-shaped stamp is gone),
 *     and a short screen on its side (a phone sideways) keeps grave | map side by side, the map as tall
 *     as the screen. V-54: on a computer the grave's column takes two fifths of the width (at least
 *     --hs-side-w), so a wide one lays out its photo beside the names and its actions in a row
 *     (find.css). V-16: print shows the map under the grave (find.css). 44 px back link on any touch
 *     screen; 13 px text floor.
 *   2026-10-29 feat/harshalom-v2-light, fix lane "find" — the v2 reviews: on a tablet the map is
 *     the photo's own shape (no grey bands); "Search another name" is 44 px below a computer.
 *   2026-10-29 feat/harshalom-v2-light, lane S — v2: light, two panes from a tablet, one screen.
 *   2026-10-28 feat/harshalom-cemetery-site, lane P — moved from app/harshalom/plot/[code]/
 *     to public/harshalom/static/ (linked, not imported: offline).
 *   2026-10-28 feat/harshalom-cemetery-site, fixer "find" — the page has the call bar
 *     now: the sticky map card stops above it (--hs-find-bottom), as on the finder.
 *   2026-10-28 feat/harshalom-cemetery-site, lane B1 — created.
 */

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

.hs .hs-plot__col {
  min-width: 0;
  padding: 14px 16px 18px;
}

.hs .hs-plot__again {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin: -4px 0 6px -6px;
  padding: 2px 8px;
  border-radius: 8px;
  color: var(--hs-accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

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

.hs .hs-plot__again [lang] {
  color: var(--hs-muted);
  font-weight: 500;
}

.hs .hs-plot__h {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hs-line);
  font-family: var(--hs-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--hs-accent);
  text-transform: uppercase;
}

.hs .hs-plot__h:focus {
  outline: none;
}

.hs .hs-plot__two {
  margin: 0 0 10px;
  font-size: var(--hs-fs-min, 13px);
  font-weight: 600;
  color: var(--hs-muted);
}

.hs .hs-plot__grave + .hs-plot__grave {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hs-line);
}

.hs .hs-plot__map .hs-mapcard {
  height: 72dvh;
  min-height: 360px;
}

@media (min-width: 700px) {
  .hs .hs-plot {
    grid-template-columns: minmax(max(320px, var(--hs-side-w)), 400px) minmax(0, 1fr); /* fullbleed-ok: the grave column */
    grid-template-rows: minmax(0, 1fr);
    align-content: stretch;
    gap: 14px;
    height: calc(100dvh - var(--hs-sticky-top));
    min-height: 560px;
    padding: 12px 16px;
  }

  .hs .hs-plot__col {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .hs .hs-plot__map {
    display: flex;
    min-height: 0;
  }

  .hs .hs-plot__map .hs-mapcard {
    flex: 1;
    height: auto;
    min-height: 0;
  }
}

/* Tablet (upright or on its side): the map fills its pane. A grave's page opens it zoomed on the
   grave (map.js graveZoom covers the box), so there are no grey bands to avoid, and the v2
   photo-shaped box was a stamp on an iPad held sideways (V-07). The screen only: a sheet of paper
   700-1199px wide matched it and printed the map 2px tall (review R3-02). */
@media screen and (min-width: 700px) and (max-width: 1199px) {
  .hs .hs-plot__map .hs-map {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    margin-inline: 0;
    aspect-ratio: auto;
  }
}

/* An iPad on its side: the grave's column a little wider, so a long name reads on one line. */
@media (min-width: 900px) and (max-width: 1199px) and (orientation: landscape) {
  .hs .hs-plot {
    grid-template-columns: minmax(var(--hs-side-w), 2fr) minmax(0, 3fr); /* fullbleed-ok: the grave column */
  }
}

/* A short screen on its side (a phone sideways, under 561 tall): grave | map, both the screen's
   height (the header scrolls away, hs.css V-29); map.css gives the map its height. */
@media (min-width: 700px) and (max-height: 560px) {
  .hs .hs-plot {
    grid-template-columns: minmax(280px, 1fr) minmax(0, 1.2fr); /* fullbleed-ok: the grave column */
    height: 100dvh;
    min-height: 0;
    padding-block: 8px;
  }
}

/* Touch (phone, tablet, any touch screen): the way back is a 44 px target. */
@media (max-width: 1199px), (pointer: coarse) {
  .hs .hs-plot__again {
    min-height: var(--hs-tap, 44px);
  }
}

/* Computer: the grave's column two fifths of the width (from --hs-side-w, wider on a big screen):
   a wide one puts the photo beside the names and the actions in a row (V-54, find.css). */
@media (min-width: 1200px) {
  .hs .hs-plot {
    grid-template-columns: minmax(var(--hs-side-w), 2fr) minmax(0, 3fr); /* fullbleed-ok: the grave column */
    padding: 14px 20px;
  }
}

@media print {
  .hs .hs-plot {
    display: block;
    height: auto;
    padding: 0;
  }

  .hs .hs-plot__col {
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  /* The map under the grave (find.css shows it): its card's frame off. */
  .hs .hs-plot__map .hs-mapcard {
    height: auto;
  }
}
