/*
 * HAR SHALOM — Membership Application: the choice, the live form, its actions, the answer, and
 * the print layout.
 *
 * Module   public/harshalom/static/apply.css  (served at /harshalom/static/apply.css)
 * Version  0.010 · 2026-11-11 · harshalom/0.018-pagesB (the count of its changelog entries; no line
 *          before 0.010)
 * Owner    lane M (messages and forms); was lane B4
 * Linked   by app/harshalom/apply/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 form came up unstyled offline. Served exactly as written (no PostCSS), so a rule
 * that needs a vendor prefix carries it here (`-webkit-appearance`).
 *
 * Every rule is scoped under `.hs` (BUILD_CONTRACT 5); the page's own classes start
 * with `ap-`. Tokens and the shared pieces (.hs-panel, .hs-btn, .hs-input) are lane D's
 * (static/hs.css, DESIGN_V2): light, quiet, proportionate; no text on a solid red or green.
 *
 * THREE LAYOUTS (OWNER_FEEDBACK item 11), on the site's shared breakpoints (hs.css):
 *   phone    < 700px      one column: the live form's card first, the paper second; the form in
 *                         five steps (Back / Next), its actions on the last; a paper card's size
 *                         line under its title
 *   tablet   700-1199px   the choice side by side; the form beside a narrow sticky actions panel
 *                         (Send, Print, Download in view), fields in two columns; a paper card's
 *                         size line under its title (it wrapped the Yiddish title to three lines)
 *   computer >= 1200px    the same, wider: fields in three columns, the paper card on one row
 *
 * THE STATE IS IN ATTRIBUTES. public/harshalom/static/js/apply.js never writes text;
 * it sets data-ap-* on the page root and data-error on a field, and these rules show
 * what each state needs. No words in CSS.
 *
 * CHANGELOG (Rule 45)
 *   2026-11-11 harshalom/0.018-pagesB (0.010) — R11: the side panel's paper link, its English over its
 *     Yiddish, each one line (side by side each half wrapped to two lines of two words, 768-1600px).
 *   2026-11-02 fix/hs-phone-tidy (v3.1, ticket #1696) — the phone's Back / Next is one flush strip on the
 *     call bar (was a floating card 8px above it with the step's text showing around it).
 *   2026-11-02 fix/hs-phone-tidy (v3.1, polish c) — the signature's error shows the device's words
 *     (.ap-err__dev--touch / --mouse, by the pointer, as the pad's placeholder).
 *   2026-10-28 feat/harshalom-cemetery-site, lane B4 — created.
 *   2026-10-28 review fixes — the Back pill's words left this file: page.tsx writes
 *     its `content` from AP_UI.back.
 *   2026-10-28 review round 2, lane X — moved from app/harshalom/apply/ to a static file
 *     the page links and the worker precaches; the Back pill is two real labels from
 *     HsHead (`hs-pill__home`, `hs-pill__back`) swapped by the view, no ::after; the
 *     -webkit-appearance the bundler used to add is written out.
 *   2026-10-29 feat/harshalom-v2-light, lane M — rewritten light (DESIGN_V2): the live form
 *     first, the actions panel, the three answers, the fallback when the site cannot be
 *     reached, three layouts, and @media print for a clean printed application.
 *   2026-10-29 feat/harshalom-v2-light, shell fix lane — the landing's button is a normal one-line
 *     primary (40px computer / 44px phone and tablet), David's sentence beside it, not a big
 *     two-line green block (owner item 1); the shared 700/1200 breakpoints instead of 1000px; the
 *     paper cards stack their size line on a phone and a tablet; the "not active yet" notice's
 *     place; a held application opens the "send it yourself" ways.
 *   2026-11-02 feat/harshalom-v3-audit, lane L4 — audits V-12, V-32, V-55 and the v3 tokens: the
 *     switch's line sits under "Send to the office" (no block above the views); on a phone the
 *     live form is five steps (data-ap-step / data-ap-in, the step line, a Back / Next bar kept
 *     in thumb reach while no box is being typed in); the pad's words follow the pointer (finger
 *     or mouse) and "I can't sign on the screen" never prints; the text fields keep hs.css's one
 *     focus ring (no outline:none, no glow); 44px touch targets (choices, links, Copy, buttons),
 *     the 13px text floor, the regulations and instructions capped at --hs-prose-max, the boxes at
 *     --hs-field-max and four columns from 1800px, the signature pad at 900px (Rule 40: the
 *     page still fills the screen).
 *   2026-11-02 feat/harshalom-v3-audit, review fix F3 — the regulations' "Sources" opens from a
 *     44px target on a touch screen and up to a tablet (R2-14: it was 23px tall).
 */

/* ── which view (set before first paint from the hash) ──────────────────── */

.hs.hs-ap[data-ap='form'] .ap-choice,
.hs.hs-ap:not([data-ap='form']) .ap-formview {
  display: none;
}

/* On the form the head's pill goes back to the choice page: "צוריק · Back"
   (TAB_SITE_SPEC §12.1). HsHead draws both labels (page.tsx passes AP_UI.back with
   `alongHome`); the back one starts `hidden`, and the form view swaps them. */
.hs.hs-ap[data-ap='form'] .hs-head .hs-pill__home {
  display: none;
}

.hs.hs-ap[data-ap='form'] .hs-head .hs-pill__back[hidden] {
  display: inline;
}

.hs .ap-main {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 12px 12px 24px;
}

.hs .ap-noscript {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 14px;
}

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

/* ── shared bits ────────────────────────────────────────────────────────── */

/* A card title: English, the Yiddish beside it (CardHead draws the Yiddish first). */
.hs .ap-h2,
.hs .ap-h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin: 0 0 10px;
  font-family: var(--hs-serif);
  line-height: 1.25;
  color: var(--hs-accent-ink);
}

.hs .ap-h2 {
  font-size: var(--hs-h2);
}

.hs .ap-h3 {
  margin: 4px 0 6px;
  font-size: 16px;
}

.hs .ap-h__en {
  order: 1;
  font-weight: 700;
}

.hs .ap-h__yi {
  order: 2;
  font-size: 0.85em;
  font-weight: 600;
  color: var(--hs-muted);
}

.hs .ap-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--hs-muted);
}

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

.hs .ap-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--hs-accent);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

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

/* ── the choice ─────────────────────────────────────────────────────────── */

.hs .ap-choice {
  display: grid;
  gap: 12px;
  align-items: start;
}

.hs .ap-online-card {
  display: grid;
  gap: 12px;
}

.hs .ap-online-card .hs-panel__h {
  margin: 0;
}

.hs .ap-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs .ap-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.hs .ap-steps__n {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--hs-accent);
  border-radius: 50%;
  background: var(--hs-accent-soft);
  color: var(--hs-accent-ink);
  font-size: 13px;
  font-weight: 700;
}

.hs .ap-steps__t [lang='yi'] {
  display: block;
  font-family: var(--hs-serif);
  font-size: 0.92em;
  color: var(--hs-muted);
}

/* David's sentence, just above the button it points to. */
.hs .ap-online-lead {
  /* fullbleed-ok: a sentence keeps a readable length (Rule 40); the card still fills */
  max-inline-size: var(--hs-prose-max);
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.hs .ap-online-lead [lang='yi'] {
  display: block;
  font-family: var(--hs-serif);
  color: var(--hs-muted);
}

/* The landing's one main action: a normal, one-line primary button (owner item 1: no big
   two-line green block). Its height is .hs-btn's (44px phone and tablet, 40px computer). */
.hs .ap-online {
  justify-self: stretch;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}

.hs .ap-online__yi {
  font-family: var(--hs-serif);
  font-weight: 500;
}

.hs .ap-online-note {
  margin: 0;
  font-size: var(--hs-fs-sm);
  color: var(--hs-muted);
}

.hs .ap-online-note [lang='yi'] {
  display: block;
  font-family: var(--hs-serif);
}

/* The "not active yet" notice (HsOffNotice, static/contact.css), above both views. */
.hs .ap-off {
  margin: 0;
}

.hs .ap-dl .hs-panel__h {
  margin-bottom: 6px;
}

/* Phone and tablet: the icon, then the title with the size line under it (on one row, the
   Yiddish title wrapped to three lines on a tablet). One row from a computer up. */
.hs .ap-pdf {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 10px;
  min-height: 52px;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid var(--hs-line-2);
  border-radius: var(--hs-r);
  background: var(--hs-surface);
  color: var(--hs-accent-ink);
  text-decoration: none;
}

.hs .ap-pdf:hover {
  border-color: var(--hs-accent);
  background: var(--hs-accent-soft);
}

.hs .ap-pdf__txt {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.hs .ap-pdf__yi {
  justify-self: start;
  font-family: var(--hs-serif);
  font-size: 15px;
  font-weight: 600;
  text-align: start;
}

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

.hs .ap-pdf > svg {
  grid-row: span 2;
}

.hs .ap-pdf__note {
  grid-column: 2;
  font-size: var(--hs-fs-min);
  color: var(--hs-faint);
  white-space: nowrap;
}

.hs .ap-hint {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--hs-line);
  font-size: 14px;
}

.hs .ap-hint p {
  margin: 0;
}

.hs .ap-hint__yi {
  font-family: var(--hs-serif);
  color: var(--hs-muted);
}

.hs .ap-hint__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.hs .ap-hint__k {
  color: var(--hs-muted);
}

.hs .ap-hint__fax {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ── the form view: the form, and its actions beside or under it ────────── */

.hs .ap-formview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.hs .ap-print-head {
  display: none;
}

.hs .ap-formcol {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.hs .ap-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

/* The honeypot: off-screen for everyone, not merely invisible. */
.hs .ap-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hs .ap-card {
  min-width: 0;
}

.hs .ap-card + .ap-card {
  margin-top: 0;
}

.hs .ap-instr {
  display: grid;
  gap: 4px;
  /* fullbleed-ok: instructions keep a readable line length (Rule 40); the card around them fills. */
  max-inline-size: var(--hs-prose-max);
  margin: 0 0 8px;
  padding-inline-start: 20px;
  font-size: 14px;
  line-height: 1.45;
}

.hs .ap-instr--yi {
  font-family: var(--hs-serif);
  font-size: 15px;
}

.hs .ap-instr--en {
  margin-bottom: 0;
  color: var(--hs-muted);
}

/* the fields: one column on a phone, two from a tablet, three on a wide screen */
.hs .ap-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px 16px;
}

.hs .ap-field {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.hs .ap-check + .ap-field,
.hs .ap-check + .ap-grid {
  margin-top: 12px;
}

/* label: English at the start, the Yiddish at the end of the same line */
.hs .ap-lab {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.hs .ap-lab__en {
  order: 1;
  font-weight: 600;
  color: var(--hs-ink);
}

.hs .ap-lab__yi {
  order: 2;
  /* physical: the Yiddish span is dir=rtl, where "inline-start" would be its right */
  margin-left: auto;
  font-family: var(--hs-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--hs-muted);
}

.hs .ap-req {
  color: var(--hs-red);
  font-weight: 700;
}

.hs .ap-in {
  display: block;
  width: 100%;
  /* fullbleed-ok: a box no wider than what it holds (Rule 40: the grid around it fills). */
  max-inline-size: var(--hs-field-max);
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--hs-line-2);
  border-radius: var(--hs-r);
  background: var(--hs-surface);
  color: var(--hs-ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.3;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.hs textarea.ap-in {
  min-height: 64px;
  resize: vertical;
}

/* The focus ring is hs.css's one solid ring (audit V-56); the border only darkens with it. */
.hs .ap-in:focus {
  border-color: var(--hs-accent);
}

.hs .ap-in--date {
  background: var(--hs-bg);
  color: var(--hs-muted);
}

.hs .ap-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 10px;
  margin: 4px 0 0;
  padding: 8px 12px;
  border-radius: var(--hs-r);
  background: var(--hs-accent-soft);
  font-size: 14px;
}

.hs .ap-note__yi {
  order: 2;
  font-family: var(--hs-serif);
  color: var(--hs-accent-ink);
}

.hs .ap-note__en {
  order: 1;
  color: var(--hs-accent-ink);
}

.hs .ap-group {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--hs-line);
}

.hs .ap-group .ap-h3 {
  margin: 0;
}

.hs .ap-grid > .ap-note,
.hs .ap-grid > .ap-group,
.hs .ap-grid > .ap-field--radio,
.hs .ap-grid > .ap-field[data-key='address'] {
  grid-column: 1 / -1;
}

/* choices */
.hs .ap-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hs .ap-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 12px 4px 10px;
  border: 1px solid var(--hs-line-2);
  border-radius: 999px;
  background: var(--hs-surface);
  font-size: 14px;
  cursor: pointer;
}

.hs .ap-opt input,
.hs .ap-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--hs-accent);
}

.hs .ap-opt__en {
  font-weight: 600;
}

.hs .ap-opt__yi {
  font-family: var(--hs-serif);
  color: var(--hs-muted);
}

.hs .ap-opt:hover {
  border-color: var(--hs-accent);
}

.hs .ap-opt:has(input:checked) {
  border-color: var(--hs-accent);
  background: var(--hs-accent-soft);
  color: var(--hs-accent-ink);
}

.hs .ap-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--hs-line-2);
  border-radius: var(--hs-r);
  background: var(--hs-surface);
  cursor: pointer;
}

.hs .ap-check input {
  margin-top: 2px;
}

.hs .ap-check:has(input:checked) {
  border-color: var(--hs-accent);
  background: var(--hs-accent-soft);
}

.hs .ap-check__txt {
  display: grid;
  gap: 2px;
  font-size: 14px;
}

.hs .ap-check__yi {
  font-family: var(--hs-serif);
  font-size: 15px;
  text-align: start;
}

.hs .ap-check__en {
  color: var(--hs-muted);
}

.hs .ap-check--big .ap-check__txt {
  font-size: 15px;
}

.hs .ap-field--check .ap-check {
  margin-top: 12px;
}

/* ── errors (apply.js sets data-error on the field) ─────────────────────── */

.hs .ap-err {
  display: none;
  margin: 2px 0 0;
  color: var(--hs-red);
  font-size: 13px;
  font-weight: 600;
}

.hs .ap-err__yi {
  display: block;
  font-family: var(--hs-serif);
  font-size: 14px;
  text-align: start;
}

.hs .ap-err__en {
  display: block;
}

.hs .ap-field[data-error='required'] .ap-err[data-err='required'],
.hs .ap-field[data-error='choose'] .ap-err[data-err='choose'],
.hs .ap-field[data-error='phone'] .ap-err[data-err='phone'],
.hs .ap-field[data-error='onePhone'] .ap-err[data-err='onePhone'],
.hs .ap-field[data-error='email'] .ap-err[data-err='email'],
.hs .ap-field[data-error='date'] .ap-err[data-err='date'],
.hs .ap-field[data-error='agree'] .ap-err[data-err='agree'],
.hs .ap-field[data-error='sign'] .ap-err[data-err='sign'] {
  display: block;
}

.hs .ap-field[data-error] .ap-in,
.hs .ap-field[data-error] .ap-opt,
.hs .ap-field[data-error] .ap-check,
.hs .ap-field[data-error] .ap-pad {
  border-color: var(--hs-red);
  background-color: var(--hs-red-soft);
}

/* ── the regulations ────────────────────────────────────────────────────── */

.hs .ap-regs {
  /* fullbleed-ok: the regulations keep a readable line length (Rule 40); the card fills. */
  max-inline-size: var(--hs-prose-max);
  max-height: 340px;
  overflow-y: auto;
  padding: 12px 14px 14px;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-r);
  background: var(--hs-bg);
  overscroll-behavior: contain;
}

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

.hs .ap-regs__title {
  margin: 0 0 8px;
  font-family: var(--hs-serif);
  font-size: 17px;
  text-align: center;
  color: var(--hs-accent-ink);
}

.hs .ap-regs__title--en {
  font-family: var(--hs-sans);
  font-size: 14px;
  letter-spacing: 0.8px;
}

.hs .ap-reg {
  margin: 0 0 8px;
  font-family: var(--hs-serif);
  font-size: 15px;
  line-height: 1.55;
}

.hs .ap-reg--en {
  font-family: var(--hs-sans);
  font-size: 14px;
  line-height: 1.5;
}

.hs .ap-reg__l {
  color: var(--hs-accent);
}

.hs .ap-sources {
  margin: 0 0 10px;
  padding: 6px 10px;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-r);
  background: var(--hs-surface);
}

.hs .ap-sources > summary {
  color: var(--hs-accent);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  cursor: pointer;
}

/* v3 review (R2-14): on a touch screen (and up to a tablet) "Sources" opens from a 44px target; it
   was 23px tall. Still a list item, so its ▸ stays. */
@media (pointer: coarse), (max-width: 1199.98px) {
  .hs .ap-sources > summary {
    min-height: var(--hs-tap);
    padding-block: 11px;
    line-height: 22px;
  }
}

.hs .ap-sources p {
  margin: 6px 0 0;
  font-family: var(--hs-serif);
  font-size: 14px;
  line-height: 1.55;
}

.hs .ap-agree-text {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--hs-line);
  font-family: var(--hs-serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.hs .ap-agree-text--en {
  font-family: var(--hs-sans);
  font-size: 14px;
}

.hs .ap-regs__divider {
  height: 0;
  margin: 14px 0 12px;
  border: 0;
  border-top: 1px solid var(--hs-gold);
}

/* ── the signature ──────────────────────────────────────────────────────── */

.hs .ap-sig {
  margin-top: 12px;
}

.hs .ap-pad {
  position: relative;
  /* fullbleed-ok: a signature line, not a mural (a 2560 screen made it 1700px wide). */
  max-inline-size: 900px;
  height: 160px;
  border: 1px dashed var(--hs-line-2);
  border-radius: var(--hs-r);
  background: var(--hs-surface);
  overflow: hidden;
}

.hs .ap-pad__canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.hs .ap-pad__line {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 36px;
  z-index: 1;
  border-top: 1px solid var(--hs-line-2);
}

.hs .ap-pad__ph {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transform: translateY(-75%);
  color: var(--hs-faint);
  font-size: 14px;
  pointer-events: none;
}

.hs .ap-pad__ph [lang='yi'] {
  font-family: var(--hs-serif);
  font-size: 17px;
}

/* "with your finger" on a touch screen, "with the mouse" with a mouse (audit V-55). A screen
   with both (a laptop with a touch screen) follows its main pointer. v3.1 (polish c): the
   signature's error follows the same rule (SignErr in page.tsx). */
.hs .ap-pad__ph--mouse {
  display: none;
}

@media (pointer: fine) {
  .hs .ap-pad__ph--touch {
    display: none;
  }

  .hs .ap-pad__ph--mouse {
    display: flex;
  }
}

/* v3.1 (polish c): the signature's error, the same way (SignErr in page.tsx). */
.hs .ap-err__dev--touch {
  display: block;
}

.hs .ap-err__dev--mouse {
  display: none;
}

@media (pointer: fine) {
  .hs .ap-err__dev--touch {
    display: none;
  }

  .hs .ap-err__dev--mouse {
    display: block;
  }
}

.hs.hs-ap[data-ap-ink='1'] .ap-pad__ph {
  display: none;
}

.hs .ap-pad__tools {
  display: flex;
  justify-content: flex-end;
}

.hs .ap-sig + .ap-check {
  margin-top: 10px;
}

/* ── the actions panel ──────────────────────────────────────────────────── */

.hs .ap-side {
  min-width: 0;
}

.hs .ap-actions {
  display: grid;
  gap: 10px;
}

.hs .ap-actions .hs-panel__h {
  margin: 0;
}

/* The form's one main action: .hs-btn's height (44px phone and tablet, 40px computer), one line. */
.hs .ap-prepare {
  width: 100%;
}

.hs .ap-prepare__idle,
.hs .ap-prepare__busy {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
}

.hs .ap-prepare [lang='yi'] {
  font-family: var(--hs-serif);
  font-weight: 500;
}

.hs .ap-prepare__busy {
  display: none;
}

.hs.hs-ap[data-ap-busy='1'] .ap-prepare__idle,
.hs.hs-ap[data-ap-sent='sending'] .ap-prepare__idle {
  display: none;
}

.hs.hs-ap[data-ap-busy='1'] .ap-prepare__busy,
.hs.hs-ap[data-ap-sent='sending'] .ap-prepare__busy {
  display: inline-flex;
}

.hs .ap-actions__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.hs .ap-actions__row .hs-btn,
.hs .ap-send__acts .hs-btn {
  flex-wrap: wrap;
  gap: 2px 6px;
  font-size: 14px;
}

.hs .ap-actions [lang='yi'],
.hs .ap-send__acts [lang='yi'] {
  font-family: var(--hs-serif);
  font-weight: 500;
}

.hs .ap-summary,
.hs .ap-prepare-failed {
  display: none;
  gap: 2px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #efc7c3;
  border-radius: var(--hs-r);
  background: var(--hs-red-soft);
  color: var(--hs-red);
  font-size: 14px;
  font-weight: 600;
}

.hs .ap-summary [lang='yi'],
.hs .ap-prepare-failed [lang='yi'] {
  font-family: var(--hs-serif);
}

.hs.hs-ap[data-ap-errors='1'] .ap-summary,
.hs.hs-ap[data-ap-failed='1'] .ap-prepare-failed {
  display: grid;
}

.hs .ap-saved {
  display: grid;
  gap: 2px;
  margin: 0;
  font-size: var(--hs-fs-sm);
  color: var(--hs-muted);
}

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

.hs .ap-side__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding-top: 6px;
  border-top: 1px solid var(--hs-line);
}

/* 0.018 (R11): the paper link's English and Yiddish one under the other. Side by side in the 254-286px
   panel each half wrapped onto two lines of two words ("On paper: the PDF / applications" beside
   "אויף פאפיר: די PDF / אפליקאציעס"); stacked, each is one whole line. */
.hs .ap-side__links .ap-link[data-ap-action='paper'] {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.hs .ap-restored {
  display: none;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--hs-line-2);
  border-radius: var(--hs-r);
  background: var(--hs-accent-soft);
  font-size: 14px;
}

.hs.hs-ap[data-ap-restored='1'] .ap-restored {
  display: grid;
}

.hs .ap-restored p {
  margin: 0;
}

.hs .ap-restored__yi {
  font-family: var(--hs-serif);
}

/* status lines and the fallback (only when the site could not be reached) */
.hs .ap-status__line {
  display: none;
  gap: 2px;
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--hs-r);
  font-size: 14px;
  font-weight: 600;
}

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

.hs .ap-status--fail {
  border: 1px solid #efc7c3;
  background: var(--hs-red-soft);
  color: var(--hs-red);
}

.hs .ap-status--done {
  border: 1px solid #b9d8c6;
  background: var(--hs-green-soft);
  color: var(--hs-green);
}

.hs.hs-ap[data-ap-sent='fail'] .ap-status--fail,
.hs.hs-ap[data-ap-sent='done'] .ap-status--done {
  display: grid;
}

.hs .ap-fallback {
  display: none;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hs-line);
}

.hs.hs-ap[data-ap-sent='fail'] .ap-fallback,
.hs.hs-ap[data-ap-sent='done'] .ap-fallback,
.hs.hs-ap[data-ap-sent='held'] .ap-fallback {
  display: grid;
}

.hs.hs-ap[data-ap-sent='done'] .ap-sent {
  display: none;
}

.hs .ap-sendmail,
.hs .ap-hint--share {
  display: none;
}

.hs.hs-ap[data-ap-share='file'] .ap-sendmail {
  display: inline-flex;
}

.hs.hs-ap[data-ap-share='file'] .ap-hint--share {
  display: block;
}

.hs .ap-hint--share {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: var(--hs-fs-sm);
  color: var(--hs-muted);
}

.hs .ap-sendmail__txt {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px 6px;
}

.hs .ap-addr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.hs .ap-addr__email {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.hs .ap-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 3px 10px;
  border: 1px solid var(--hs-line-2);
  border-radius: 999px;
  background: var(--hs-surface);
  color: var(--hs-accent-ink);
  font-family: inherit;
  font-size: var(--hs-fs-sm);
  font-weight: 600;
  cursor: pointer;
}

.hs .ap-copy [lang='yi'] {
  font-family: var(--hs-serif);
  font-weight: 500;
}

.hs .ap-copy__done {
  display: none;
}

.hs.hs-ap[data-ap-copied='1'] .ap-copy__idle {
  display: none;
}

.hs.hs-ap[data-ap-copied='1'] .ap-copy__done {
  display: inline;
}

.hs .ap-faxline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
}

.hs .ap-faxnum {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hs .ap-call {
  justify-self: start;
}

.hs .ap-btn-outline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 8px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--hs-line-2);
  border-radius: var(--hs-r);
  background: var(--hs-surface);
  color: var(--hs-accent-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.hs .ap-btn-outline [lang='yi'] {
  font-family: var(--hs-serif);
  font-weight: 500;
}

/* ── the answer (the application is with the office) ────────────────────── */

.hs .ap-send,
.hs .ap-out {
  display: none;
}

.hs.hs-ap[data-ap-sent='held'] .ap-send,
.hs.hs-ap[data-ap-sent='sent'] .ap-send,
.hs.hs-ap[data-ap-sent='failed'] .ap-send {
  display: grid;
  gap: 12px;
  outline: none;
  background: var(--hs-accent-soft);
}

.hs.hs-ap[data-ap-sent='sent'] .ap-send {
  background: var(--hs-green-soft);
}

.hs.hs-ap[data-ap-sent='failed'] .ap-send {
  border-color: #e7d4a6;
  background: #fbf5e6;
}

.hs.hs-ap[data-ap-sent='held'] .ap-out[data-out='held'],
.hs.hs-ap[data-ap-sent='sent'] .ap-out[data-out='sent'],
.hs.hs-ap[data-ap-sent='failed'] .ap-out[data-out='failed'] {
  display: grid;
  gap: 4px;
}

/* stored: the form steps aside (Print still prints it), and Send cannot go twice */
.hs.hs-ap[data-ap-sent='held'] .ap-form,
.hs.hs-ap[data-ap-sent='sent'] .ap-form,
.hs.hs-ap[data-ap-sent='failed'] .ap-form,
.hs.hs-ap[data-ap-sent='held'] .ap-actions .ap-prepare,
.hs.hs-ap[data-ap-sent='sent'] .ap-actions .ap-prepare,
.hs.hs-ap[data-ap-sent='failed'] .ap-actions .ap-prepare,
.hs.hs-ap[data-ap-sent='held'] .ap-saved,
.hs.hs-ap[data-ap-sent='sent'] .ap-saved,
.hs.hs-ap[data-ap-sent='failed'] .ap-saved {
  display: none;
}

.hs .ap-out .hs-panel__h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.hs .ap-out p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.hs .ap-out__yi {
  font-family: var(--hs-serif);
  color: var(--hs-muted);
}

.hs .ap-send__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hs .ap-send__words {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.hs .ap-refline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
}

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

.hs .ap-ref {
  width: 22ch;
  padding: 2px 6px;
  border: 1px dashed var(--hs-line-2);
  border-radius: 6px;
  background: var(--hs-surface);
  color: var(--hs-ink);
  font: 600 15px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.hs .ap-thumb {
  flex: none;
  width: 96px;
  height: auto;
  border: 1px solid var(--hs-line-2);
  border-radius: 6px;
  background: var(--hs-surface);
  box-shadow: var(--hs-shadow);
}

.hs .ap-thumb:not([src]) {
  display: none;
}

.hs .ap-send__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hs .ap-foot {
  margin: 0;
  padding: 8px 16px 0;
  font-size: var(--hs-fs-sm);
  color: var(--hs-muted);
  text-align: center;
}

.hs .ap-foot__email {
  font-weight: 600;
}

/* ── touch: every target 44px (DESIGN_V2; audit V-26) ─────────────────── */

@media (pointer: coarse), (max-width: 1199.98px) {
  .hs .ap-opt,
  .hs .ap-link,
  .hs .ap-copy,
  .hs .ap-btn-outline {
    min-height: var(--hs-tap);
  }
}

/* ── the phone's steps (audit V-32) ─────────────────────────────────────────
   apply.js sets data-ap-step="1".."5" on the page; each field and card carries data-ap-in, its
   step. On a phone SCREEN only the current step shows (print and the wider screens show all).
   Without the script there is no data-ap-step, so nothing is hidden and no step bar shows. */

.hs .ap-stepper,
.hs .ap-stepnav {
  display: none;
}

@media screen and (max-width: 699.98px) {
  .hs.hs-ap[data-ap-step='1'] [data-ap-in]:not([data-ap-in='1']),
  .hs.hs-ap[data-ap-step='2'] [data-ap-in]:not([data-ap-in='2']),
  .hs.hs-ap[data-ap-step='3'] [data-ap-in]:not([data-ap-in='3']),
  .hs.hs-ap[data-ap-step='4'] [data-ap-in]:not([data-ap-in='4']),
  .hs.hs-ap[data-ap-step='5'] [data-ap-in]:not([data-ap-in='5']) {
    display: none;
  }

  /* the member card holds steps 1-3; on 4 and 5 none of it shows, so neither does its panel */
  .hs.hs-ap[data-ap-step='4'] .ap-card--member,
  .hs.hs-ap[data-ap-step='5'] .ap-card--member {
    display: none;
  }

  /* on step 3 the card starts at its "Emergency Contact" heading: no rule above it */
  .hs.hs-ap[data-ap-step='3'] .ap-card--member .ap-group {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  /* the step line: five bars, then "Step 2 / 5 · Kehilla & family · קהל און משפחה" */
  .hs.hs-ap[data-ap-step] .ap-stepper {
    display: grid;
    gap: 6px;
  }

  .hs .ap-stepper__bars {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .hs .ap-stepper__bar {
    height: 4px;
    border-radius: 2px;
    background: var(--hs-line-2);
  }

  .hs.hs-ap[data-ap-step='1'] .ap-stepper__bar:nth-child(-n + 1),
  .hs.hs-ap[data-ap-step='2'] .ap-stepper__bar:nth-child(-n + 2),
  .hs.hs-ap[data-ap-step='3'] .ap-stepper__bar:nth-child(-n + 3),
  .hs.hs-ap[data-ap-step='4'] .ap-stepper__bar:nth-child(-n + 4),
  .hs.hs-ap[data-ap-step='5'] .ap-stepper__bar {
    background: var(--hs-accent);
  }

  .hs .ap-stepper__now {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
  }

  .hs .ap-stepper__now:focus {
    outline: none;
  }

  .hs .ap-stepper__label {
    display: none;
  }

  .hs.hs-ap[data-ap-step='1'] .ap-stepper__label[data-ap-step-label='1'],
  .hs.hs-ap[data-ap-step='2'] .ap-stepper__label[data-ap-step-label='2'],
  .hs.hs-ap[data-ap-step='3'] .ap-stepper__label[data-ap-step-label='3'],
  .hs.hs-ap[data-ap-step='4'] .ap-stepper__label[data-ap-step-label='4'],
  .hs.hs-ap[data-ap-step='5'] .ap-stepper__label[data-ap-step-label='5'] {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
  }

  .hs .ap-stepper__of {
    color: var(--hs-muted);
    font-weight: 600;
  }

  .hs .ap-stepper__t {
    font-weight: 700;
    color: var(--hs-accent-ink);
  }

  .hs .ap-stepper__yi {
    margin-left: auto;
    font-family: var(--hs-serif);
    font-size: 15px;
    color: var(--hs-muted);
  }

  /* Back / Next: in thumb reach above the call bar while nobody is typing (a box with the
     keyboard up gets the whole screen: the bar then stays at the end of the step). */
  .hs.hs-ap[data-ap-step] .ap-stepnav {
    position: sticky;
    bottom: calc(var(--hs-callbar-h) + 8px);
    z-index: 2;
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--hs-line);
    border-radius: var(--hs-r);
    background: var(--hs-surface);
    box-shadow: var(--hs-shadow);
  }

  .hs.hs-ap:has(.ap-form :is(input:not([type='radio']):not([type='checkbox']), textarea):focus)
    .ap-stepnav {
    position: static;
  }

  .hs .ap-stepnav .hs-btn {
    flex: 1 1 0;
    gap: 4px 8px;
    flex-wrap: wrap;
  }

  .hs .ap-stepnav [lang='yi'] {
    font-family: var(--hs-serif);
    font-weight: 500;
  }

  .hs .ap-stepnav__chev {
    transform: scaleX(-1);
  }

  .hs.hs-ap[data-ap-step='1'] .ap-stepnav__back {
    display: none;
  }

  /* the last step: Send is in the actions under the signature; Back stays */
  .hs.hs-ap[data-ap-step='5'] .ap-stepnav__next {
    display: none;
  }

  /* the application is with the office: no steps to walk */
  .hs.hs-ap[data-ap-sent='held'] .ap-stepper,
  .hs.hs-ap[data-ap-sent='sent'] .ap-stepper,
  .hs.hs-ap[data-ap-sent='failed'] .ap-stepper,
  .hs.hs-ap[data-ap-sent='held'] .ap-stepnav,
  .hs.hs-ap[data-ap-sent='sent'] .ap-stepnav,
  .hs.hs-ap[data-ap-sent='failed'] .ap-stepnav {
    display: none;
  }
}

/* ── tablet ─────────────────────────────────────────────────────────────── */

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

  .hs .ap-choice {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 16px;
  }

  .hs .ap-online {
    justify-self: start;
    min-width: 240px;
  }

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

  .hs .ap-in {
    min-height: 44px;
  }

  .hs .ap-pad {
    height: 170px;
  }

  /* The actions beside the form, always in view (a narrow panel on a tablet). */
  .hs .ap-formview {
    grid-template-columns: minmax(0, 1fr) 288px;
    gap: 16px;
  }

  .hs .ap-side {
    position: sticky;
    top: calc(var(--hs-sticky-top, 0px) + 12px);
  }

  .hs .ap-regs {
    max-height: 300px;
  }
}

/* Tablet only: the narrow panel keeps "Send to the office" on one line, and Print and Download
   one under the other (each one line), not two cramped two-line buttons side by side. */
@media (min-width: 700px) and (max-width: 1199.98px) {
  .hs .ap-prepare {
    padding-inline: 10px;
    font-size: 14px;
  }

  .hs .ap-prepare__idle,
  .hs .ap-prepare__busy {
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .hs .ap-actions__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── computer: wider, three columns of fields, the paper card on one row ── */

@media (min-width: 1200px) {
  .hs .ap-main {
    padding: 20px 32px 28px;
  }

  .hs .ap-formview {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
  }

  .hs .ap-in {
    min-height: 42px;
  }

  .hs .ap-pdf {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }

  .hs .ap-pdf > svg {
    grid-row: auto;
  }

  .hs .ap-pdf__note {
    grid-column: auto;
  }

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

  .hs .ap-grid--sig {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* A big screen (1920, 2560): four columns of boxes, a wider actions panel (audit V-24/V-25). */
@media (min-width: 1800px) {
  .hs .ap-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hs .ap-formview {
    grid-template-columns: minmax(0, 1fr) var(--hs-side-w);
  }
}

@media (hover: hover) and (pointer: fine) {
  .hs .ap-copy:hover,
  .hs .ap-btn-outline:hover {
    border-color: var(--hs-accent);
    background: var(--hs-accent-soft);
  }

  .hs .ap-link:hover {
    color: var(--hs-accent-ink);
  }
}

/* ── print: the filled application, clean (owner, 29 Oct: "you should be able to print it") ── */

@media print {
  @page {
    margin: 14mm 12mm;
  }

  .hs.hs-ap .hs-skip,
  .hs.hs-ap .hs-site,
  .hs.hs-ap .hs-head,
  .hs.hs-ap .hs-callbar,
  .hs.hs-ap .hs-note-wrap,
  .hs.hs-ap .hs-install-slot,
  .hs.hs-ap .hs-footer,
  .hs.hs-ap .ap-choice,
  .hs.hs-ap .ap-off,
  .hs.hs-ap .ap-side,
  .hs.hs-ap .ap-restored,
  .hs.hs-ap .ap-send,
  .hs.hs-ap .ap-foot,
  .hs.hs-ap .ap-err,
  .hs.hs-ap .ap-pad__tools,
  .hs.hs-ap .ap-pad__ph,
  .hs.hs-ap .ap-sources > summary,
  .hs.hs-ap .ap-hp,
  .hs.hs-ap .ap-check--screen,
  .hs.hs-ap .ap-stepper,
  .hs.hs-ap .ap-stepnav {
    display: none !important;
  }

  .hs.hs-ap,
  .hs.hs-ap .ap-main {
    padding: 0;
    background: #fff;
  }

  .hs.hs-ap .ap-formview,
  .hs.hs-ap .ap-form {
    display: block !important;
  }

  .hs.hs-ap .ap-print-head {
    display: block;
    margin: 0 0 10pt;
    padding-bottom: 6pt;
    border-bottom: 1pt solid #999;
    text-align: center;
    font-family: var(--hs-serif);
  }

  .hs.hs-ap .ap-print-head p {
    margin: 0;
    font-size: 14pt;
    font-weight: 700;
  }

  .hs.hs-ap .ap-card {
    margin: 0 0 10pt;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
    break-inside: auto;
  }

  .hs.hs-ap .ap-h2 {
    margin: 0 0 6pt;
    padding-bottom: 2pt;
    border-bottom: 0.5pt solid #bbb;
    font-size: 12pt;
    color: #000;
  }

  .hs.hs-ap .ap-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6pt 12pt;
  }

  .hs.hs-ap .ap-field,
  .hs.hs-ap .ap-check,
  .hs.hs-ap .ap-note {
    break-inside: avoid;
  }

  .hs.hs-ap .ap-lab {
    font-size: 8.5pt;
  }

  .hs.hs-ap .ap-lab__yi {
    font-size: 9.5pt;
  }

  .hs.hs-ap .ap-in {
    min-height: 0;
    padding: 1pt 0 2pt;
    border: 0;
    border-bottom: 0.75pt solid #777;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-size: 10.5pt;
    color: #000;
  }

  .hs.hs-ap textarea.ap-in {
    min-height: 0;
    resize: none;
  }

  .hs.hs-ap .ap-opt,
  .hs.hs-ap .ap-check {
    min-height: 0;
    padding: 1pt 6pt 1pt 0;
    border: 0;
    background: none;
    font-size: 9.5pt;
  }

  .hs.hs-ap .ap-note {
    padding: 2pt 0;
    background: none;
    font-size: 9pt;
  }

  .hs.hs-ap .ap-instr {
    font-size: 9pt;
  }

  .hs.hs-ap .ap-regs {
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: none;
  }

  .hs.hs-ap .ap-reg,
  .hs.hs-ap .ap-agree-text {
    font-size: 9.5pt;
    line-height: 1.4;
  }

  .hs.hs-ap .ap-sources {
    padding: 0;
    border: 0;
  }

  .hs.hs-ap .ap-pad {
    height: 110pt;
    border: 0;
    border-bottom: 0.75pt solid #777;
    border-radius: 0;
    break-inside: avoid;
  }

  .hs.hs-ap .ap-pad__line {
    display: none;
  }

  .hs.hs-ap .ap-sig {
    margin-top: 8pt;
  }

  /* "(scroll down)" means nothing on paper: the regulations print whole */
  .hs.hs-ap .ap-card .ap-sub {
    display: none;
  }
}

/* v3.1 (ticket #1696, "on the phone the site looks very very messy"): the phone's Back / Next was a
   floating rounded card 8px above the call bar, the step's text showing through the gaps around it
   (three layers: the card, the bar, the Feedback button). It is now one flush strip edge to edge,
   sitting right on the call bar, so the two read as one dock at the bottom. Same buttons, same reach. */
@media screen and (max-width: 699.98px) {
  .hs.hs-ap[data-ap-step] .ap-stepnav {
    bottom: var(--hs-callbar-h);
    margin-left: calc(-1 * max(var(--hs-gutter, 16px), env(safe-area-inset-left)));
    margin-right: calc(-1 * max(var(--hs-gutter, 16px), env(safe-area-inset-right)));
    padding: 8px max(var(--hs-gutter, 16px), env(safe-area-inset-right)) 8px
      max(var(--hs-gutter, 16px), env(safe-area-inset-left));
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: none;
  }
}
