/* ================================================================
   מאשה פת — styles
   Design target: madaf.art (measured at a 1707px viewport)
   All spacing values live here as custom properties.
   ================================================================ */

/* ---------- fonts: Masada by Hagilda (self-hosting web license, single domain + its subdomains) */
/* the hand font for the names written on photos (Hafonton, "Pil Kahol") */
@font-face { font-family: "Pil Kahol"; src: url("../fonts/FtPilKahol2.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Masada"; font-weight: 300; font-display: swap;
  src: url("../fonts/Masada-Light.woff2") format("woff2"), url("../fonts/Masada-Light.woff") format("woff"); }
@font-face { font-family: "Masada"; font-weight: 400; font-display: swap;
  src: url("../fonts/Masada-Book.woff2") format("woff2"), url("../fonts/Masada-Book.woff") format("woff"); }
@font-face { font-family: "Masada"; font-weight: 500; font-display: swap;
  src: url("../fonts/Masada-Medium.woff2") format("woff2"), url("../fonts/Masada-Medium.woff") format("woff"); }
@font-face { font-family: "Masada"; font-weight: 700; font-display: swap;
  src: url("../fonts/Masada-Bold.woff2") format("woff2"), url("../fonts/Masada-Bold.woff") format("woff"); }
@font-face { font-family: "Masada Mono"; font-weight: 600; font-display: swap;
  src: url("../fonts/MasadaMono-Demi.woff") format("woff"); }

:root {
  /* colors (from the Wix theme) */
  --bg: #FBF7EC;  /* Elia, 2026-11-16: #FCF7E9 a touch less yellow; tried Ivory #F5F2EB, #F7F2E9, #F9F3E7, Lionsmane #FCF3E3 */
  --bg-soft: #FAFAF7;
  --ink: #1B262C;  /* the Ivory swatch text (Elia, 2026-11-16; was #585D61) */
  --accent: #1B262C;  /* was grey-green #68746C; Elia 2026-11-16: everything grey takes the text colour */
  --line: rgba(27, 38, 44, .35);  /* hairlines: the text colour, a little transparent (was rgba(104,116,108,.59)) */
  --muted: var(--ink);  /* was warm grey #6b6259 */
  --pop-bg: #FFF5F0;

  /* madaf grid */
  --content: 1562px;
  --margin: 65px;
  --col: 741px;
  --colgap: 80px;
  --single: 741px;

  /* the spacing system */
  --s-media: 80px;      /* anything touching an image */
  --s-text: 19px;       /* text to text */
  --s-title: 32px;      /* title to first text */
  --s-caption: 12px;    /* image to caption */
  --s-gallery: 40px;    /* image to image inside a gallery */
  --s-run: 24px;        /* image runs in single column */
  --s-end: 40px;        /* end of section */

  /* type */
  --f-body: "Masada", system-ui, sans-serif;
  --f-mono: "Masada Mono", ui-monospace, monospace;
  --hdr: 120px;
  --hdr-compact: 52px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-compact) + 120px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-weight: 400; font-size: 19px; line-height: 30px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 500; margin: 0; color: var(--ink); }
h1 { font-size: 38px; line-height: 44px; }
h2 { font-size: 28px; line-height: 36px; }
p { margin: 0; }
hr { border: 0; margin: 0; }

/* ---------- rich text classes kept from Wix */
.f-medium { font-weight: 500; }
.f-light { font-weight: 300; }
.f-bold, .b { font-weight: 700; }
.f-book { font-weight: 400; }
.f-x5b { font-weight: 700; }
.f-mono { font-family: var(--f-mono); }
.f-hand { font-weight: 300; }
/* the Light cut (300) of Masada has broken kerning on Windows (Chrome/Edge draw gaps inside words, e.g. "א ני"):
   every place that uses the Light weight turns kerning off (2026-11-16) */
.f-light, .f-hand, .wfont_2, .dlg-row[data-who="אורית"] .dlg-txt, .pop-x { font-kerning: none; font-feature-settings: "kern" 0; }
.f-body { font-weight: 400; }
.i { font-weight: 700; }  /* quotes: bold only, no italic (Rama, 2026-11-25) */
.u { text-decoration: underline; }
.al-justify { text-align: justify; }
.al-center { text-align: center; }
.al-left { text-align: left; }
.text p.sp { height: 30px; }
.text a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Wix paragraph styles (theme fonts), sizes are overridden inline where Wix had them */
.txt { font-size: 19px; line-height: 1.9; }
.txt p { margin: 0; }
h1.txt, h2.txt { font-size: inherit; line-height: inherit; font-weight: inherit; }
.wfont_0 { font-size: 60px; line-height: normal; font-weight: 500; }
.wfont_2 { font-size: 15px; line-height: 1.2; font-weight: 300; }
.wfont_3, .wfont_4 { font-size: 36px; line-height: 1.4em; font-weight: 500; }
.wfont_5 { font-size: 27px; line-height: 1.4em; font-weight: 500; }
.wfont_6 { font-size: 22px; line-height: 1.4em; font-weight: 500; }
.wfont_7 { font-size: 19px; line-height: 1.9em; font-weight: 400; }
.wfont_8 { font-size: 19px; line-height: 1.9em; font-weight: 700; }
.wfont_9 { font-size: 14px; line-height: 1.4em; font-weight: 400; }
.txt a { text-decoration: underline; text-underline-offset: 3px; }
/* every link in the text is the same dark red, underlined (like "לחצו לצפייה"); Wix colours inside it give way */
.txt a, .text a, .pdf-open, .dlg-txt a { color: #8B0000; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.txt a *, .text a *, .pdf-open * { color: inherit !important; }
.txt a:hover, .text a:hover, .pdf-open:hover { text-decoration-thickness: 2px; }

/* the madaf type scale, applied over the sizes that came from Wix (flow text only, not cards) */
.blk > .tx-body, .blk > .tx-body * { font-size: 19px !important; line-height: 30px !important; }
.blk > .tx-cap, .blk > .tx-cap * { font-size: 16px !important; line-height: 20.8px !important; }
.blk > .tx-1l, .blk > .tx-1l * { font-size: var(--fs1, 16px) !important; white-space: nowrap; }
.blk > .tx-h1, .blk > .tx-h1 * { font-size: 38px !important; line-height: 44px !important; }
.blk > .tx-h1 { white-space: nowrap; }  /* a page title never breaks over two lines */
/* the centred page titles ("פרקי חיים") sat in a narrow centred box on Wix: centre them on the full width */
.blk:has(> .tx-h1 p[style*="justify"]) { --w: 100% !important; --l: 0% !important; }
.blk > .tx-h1 p[style*="justify"] { text-align: center !important; }
.blk > .tx-h2, .blk > .tx-h2 * { line-height: 1.25 !important; }

/* ---------- header: madaf.art exactly (measured 2026-11-16 at 1707): fixed, 120 -> 52 when scrolled past 100px,
   250ms. Title 24, menu 20, regular weight (400, her choice; madaf uses 500) with 32px between items, both shrink to 16. Text sits 17px above the line
   (10px when scrolled). Current page and hover: a 4px bar standing on the line. Edges = the content edges. */
.hdr-sentinel { position: absolute; top: 0; height: 1px; width: 1px; }
body { padding-top: var(--hdr); }
.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--bg);
  height: var(--hdr); transition: height 250ms;
}
.hdr-in {
  position: relative; max-width: calc(var(--content) + 2 * var(--margin)); margin-inline: auto;
  padding-inline: var(--margin); height: 100%;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.hdr-in::after {
  content: ""; position: absolute; inset-inline: var(--margin); bottom: 0; height: 1px; background: var(--line); z-index: 2;
}
/* the name as a logo, after madaf (measured 2026-11-16): "מאשה מיכרובסקי" is the logo, Masada 500 24px;
   "לבית פת" follows like madaf's tagline "ספרים שהם אמנות": Masada 300, 20px, 32px (2rem) after the name,
   on the same baseline; both 16px when the header shrinks */
.brand { font-size: 24px; line-height: 1; font-weight: 500; text-decoration: none; white-space: nowrap; display: flex; align-items: baseline;
  margin-bottom: 12px; border-bottom: 5px solid transparent; transition: font-size 250ms, margin 250ms; }
.menu { display: flex; align-items: center; gap: 32px; font-size: 20px; line-height: 1; font-weight: 400;
  --nav-mb: 17px; margin-bottom: var(--nav-mb); transition: font-size 250ms, margin 250ms; }
.menu a { text-decoration: none; position: relative; display: block; }
.menu > a::after, .has-sub > a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: calc(-1 * var(--nav-mb)); height: 4px; background: currentColor;
  opacity: 0; transition: bottom 250ms;
}
.menu > a[aria-current]::after, .has-sub > a[aria-current]::after { opacity: 1; }
@media (hover: hover) {
  .menu > a:hover::after, .has-sub > a:hover::after { opacity: 1; }
}
.burger { display: none; width: 44px; height: 44px; margin-inline-end: -10px; padding: 0; border: 0; background: none; color: var(--ink);
  cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.burger span { display: block; width: 24px; height: 1.5px; background: currentColor; transition: transform .25s ease, opacity .2s ease; }
.hdr.nav-open .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hdr.nav-open .burger span:nth-child(2) { opacity: 0; }
.hdr.nav-open .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.has-sub { position: relative; }
/* the chapters list under "פרקי חיים": right-aligned to its item, hairline border, opens on hover or keyboard focus */
.sub { position: absolute; top: 100%; right: -18px; margin: 0; padding: 14px 18px 12px; list-style: none;
  background: var(--bg); border: 1px solid var(--line); min-width: 190px; z-index: 60; font-size: 16px; font-weight: 400;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .2s, transform .2s, visibility .2s; }
.has-sub::before { content: ""; position: absolute; top: 100%; inset-inline: -18px; height: calc(var(--nav-mb) + 1px); }  /* bridge so the list stays open */
.sub { margin-top: calc(var(--nav-mb) + 1px); }
.sub li + li { margin-top: 8px; }
.sub a { white-space: nowrap; font-size: 16px; line-height: 1.3; }
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { opacity: 1; visibility: visible; transform: none; }
/* between them a middle dot (Elia, 2026-11-16, after trying madaf's bars), at the tagline's size in the name's weight, 14px on each side */
.brand-sep, .brand-b { font-size: 20px; font-weight: 300; font-kerning: none; transition: font-size 250ms; }
.brand-sep { margin-inline: 14px; font-weight: 500; }
.hdr.compact .brand-sep, .hdr.compact .brand-b { font-size: 16px; }
.hdr.compact { height: var(--hdr-compact); }
.hdr.compact .brand { font-size: 16px; margin-bottom: 6px; }
.hdr.compact .menu { font-size: 16px; --nav-mb: 10px; }
@media (max-width: 960px) {
  .menu { font-size: 15px; }
  .brand { margin-bottom: 9px; }
}

/* ---------- page frame: Wix positions, scaled into the madaf grid */
main { display: block; overflow-x: clip; }  /* nothing in the page may push it wider than the screen (clip keeps sticky columns working) */
.sec { max-width: calc(var(--content) + 2 * var(--margin)); margin-inline: auto; padding: 0 var(--margin) var(--pb, 40px); }
.sec-rule { height: 1px; background: var(--line); margin: 40px 0 0; }
.one { max-width: var(--single); margin-inline: auto; }
.wide { width: 100%; }
.blk { margin-top: var(--gap, 0); width: var(--w, 100%); margin-left: auto; margin-right: calc(100% - var(--w, 100%) - var(--l, 0%)); }
.row { display: flex; direction: ltr; align-items: flex-start; }
.row > .cell { flex: 0 0 var(--cw); margin-left: var(--ml); margin-top: var(--mt, 0); min-width: 0; direction: rtl; }
/* a row of photos (or its caption) wider than the column, centred on it: as wide as the content allows,
   but never taller than the screen (--ar = the row's width / height) */
.eqrow .bk-flip { width: 100%; }
.eqcap { margin-top: 12px; }  /* the page as tall as the photo beside it */
figure.video { position: relative; }
.vid-sound { position: absolute; top: 12px; right: 12px; z-index: 2; display: none; font: inherit; font-size: 14px;
  padding: 6px 12px; border: 0; border-radius: 3px; background: rgba(255, 253, 247, .92); color: var(--ink); cursor: pointer; }
figure.video.ask .vid-sound { display: block; }
.blk.bleed { --bw: min(var(--content), calc(100vw - 2 * var(--margin)), calc((100svh - 172px) * var(--ar)));
  width: var(--bw); margin-left: calc((100% - var(--bw)) / 2); margin-right: calc((100% - var(--bw)) / 2); }
.blk > .tx-body .sub-src { font-size: 16px !important; line-height: 24px !important; margin-top: 4px !important; text-align: right; }
.sec.is-two { display: flow-root; }  /* keeps the first column block's top margin inside its section (centre line, site.js) */
.two { display: grid; grid-template-columns: 1fr var(--colgap) 1fr; align-items: start; margin-top: var(--gap, 0); direction: ltr; }
.two > .col { direction: rtl; min-width: 0; }
.col-l { grid-column: 1; grid-row: 1; }
.col-r { grid-column: 3; grid-row: 1; }
.two > .col.stick { position: sticky; }  /* top is set by site.js */
.mid { grid-column: 2; grid-row: 1; align-self: stretch; position: relative; }
.mid::before {
  /* the madaf center line: 6px element with two 0.67px hairlines. site.js stretches it (--ext-t, --ext-b)
     across the gaps between two-column sections, so it runs unbroken down the chapter */
  content: ""; width: 6px; position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(-1 * var(--ext-t, 0px)); bottom: calc(-1 * var(--ext-b, 0px));
  border-inline: .67px solid var(--line);
}
.center { text-align: center; }
.center-text { text-align: center; max-width: var(--single); margin-inline: auto; }
.label { font-family: var(--f-mono); font-size: 15px; line-height: 21px; letter-spacing: .04em; }
.minirule { height: 1px; background: var(--line); width: 100%; }
.minirule.center { width: 48px; margin: 20px auto 0; }
.rule { height: 1px; background: var(--line); }

/* photos: the same box and the same visible part of the picture as on Wix */
figure { margin: 0; }
.ph .box { display: block; position: relative; overflow: hidden; container-type: inline-size; background: var(--bg-soft); }
.ph .box img { position: absolute; max-width: none; height: auto; }
.ph .rbox { overflow: visible; background: none; }
.ph .rin { position: absolute; left: 50%; top: 50%; overflow: hidden; display: block; }
.ph .rin img { position: absolute; max-width: none; height: auto; }
.ph-link { display: block; }
.ov {
  position: absolute; color: #fff; line-height: 1.05;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .35); pointer-events: none;
}
.ov-arrow { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none;
  color: rgb(250, 250, 247); filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }  /* from a name to the person (ARROWS) */
.ov-arrow > path { fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; }
.names-edit .ov-h { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; z-index: 3;
  background: rgba(139, 0, 0, .85); border: 2px solid #fff; cursor: grab; touch-action: none; }
.names-edit .ov-h.ov-moved { background: #2E7D32; }
.ov-strong { text-shadow: 0 0 2px rgba(0, 0, 0, .6), 0 0 7px rgba(0, 0, 0, .55), 0 1px 14px rgba(0, 0, 0, .4); }
.ov > span { position: absolute; top: 50%; right: 50%; transform: translate(50%, -50%);
  width: max-content; max-width: 220%; text-align: center; }  /* centred where the name sat on Wix, on one line */
.ov span { font-size: inherit !important; font-family: "Pil Kahol", var(--f-body) !important; font-weight: 400 !important; }  /* the size comes from .ov, in units of the photo width */

.ph img[data-full], .pg-it img { cursor: zoom-in; }

/* pro galleries: the exact Wix cell layout */
.pg { position: relative; }
.pg-in { position: relative; }
.pg-it { position: absolute; overflow: hidden; background: var(--bg-soft); container-type: inline-size; }  /* names on a gallery photo are sized by its width (cqw) */
.pg-it img { width: 100%; height: 100%; object-fit: cover; }
.pg-h { overflow-x: auto; scrollbar-width: thin; }
/* a gallery laid out as a collage: rows across the column, the photos of a row the same height, 24px apart */
.pg-col { display: flex; flex-direction: column; gap: 24px; }
.pgc-row { display: flex; gap: 24px; direction: rtl; align-items: flex-start; }
.pg-it.pgc { position: relative; min-width: 0; transition: transform .35s ease, box-shadow .35s ease; }
@media (hover: hover) {  /* the photo under the mouse comes forward, clearly larger, over its neighbours */
  .pg-it.pgc:hover { transform: scale(1.25); z-index: 3; box-shadow: 0 10px 34px rgba(40, 40, 40, .28); }
  .pg-col:has(.pgc:hover) .pgc:not(:hover) { transform: scale(.92); }  /* ... and the others step back a little */
}
.gallery.masonry { columns: 2; column-gap: var(--s-gallery); }
.gallery.masonry.m3 { columns: 3; margin-top: 60px; }
.gallery.masonry > figure { break-inside: avoid; margin-bottom: var(--s-gallery); }
.gallery.masonry img { width: 100%; height: auto; }
.gallery figcaption { margin-top: 12px; font-size: 16px; line-height: 20.8px; text-align: center; }
/* with a mouse: the description appears on the photo itself when the mouse is over it (touch screens keep it underneath) */
@media (hover: hover) {
  .gallery.masonry > figure { position: relative; }
  .gallery.masonry img { display: block; }
  .gallery.masonry figcaption { position: absolute; inset-inline: 0; bottom: 0; margin: 0; padding: 48px 18px 16px;
    color: #fff; background: linear-gradient(to top, rgba(30, 30, 30, .72), rgba(30, 30, 30, 0));
    opacity: 0; transition: opacity .3s ease; pointer-events: none; }
  .gallery.masonry > figure:hover figcaption { opacity: 1; }
}
.gal-sec h1, .gal-sec h2 { margin-top: 0; }
/* gallery opening like "פרקי חיים": no second line under the header's, the title 52px below that line;
   each collection's title 40px below its own line (they touched it) (Elia, 2026-11-16) */
.gal-open h1 { padding-top: 52px; }
.gal-sec > .sec-rule + h2 { margin-top: 40px; }
/* gallery type (Elia, 2026-11-16, "the typography doesn't sit"): the Wix tracking (.02em on the title, .05em on the texts)
   is gone, and the opening text takes the site's body measure 19/30 (it was 19/36.1) */
.gal-sec h1 span, .gal-sec .text p, .gal-sec .text span { letter-spacing: normal !important; }
.gal-open .text p { line-height: 30px !important; }
/* option B (Elia, 2026-11-16): three sizes and two weights only. Page title 38/44 500, collection title 28/36 500,
   every running text 19/30 400 (the collection subtitles were 17px Light), 8px under its collection title */
.gal-sec .text p, .gal-sec .text span { font-weight: 400 !important; }
.gal-sec:not(.gal-open) .text { margin-top: 8px; }
.gal-sec:not(.gal-open) .text p { font-size: 19px !important; line-height: 30px !important; }
.gal-sec .text { margin-top: var(--s-title); }

/* slideshow */
.slideshow { position: relative; }
/* a slideshow is never taller than the screen (under the compact header, with room for its caption):
   it narrows, keeping its proportion, and stays centred; the caption under it takes the same width */
.slideshow, .blk:has(> .slideshow) + .blk > .tx-cap { width: min(100%, calc((100svh - 172px) * var(--ar, 1))); margin-inline: auto; }
.collage, .row.collage { gap: 0 !important; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; }
.slide img { width: 100%; height: 100%; max-width: none; }
.sl-prev, .sl-next {
  position: absolute; top: 50%; translate: 0 -50%; border: 0; background: rgba(252, 247, 233, .85);
  width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer; color: var(--ink);
}
.sl-prev { right: 8px; } .sl-next { left: 8px; }
.sl-count { display: block; text-align: center; font-family: var(--f-mono); font-size: 14px; margin-top: 8px; }
/* the page counter sits on the caption's line (12px under the photo), at the far end of it */
.slideshow .sl-count { position: absolute; left: 0; top: calc(100% + var(--s-caption)); margin: 0; line-height: 20.8px; }
.blk:has(> .slideshow) + .blk > .tx-cap, .blk:has(> .slideshow) + .blk > .tx-cap * { white-space: nowrap; }  /* one line, next to the counter */

/* pdf, video, audio */
.pdf iframe { width: 100%; height: auto; max-height: 90vh; border: 0; background: #fff; }
.pdf-title { font-weight: 500; text-align: center; margin-bottom: 12px; }
.pdf-open { display: block; width: max-content; margin: 12px auto 0; font-size: 13px; }  /* small, centred under the page count */

/* flip books */
.book { margin: 0; }
.bk-stage { position: relative; width: 100%; }
.bk-flip { margin: 0 auto; width: min(100%, calc((100vh - var(--hdr-compact) - 240px) * var(--pr))); aspect-ratio: var(--pr); }  /* one page, as large as the screen allows */
.bk-flip { position: relative; perspective: 2600px; }
/* a quiet page turn, like a Hebrew book: the page lifts at its outer (left) edge and turns over the spine
   on its right; the next page is already lying underneath. Going back, the page turns back into place. */
.bk-page { position: absolute; inset: 0; background: #fff; overflow: hidden; visibility: hidden;
  transform-origin: right center; backface-visibility: hidden; }
.bk-page.on { visibility: visible; z-index: 1; }
.bk-page.turn-out, .bk-page.turn-in { visibility: visible; z-index: 2; }
.bk-page.turn-out { animation: bk-out .8s cubic-bezier(.45, .05, .3, 1) forwards; }
.bk-page.turn-in { animation: bk-in .8s cubic-bezier(.45, .05, .3, 1) forwards; }
.bk-page::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(to left, rgba(60, 50, 40, .22), rgba(60, 50, 40, .04) 40%, rgba(60, 50, 40, 0)); }
.bk-page.turn-out::after { animation: bk-shade .8s ease forwards; }
.bk-page.turn-in::after { animation: bk-shade .8s ease reverse forwards; }
@keyframes bk-out { from { transform: rotateY(0); } to { transform: rotateY(92deg); } }
@keyframes bk-in { from { transform: rotateY(92deg); } to { transform: rotateY(0); } }
@keyframes bk-shade { from { opacity: 0; } to { opacity: 1; } }
/* the corner lifts a little when the mouse is near it (top or bottom): left corners lead to the next page,
   right corners back; a click turns the page. The page underneath shows through the lifted corner. */
@property --peel { syntax: '<length>'; inherits: true; initial-value: 0px; }
.bk-flip { --peel: 0px; transition: --peel .32s cubic-bezier(.3, .7, .3, 1); }
.bk-flip.peel { --peel: 56px; }
.bk-page.peek { visibility: visible; z-index: 0; }
.bk-flip.peel-bl .bk-page.on { clip-path: polygon(0 0, 100% 0, 100% 100%, var(--peel) 100%, 0 calc(100% - var(--peel))); }
.bk-flip.peel-tl .bk-page.on { clip-path: polygon(var(--peel) 0, 100% 0, 100% 100%, 0 100%, 0 var(--peel)); }
.bk-flip.peel-br .bk-page.on { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--peel)), calc(100% - var(--peel)) 100%, 0 100%); }
.bk-flip.peel-tr .bk-page.on { clip-path: polygon(0 0, calc(100% - var(--peel)) 0, 100% var(--peel), 100% 100%, 0 100%); }
.bk-fold { position: absolute; z-index: 3; width: var(--peel); height: var(--peel); pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(60, 50, 40, .28)); }
.peel-bl .bk-fold { left: 0; bottom: 0; background: linear-gradient(to top right, transparent 50%, #d6ccb8 50%, #f4eee2 100%); }
.peel-tl .bk-fold { left: 0; top: 0; background: linear-gradient(to bottom right, transparent 50%, #d6ccb8 50%, #f4eee2 100%); }
.peel-br .bk-fold { right: 0; bottom: 0; background: linear-gradient(to top left, transparent 50%, #d6ccb8 50%, #f4eee2 100%); }
.peel-tr .bk-fold { right: 0; top: 0; background: linear-gradient(to bottom left, transparent 50%, #d6ccb8 50%, #f4eee2 100%); }
.bk-hot { position: absolute; z-index: 4; width: 50%; height: 50%; cursor: pointer; }  /* the page in four: a click on the left half turns forward, on the right half back */
.bk-hot.k-tl { left: 0; top: 0; } .bk-hot.k-bl { left: 0; bottom: 0; }
.bk-hot.k-tr { right: 0; top: 0; } .bk-hot.k-br { right: 0; bottom: 0; }
.bk-hot[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .bk-flip { transition: none; } }

/* variation B (page.html?flip=b, for comparing): the whole leaf turns over (180deg) to the right of the spine,
   its back shows in a darker paper tone, and the page underneath gets a passing shadow */
.flip-b .bk-flip { perspective: 3000px; }
.flip-b .bk-page { transform-style: preserve-3d; backface-visibility: visible; background: transparent; overflow: visible; }
.flip-b .bk-page img { backface-visibility: hidden; background: #fff; }
.flip-b .bk-page::before { content: ""; position: absolute; inset: 0; background: #efe7d6; transform: rotateY(180deg);
  backface-visibility: hidden; box-shadow: inset -30px 0 40px -20px rgba(60, 50, 40, .25); }
.flip-b .bk-page.turn-out { animation: bk-out-b 1.05s cubic-bezier(.4, .1, .3, 1) forwards; }
.flip-b .bk-page.turn-in { animation: bk-in-b 1.05s cubic-bezier(.4, .1, .3, 1) forwards; }
.flip-b .bk-page.turn-out::after, .flip-b .bk-page.turn-in::after { animation: none; opacity: 0; }
.flip-b .bk-page.under::after { opacity: 0; animation: bk-under 1.05s ease forwards;
  background: linear-gradient(to left, rgba(60, 50, 40, .28), rgba(60, 50, 40, .06) 45%, rgba(60, 50, 40, 0) 75%); }
@keyframes bk-out-b { from { transform: rotateY(0); } to { transform: rotateY(180deg); } }
@keyframes bk-in-b { from { transform: rotateY(180deg); } to { transform: rotateY(0); } }
@keyframes bk-under { 0% { opacity: 0; } 45% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bk-page.turn-out, .bk-page.turn-in, .bk-page::after, .bk-page.under::after { animation: none !important; } }
.bk-page img { width: 100%; height: 100%; object-fit: contain; display: block; }  /* whole page, never cropped or stretched */
.bk-bar { display: grid; grid-template-columns: 1fr auto auto auto 1fr; align-items: center; column-gap: 18px; margin-top: 14px;
  font-family: "Masada Mono", var(--f-body); font-size: 15px; }
/* the arrows and the page count sit in the middle, under the page; "הגדלה" stands beside them */
.bk-prev { grid-column: 2; } .bk-num { grid-column: 3; } .bk-next { grid-column: 4; }
.bk-zoom { grid-column: 5; justify-self: start; }
.bk-bar button { background: none; border: 1px solid currentColor; color: inherit; font: inherit;
  padding: 4px 12px; cursor: pointer; line-height: 1.4; }
.bk-bar button:hover { background: var(--ink); color: var(--bg); }
.bk-bar button:disabled { opacity: .3; cursor: default; background: none; color: inherit; }
.bk-num { min-width: 11em; text-align: center; }
/* the recipes: a page narrower than the book (the soup) sits on the page colour, not on white */
.book-recipes .bk-page { background: var(--bg); }
/* a caption on the line of the arrows, at the start of the bar (the recipes, Elia 2026-11-23) */
.bk-cap { grid-column: 1; grid-row: 1; justify-self: start; font-family: var(--f-body); font-size: 16px; line-height: 20.8px; }
@media (max-width: 520px) {
  .bk-cap { grid-column: 1 / -1; grid-row: 3; }
  .bk-bar { column-gap: 10px; row-gap: 10px; font-size: 14px; }
  .bk-num { min-width: 0; }
  .bk-zoom { grid-column: 2 / 5; grid-row: 2; justify-self: center; }
}
.lb-single .lb-prev, .lb-single .lb-next { display: none; }
.video video { display: block; width: 100%; height: auto; background: #000; object-fit: cover; }  /* block: no line gap under it, so its caption sits 12px below like every caption */
.video.missing { display: grid; place-items: center; }
.video.missing { padding: 40px; text-align: center; border: 1px dashed var(--line); }
.audio { display: flex; gap: 20px; align-items: center; }
.audio img { width: 110px; height: auto; }
.audio div { flex: 1; }
.audio audio { width: 100%; margin-top: 8px; }
.audio-t { font-weight: 500; }
.audio-a { font-size: 15px; }
.vec img { width: 100%; }

/* buttons */
.btn-wrap { margin-top: 40px; }
.btn {
  display: inline-block; padding: 10px 26px; border: 1px solid var(--accent); text-decoration: none;
  font-size: 17px; transition: background .25s, color .25s;
}
.btn:hover { background: var(--accent); color: var(--bg); }

/* cards: home / chapters index grid, and Wix repeater cards reproduced box by box */
.cards { display: flex; flex-wrap: wrap; direction: ltr; }
.cards > .card { position: relative; display: block; text-decoration: none; direction: rtl; transition: transform .2s ease; }
.cards > .card:hover { transform: translateY(-6px); }
.cv-it { position: absolute; display: block; }
.cv-it .box { display: block; position: relative; overflow: hidden; width: 100%; height: 100%; }
.cv-it .box img { position: absolute; max-width: none; height: auto; }
.cv-it .txt { line-height: 1.3; }
.cv-it .btn { display: block; text-align: center; }
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-top: 60px; direction: rtl; }
.cards-4 .card { display: block; text-decoration: none; transition: transform .2s ease; }
.cards-4 .card:hover { transform: translateY(-6px); }
.card-img { display: block; aspect-ratio: 293 / 362; overflow: hidden; background: var(--bg-soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-txt { display: block; text-align: center; margin-top: 14px; }
.card-title { display: block; font-size: 19px; }

/* chapter timeline: stations on a line under the header (one per subchapter) */
:root { --tl: var(--ink); --tl-soft: var(--line); }  /* was navy #2E3A52 */
.tl { position: sticky; top: var(--hdr-compact); z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
/* trial (Elia, 2026-11-16): the timeline lives at the foot of the screen. Back to the top: delete these two rules */
.tl { position: fixed; top: auto; bottom: 0; inset-inline: 0; z-index: 41; border-bottom: 0; border-top: 1px solid var(--line); }
/* the bar stops at the end of the chapter, right above the navigation to the next chapter (Elia, 2026-11-22):
   site.js lifts it with the page once the navigation comes up, and this is the room it rests in */
body:has(nav.tl) .chapnav { margin-top: var(--tl-h, 0px); }
.tl-in { position: relative; max-width: var(--content); margin-inline: auto; padding: 0 var(--margin);
  overflow-x: auto; scrollbar-width: none; }
.tl-in::-webkit-scrollbar { display: none; }
.tl ol { list-style: none; margin: 0; padding: 0; display: flex; position: relative; z-index: 1; }
.tl li { flex: 1 0 118px; }
.tl a { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none;
  padding: 10px 6px 12px; color: var(--ink); }
.tl-y { font-family: var(--f-mono); font-size: 14px; line-height: 16px; height: 16px; color: var(--tl); }
/* stations after Elia's reference (2026-11-16): a 1px line, every dot a solid 7px ink circle, the current one a solid
   12px ink circle (tried 14px bordeaux, then 11px). The dot sits centred in a 14px box, so the line meets every centre */
.tl-d { width: 14px; height: 14px; margin: 6px 0 8px; display: grid; place-items: center; }
.tl-d::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ink);
  transition: width .3s, height .3s, background .3s; }
.tl li.past .tl-d::after, .tl li.on .tl-d::after { background: #8B0000; }  /* the dots already reached go bordeaux with the progress line (Elia, 2026-11-17) */
.tl li.on .tl-d::after { width: 14px; height: 14px; }  /* a touch larger, 2026-11-17: text 14, dots 8, current 14 (were 13/7/12) */
.tl-t { font-family: var(--f-mono); font-size: 14px; line-height: 1.3; max-width: 15em;  /* mono like the years (Elia, 2026-11-16) */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-line { position: absolute; top: 38.5px; height: 1px; background: var(--line); }  /* placed by site.js */
.tl-prog { position: absolute; top: 0; right: 0; height: 1px; width: 0; background: #8B0000; }  /* progress: the same 1px line, in the site's bordeaux over the faint one (Elia, 2026-11-17; ink before, 3px at first) */

/* chapter navigation: one hairline above, the previous chapter on the right, the next on the left */
.chapnav {
  max-width: var(--content); margin: 0 auto 0; padding: 56px 0 72px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 40px;
}
.chapnav { margin-inline: max(var(--margin), calc((100% - var(--content)) / 2)); }
/* the two links sit within the text column (741), flush with its start and its end; the hairline stays full width */
.chapnav { display: grid; grid-template-columns: 1fr minmax(0, calc(var(--single) + 320px)) 1fr; gap: 0; }  /* centred on the page; 160 wider than the text on each side (Elia) */
.chapnav > .cn { grid-row: 1; grid-column: 2; max-width: calc(50% - 10px); }  /* both share the column: never touch */
.chapnav > .cn.prev { justify-self: start; }
.chapnav > .cn.next { justify-self: end; }
.cn { display: flex; flex-direction: column; text-decoration: none; min-width: 0; }
.cn.prev { align-items: flex-end; }  /* mirrored: the arrow leads at the right, the label ends where the name ends */
.cn.next { align-items: flex-start; }  /* the label starts where the chapter name starts (at the right) */
.cn-l { font-family: var(--f-mono); font-size: 15px; }
.cn-t { font-size: 24px; font-weight: 400; margin-top: 10px; display: flex; gap: 14px; align-items: baseline; transition: transform .25s ease; }
.cn-a { font-size: 20px; display: inline-block; width: 22px; text-align: center; }
.cn.next:hover .cn-t { transform: translateX(-8px); }
.cn.prev:hover .cn-t { transform: translateX(8px); }
main:has(.chapnav) + .ftr .sec-rule { display: none; }  /* chapters: the line above the navigation is the only one */
main:has(.chapnav) + .ftr p { margin-top: 0; }

/* home */
.home-hero { position: relative; height: calc(100vh - var(--hdr)); min-height: 520px; overflow: hidden; }
.home-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity 1.8s ease; }
.home-hero-img.on { opacity: 1; animation: slowzoom 22s ease-out both; }
@keyframes slowzoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.home-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .42), rgba(0, 0, 0, 0)); }
.home-hero-txt {
  position: absolute; z-index: 1; inset-inline-start: max(var(--margin), calc((100% - var(--content)) / 2));
  bottom: 56px; color: #0C3E7D; text-shadow: none;  /* name, line and dates in the blue of Masha's shirt */
}
/* the blue is sampled from Masha's shirt in the photo and is as deep as the site's bordeaux #8B0000 */
.home-hero-txt h1 { color: inherit; font-family: var(--f-body); font-weight: 500; font-size: 38px; line-height: 44px;
  letter-spacing: 0; margin: 0; }
.hh-hand { display: block; font-family: "Pil Kahol", var(--f-body); font-weight: 400; font-size: 116px; line-height: 1;
  margin-bottom: 6px; padding-inline-end: .12em; }
.hh-rest { display: block; font-size: 64px; line-height: 1.1; margin-top: 4px; }
/* optical alignment: the ink of the name, the line and the dates starts exactly on the logo's line.
   The hand-drawn מ of "מאשה" starts .035em inside its box. */
.hh-hand:not(.hh-rest) { margin-inline-start: -.035em; }
/* the name is simply there (no writing effect); the whole block fades in gently with the photo */
.home-hero.wait .home-hero-txt { opacity: 0; }
.home-hero.go .home-hero-txt { animation: rise 1.4s ease .4s both; }
@keyframes write { from { clip-path: inset(-30% -10% -40% 100%); } to { clip-path: inset(-30% -10% -40% -10%); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.home-hero-txt .hr { display: block; width: 64px; height: 0; border-top: 0.67px solid currentColor; margin: 18px 0 14px; margin-inline-start: 1px; }
/* the dates stay white (the name and line are blue), a little larger and more spaced, with the soft shadow for legibility */
/* Masada Mono with no added spacing, so it reads as mono like the timeline (Elia, 2026-11-16; was letter-spacing .16em) */
.home-hero-txt .dates { font-family: var(--f-mono); font-size: 19px; line-height: 24px; letter-spacing: 0;
  color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .25);
  margin: 0; direction: ltr; text-align: right; }
.home-down { position: absolute; z-index: 1; left: 50%; bottom: 22px; transform: translateX(-50%); color: #fff;
  padding: 10px; animation: nudge 2.4s ease-in-out infinite; }
.home-down:hover { opacity: 1; }
@keyframes nudge { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* opening quote: one centred column */
.home-quote { padding: 120px var(--margin) 120px; }
.home-quote .hq { max-width: 741px; margin: 0 auto; text-align: center; }
.home-quote .hq-ask { font-family: var(--f-body); font-size: 17px; line-height: 26px;
  color: var(--muted, #6b6259); margin: 0; }
.home-quote .hq-q { margin: 40px 0 0; font-family: var(--f-body); font-weight: 400; font-size: 24px; line-height: 38px; }
.home-quote .hq-q p { margin: 0; text-wrap: balance; }
.home-quote .hq-q p + p { margin-top: 19px; }
/* the quote, in the deep red it had on Wix: the words wait in the same red, faded, and deepen to full red
   word by word as you scroll (site.js), like ink soaking in. Nothing moves, so the lines never jump. */
.home-quote .hq-q { color: #8B0000; }
.home-quote .hq-q.fill .w { color: rgba(139, 0, 0, .2); transition: color .45s ease; }
.home-quote .hq-q.fill .w.on { color: #8B0000; }
.home-quote .hq-sig { display: block; width: 195px; height: auto; margin: 48px auto 0; mix-blend-mode: multiply; }
.home-quote .hq-src { font-size: 16px; line-height: 20.8px; margin: 12px 0 0; color: var(--muted, #6b6259); }
.home-strip { display: flex; gap: 24px; margin-top: 60px; align-items: flex-start; }
.home-strip .ph { flex: 1; }

/* family tree */
.tree-frame { width: 100%; height: min(85vh, 1000px); border: 0; margin-top: 60px; background: transparent; }

/* popups */
.pop {
  border: 0; padding: 0; background: var(--pop-bg); color: var(--ink);
  width: min(760px, 92vw); max-height: 88vh; overflow: auto;
}
.pop::backdrop { background: rgba(40, 40, 40, .55); }
.pop-in { padding: 60px 64px; }
.pop-in h2 { text-align: center; }
.pop-in .minirule { margin: 20px auto 32px; }
/* the note at the start of "משפחת פת": quiet and airy */
.pop-intro { width: min(640px, 92vw); box-shadow: 0 18px 60px rgba(40, 40, 40, .12); animation: pop-in .5s ease both; }
.pop-intro::backdrop { background: rgba(40, 40, 40, .28); animation: fade-in .5s ease both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.pop-intro .pop-x { margin: 18px; font-size: 24px; font-weight: 300; }
.pop-x, .pop-in { outline: none; }
.pop-x:focus-visible { outline: 1px solid var(--line); outline-offset: 2px; }
.pop-intro .pop-in { padding: 88px 84px 72px; text-align: center; }
.pop-intro h2 { font-size: 26px; line-height: 34px; font-weight: 400; letter-spacing: .01em; }
.pop-intro .minirule { width: 48px; margin: 28px auto 32px; }
.pop-intro .text p { font-size: 18px; line-height: 32px; color: var(--muted, #6b6259); }
.pop-btns { display: flex; gap: 28px; align-items: center; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.pop-btns .btn { cursor: pointer; font: inherit; font-size: 16px; min-width: 170px; text-align: center; }  /* both buttons alike */
.pop-intro .btn:not(.btn-ghost) { padding: 9px 24px; border-color: var(--line); }
button.btn { background: none; color: inherit; }
.btn-ghost { background: none; border-color: transparent; padding-inline: 4px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
.btn-ghost:hover { background: none; color: inherit; opacity: 1; }
.pop-x {
  position: sticky; top: 0; float: left; margin: 10px; border: 0; background: none;
  font-size: 30px; cursor: pointer; color: var(--ink); z-index: 2;
}
.pop-tree { width: 94vw; height: 90vh; max-height: 90vh; }
.pop-tree iframe { width: 100%; height: calc(100% - 4px); border: 0; }
.pop-tree .pop-x { position: absolute; left: 0; top: 0; }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(30, 30, 30, .92); display: grid; place-items: center; }
.lb[hidden] { display: none; }
.lb img { max-width: 92vw; max-height: 90vh; object-fit: contain; }
/* the caption right under the enlarged photo (Elia, 2026-11-23) */
.lb-cap { display: none; margin: 0; max-width: min(741px, 88vw); text-align: center; color: #fff; font-size: 16px;
  line-height: 20.8px; pointer-events: none; transition: opacity .2s; }
.lb.has-cap { align-content: center; row-gap: 16px; }
.lb.has-cap .lb-cap { display: block; }
.lb.has-cap img { max-height: calc(90vh - 58px); }
.lb.lb-zoomed .lb-cap { opacity: 0; }
/* touch screens: the photo in the lightbox can be pinched or tapped twice to zoom (site.js); the page itself does not zoom.
   A mouse is not affected */
@media (pointer: coarse) {
  .lb { touch-action: none; overflow: hidden; }
  /* a tap on a photo is a tap: no double-tap page zoom, no delay (Elia, 2026-11-23) */
  .ph .box, .pg-it, img[data-full] { touch-action: manipulation; cursor: pointer; }
  .lb img { transition: transform .25s ease; transform-origin: center; }
  .lb.lb-gesture img { transition: none; }
  .lb.lb-zoomed .lb-prev, .lb.lb-zoomed .lb-next { display: none; }
}
.lb img[src$=".svg"] { width: 92vw; height: auto; background: var(--bg); padding: 3vw; }
/* "lifted" photos (LIFT_PAGES): the photo looks like a print whose bottom corners rise a little off the page,
   two soft shadows under the corners, fading toward the middle.
   Softened 2026-11-16 (Elia): was rgba .5 / shadow 0 20px 15px .6 / 3.5deg */
.chapter.lift figure.ph:not(.vec):not(.no-lift), .chapter.lift .slideshow { position: relative; isolation: isolate; }
.chapter.lift figure.ph:not(.vec):not(.no-lift)::before, .chapter.lift figure.ph:not(.vec):not(.no-lift)::after,
.chapter.lift .slideshow::before, .chapter.lift .slideshow::after {
  content: ""; position: absolute; z-index: -1; bottom: 16px; left: 1%; width: 48%; height: 40%; max-height: 140px;
  background: rgba(0, 0, 0, .3); box-shadow: 0 15px 14px rgba(0, 0, 0, .32); transform: rotate(-3deg); pointer-events: none;
}
.chapter.lift figure.ph:not(.vec):not(.no-lift)::after, .chapter.lift .slideshow::after { left: auto; right: 1%; transform: rotate(3deg); }
/* a collage reads as one print: the shadow goes under the whole row, not under each photo */
.chapter.lift .collage { position: relative; isolation: isolate; }
.chapter.lift .collage figure.ph::before, .chapter.lift .collage figure.ph::after { content: none; }
.chapter.lift .collage::before, .chapter.lift .collage::after {
  content: ""; position: absolute; z-index: -1; bottom: 16px; left: 1%; width: 48%; height: 40%; max-height: 140px;
  background: rgba(0, 0, 0, .3); box-shadow: 0 15px 14px rgba(0, 0, 0, .32); transform: rotate(-3deg); pointer-events: none; }
.chapter.lift .collage::after { left: auto; right: 1%; transform: rotate(3deg); }

/* things from the internet (NO_LIFT): no shadow, and their white paper melts into the page colour (multiply).
   The box is filled with the page colour because it is its own stacking context (container-type) */
.ph.no-lift .box { background: var(--bg); }
.ph.no-lift .box img { mix-blend-mode: multiply; }

/* FRAMED (Rama, 2026-11-20): a light page that would melt into the cream page gets a hairline frame on its edge.
   A 1px ring drawn just outside the box: the photo keeps its size and nothing of it is covered or cut */
.ph.framed .box { box-shadow: 0 0 0 1px var(--line); }

/* the family-tree drawings: a sheet of paper with a soft shadow under it */
.ph.tree-card .box { background: #FFFDF7; overflow: visible; box-shadow: 0 2px 8px rgba(40, 40, 40, .28); }  /* drawings (the family trees) on paper, as large as the screen allows */
.lb button { position: absolute; border: 0; background: none; color: #fff; font-size: 34px; cursor: pointer; padding: 16px; }
.lb-x { top: 10px; left: 10px; }
.lb-prev { right: 10px; top: 50%; translate: 0 -50%; }
.lb-next { left: 10px; top: 50%; translate: 0 -50%; }

/* footer */
.ftr { max-width: var(--content); margin: 0 auto; padding: 0 var(--margin) 40px; text-align: center; font-size: 15px; }
.ftr p { margin-top: 30px; }
body .ftr p.ftr-credit { margin-top: 4px; font-size: 13px; line-height: 20px; opacity: .7; }  /* the credit: a smaller, lighter line under the name */

/* ---------- entrance animation: gentle fade, once */
.js .fx { opacity: 0; transition: opacity .8s ease; }
.js .fx-slow { transition-duration: 1.2s; }
.js .fx.in { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .js .fx { opacity: 1; transition: none; }
  .home-hero-img, .home-hero-img.on, .home-down, .home-hero.go * { animation: none !important; }
  .js .home-quote .hq-q .c { opacity: 1; }
  .hq-caret { display: none; }
  .hdr, .brand, .menu, .menu a::after { transition: none !important; }
}

/* ---------- smaller screens */
@media (max-width: 1100px) {
  :root { --margin: 40px; --colgap: 56px; }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery.masonry.m3 { columns: 2; }
}
@media (max-width: 820px) {
  :root { --margin: 16px; --s-media: 56px; }
  body { font-size: 18px; line-height: 28px; }
  h1 { font-size: 30px; line-height: 36px; }
  .two { grid-template-columns: 1fr; }
  .col-r { grid-row: 1; grid-column: 1; }
  .col-l { grid-row: 2; grid-column: 1; margin-top: 56px; }
  .mid { display: none; }
  .blk { width: 100% !important; margin-right: 0 !important; margin-top: min(var(--gap, 0), 56px); }
  .blk:has(> .minirule) { width: 48px !important; }
  .row:not(.imgrow) { flex-direction: column; direction: rtl; }
  .row:not(.imgrow) > .cell { flex-basis: auto; width: 100%; margin: 24px 0 0 !important; }
  .row:not(.imgrow) > .cell:first-child { margin-top: 0 !important; }
  .cards > .card { flex-basis: 48% !important; }
  .gallery.masonry, .gallery.masonry.m3 { columns: 1; }
  .home-strip { flex-wrap: wrap; }
  .home-strip .ph { flex: 1 1 40%; }
  .chapnav { gap: 0; }
  .cn-t { font-size: 20px; }
  .pop-in { padding: 48px 22px; }
  .home-hero-txt h1 { font-size: 30px; line-height: 36px; }
  /* on a phone the name and dates fall on the dark part of the photo, so they stay white there (until the phone pass) */
  .home-hero-txt { color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .25); }
  .hh-hand { font-size: 80px; }
  .hh-rest { font-size: 44px; }
  .home-quote { padding: 80px var(--margin); }
  .home-quote .hq-q { font-size: 20px; line-height: 32px; }
}
@media (max-width: 520px) {
  .cards-4 { grid-template-columns: 1fr 1fr; gap: 20px; }
}
/* phone pass (2026-11-16): big enough to tap (44px), never smaller than 14px to read */
@media (max-width: 640px) {
  .bk-bar button, .plm-play, .plm-up, .plm-x { min-height: 44px; min-width: 44px; }
  .pdf-open { font-size: 14px; padding: 10px 0; }
  .tl-y, .tl-t, .pl-label, .pl-time, .pl-total, .pl-n, .pl-dur, .f-mono { font-size: 14px !important; }
}

/* keyboard: a visible focus ring, and a skip link that appears only when tabbing */
:focus-visible { outline: 2px solid var(--tl, #2E3A52); outline-offset: 3px; }
.skip { position: absolute; top: -60px; right: 16px; z-index: 100; background: var(--bg); padding: 8px 16px;
  border: 1px solid var(--line); transition: top .2s; }
.skip:focus { top: 12px; }

/* chapter cards (home and "פרקי חיים"): four equal cards, one equal gap, photo then caption 12 below */
.row:has(.cards) { column-gap: 40px; }
.row:has(.cards) > .cell { flex: 1 1 0; margin-left: 0; }
.cards { flex-wrap: nowrap; column-gap: 40px !important; }
.cards > .card { flex: 1 1 0 !important; aspect-ratio: auto !important; }
.cards > .card > .cv-WPhoto { position: relative !important; display: block; left: 0 !important; top: 0 !important;
  width: 100% !important; height: auto !important; aspect-ratio: 293 / 362; }
.cards > .card > .cv-WRichText { position: static !important; display: block; width: 100% !important; height: auto !important;
  margin-top: 12px; text-align: center; }
@media (max-width: 820px) {
  .row:has(.cards) > .cell { margin-top: 24px !important; }
  .row:has(.cards) > .cell:first-child { margin-top: 0 !important; }
  .cards { flex-wrap: nowrap; column-gap: 16px !important; }
  .cards > .card { flex: 1 1 0 !important; }
}
@media (max-width: 640px) {  /* many cards in a row (the writings): two to a row on a phone */
  .cards:has(> .card:nth-child(5)) { display: grid !important; grid-template-columns: 1fr 1fr; gap: 28px 16px; }
}

/* "מאשה כותבת" (WRITING_CARDS): four cards to a row, the rest centred; a white label with a thin line
   lies over the foot of each photo */
.wcards { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; direction: ltr; }  /* Wix order: first card on the left */
.wcard { flex: 0 0 calc((100% - 120px) / 4); display: block; direction: rtl; background: #FFFDF8; color: var(--ink); text-decoration: none;
  padding-bottom: 32px; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.wcard:hover { transform: translateY(-6px); }
.wc-ph .box { display: block; position: relative; overflow: hidden; background: var(--bg-soft); }
.wc-ph .box img { position: absolute; max-width: none; height: auto; }
.wc-tag { display: block; position: relative; width: 85%; margin: -30px auto 0; padding: 14px 10px 16px;
  background: #fff; border: 1px solid rgba(40, 40, 40, .7); text-align: center; }
.wc-date { display: block; font-family: var(--f-mono); font-size: 12px; line-height: 20px; letter-spacing: .08em; }
.wc-title { display: block; margin-top: 4px; font-size: 19px; line-height: 26px; }
.wc-more { display: block; margin-top: 8px; font-size: 14px; line-height: 20px; color: #8B0000; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 820px) {
  .wcards { gap: 28px 16px; }
  .wcard { flex-basis: calc((100% - 16px) / 2); padding-bottom: 20px; }
  .wc-tag { width: 90%; margin-top: -20px; padding: 10px 6px 12px; }
  .wc-title { font-size: 16px; line-height: 22px; }
}

/* chapter opening: the text column ends on the line where the photo ends */
.hero .row { align-items: stretch; }
.hero .row > .cell:not(:has(figure)) { margin-top: 0 !important; display: flex; flex-direction: column; justify-content: flex-end; }
.hero .row > .cell:not(:has(figure)) > .blk:last-child > .tx-body > p:last-child { margin-bottom: calc((1lh - 1em) / -2); }  /* last line's baseline area, not its line box */
/* chapter opening: a narrow, long text column (440px) standing next to the photo */
@media (min-width: 821px) {
  /* text and photo keep their gap and sit together in the middle of the page */
  .hero .row { justify-content: center; }
  .hero .row > .cell:not(:has(figure)) { flex: 0 0 440px; margin-left: 0 !important; margin-right: 0 !important; }
}

/* interview ("לא דיברנו עוד על רגשות"): a narrow conversation, the speaker's name beside each line */
.dialogue { max-width: var(--single); margin: 56px auto 0; }
.dlg-row { display: grid; grid-template-columns: 64px 1fr; column-gap: 24px; align-items: baseline; }
.dlg-row + .dlg-row { margin-top: 19px; }
/* a question opens a new exchange: more air before it, so question and answer read as one pair */
.dlg-row:not([data-who="אורית"]) + .dlg-row[data-who="אורית"] { margin-top: 40px; }
.dlg-who { font-family: var(--f-mono); font-size: 14px; letter-spacing: .04em; color: var(--accent); }
.dlg-txt, .dlg-txt * { font-size: 19px !important; line-height: 30px !important; }
.dlg-txt p { margin: 0; }
/* the interviewer asks in Masada Light (300), Masha and Rama answer in medium (500); same colour for all */
.dlg-row[data-who="אורית"] .dlg-txt, .dlg-row[data-who="אורית"] .dlg-txt * { font-weight: 300 !important; }
.dlg-row:not([data-who="אורית"]) .dlg-txt, .dlg-row:not([data-who="אורית"]) .dlg-txt * { font-weight: 500 !important; }
/* a part of the conversation: starts at the column's right edge, over the speakers' names, like every title */
.dlg-sub { font-size: 24px; line-height: 1.25; font-weight: 500; margin: 80px 0 32px; }
@media (max-width: 820px) {
  .dlg-row { grid-template-columns: 1fr; row-gap: 2px; }
  .dlg-sub { padding-inline-start: 0; margin-top: 56px; }
}

/* the interview player (both recordings in one) */
.pl-mini { position: fixed; inset-inline: 0; bottom: var(--tl-h, 0px); z-index: 40; background: var(--bg); border-top: 1px solid var(--line);
  transform: translateY(calc(100% + var(--tl-h, 0px))); transition: transform .3s ease; }  /* hidden: below the timeline too */
.pl-mini.on { transform: none; }
.plm-in { max-width: calc(var(--content) + 2 * var(--margin)); margin-inline: auto; padding: 12px var(--margin);
  display: flex; align-items: center; gap: 20px; }
.plm-play { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; border: 1px solid var(--ink); background: none;
  color: var(--ink); position: relative; cursor: pointer; padding: 0; }
.plm-play:hover { background: var(--ink); color: var(--bg); }
.plm-play span { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-35%, -50%);
  border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.pl-mini.playing .plm-play span { width: 10px; height: 12px; border: 0; transform: translate(-50%, -50%);
  border-inline: 3px solid currentColor; }
.plm-title { font-size: 16px; }
.plm-time { font-family: var(--f-mono); font-size: 13px; direction: ltr; margin-inline-start: auto; }
.plm-up, .plm-x { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; font-size: 15px; padding: 4px; }
.plm-up:hover { text-decoration: underline; text-underline-offset: 4px; }
.plm-x { font-size: 22px; line-height: 1; }
.plm-x:hover { opacity: 1; }
.plm-bar { position: absolute; top: -1px; right: 0; height: 2px; width: 0; background: var(--ink); }
@media (max-width: 640px) { .plm-title { display: none; } .plm-in { gap: 14px; } }
.pl { max-width: var(--single); margin: 56px auto 0; display: grid; grid-template-columns: 150px 1fr; column-gap: 32px;
  align-items: stretch; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; }
.pl-cover { width: 150px; height: 100%; object-fit: cover; display: block; }  /* the painting runs the full height of the player */
.pl-label { font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em; color: var(--accent); margin: 0; }
.pl-title { font-size: 24px; font-weight: 500; margin: 6px 0 0; line-height: 1.2; }
.pl-artist { font-size: 16px; margin: 4px 0 0; }
.pl-ctrl { display: flex; align-items: center; gap: 14px; margin-top: 20px; direction: ltr; }
.pl-play { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; border: 1px solid var(--ink); background: none;
  color: var(--ink); cursor: pointer; position: relative; padding: 0; }
.pl-play:hover { background: var(--ink); color: var(--bg); }
.pl-play span { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-35%, -50%);
  border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent currentColor; }
.pl.playing .pl-play span { width: 12px; height: 14px; border: 0; transform: translate(-50%, -50%);
  border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.pl-time, .pl-total { font-family: var(--f-mono); font-size: 13px; min-width: 4.2em; }
.pl-total { text-align: right; }
.pl-seek { flex: 1; -webkit-appearance: none; appearance: none; height: 2px; cursor: pointer; --p: 0%;
  background: linear-gradient(to right, var(--ink) var(--p), var(--line) var(--p)); }
.pl-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.pl-seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--ink); }
.pl-list { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--line); }
.pl-track { width: 100%; display: flex; gap: 16px; align-items: baseline; background: none; border: 0;
  border-bottom: 1px solid var(--line); padding: 10px 0; color: var(--ink); font: inherit; font-size: 17px; cursor: pointer; text-align: right; }
.pl-track:hover .pl-name, .pl-track.on .pl-name { text-decoration: underline; text-underline-offset: 4px; }
.pl-track.on { font-weight: 500; }
.pl-n, .pl-dur { font-family: var(--f-mono); font-size: 13px; color: var(--accent); }
.pl-name { flex: 1; }
@media (max-width: 820px) {
  .pl { grid-template-columns: 90px minmax(0, 1fr); column-gap: 18px; }
  .pl-cover { width: 90px; height: auto; }
  .pl-ctrl, .pl-list { grid-column: 1 / -1; }
}
.pl-main, .pl-ctrl, .pl-seek { min-width: 0; }

/* while a pop-up is open the page behind does not scroll */
html.pop-open { overflow: hidden; scrollbar-gutter: stable; }

/* home: chapter cards come alive on hover: the photo drifts closer, the name turns red, the years appear */
.cards > .card { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.cards .cv-WPhoto .box img { transition: transform 1.6s cubic-bezier(.2, .7, .2, 1); transform-origin: 50% 40%; }
.cards > .card:hover .cv-WPhoto .box img { transform: scale(1.07); }
.cards .cv-WRichText, .cards .cv-WRichText * { transition: color .4s ease; }
.cards > .card:hover .cv-WRichText, .cards > .card:hover .cv-WRichText * { color: #8B0000 !important; }
.cy { position: absolute; inset: auto 0 0 0; z-index: 1; padding: 48px 12px 14px; text-align: center; color: #fff;
  font-family: var(--f-mono); font-size: 15px; letter-spacing: .08em; direction: ltr;
  background: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); opacity: 0; transform: translateY(8px);
  transition: opacity .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1); pointer-events: none; }
.cards > .card:hover .cy, .cards > .card:focus-visible .cy { opacity: 1; transform: none; }
@media (hover: none) { .cy { opacity: 1; transform: none; } }

/* home: the gallery strip glides slowly; it stops under the mouse, and a click opens the photo large */
.mq { overflow: hidden; direction: ltr; padding-block: 22px; margin-block: -22px; }  /* exactly the content width; the padding is room for a photo growing on hover */
.mq-track { display: flex; width: max-content; animation: mq 233s linear infinite; }  /* 30 photos, same speed as before */
.mq:hover .mq-track { animation-play-state: paused; }
.mq-set { display: flex; }
.mq img { display: block; height: 320px; width: auto; max-width: none; margin-right: 24px; cursor: zoom-in;
  position: relative; transition: opacity .4s ease, transform .45s cubic-bezier(.2, .7, .2, 1); }
.mq img:hover { transform: scale(1.12); z-index: 1; }
.mq:hover img { opacity: .75; }
.mq:hover img:hover { opacity: 1; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 820px) { .mq img { height: 200px; margin-right: 14px; } }
@media (prefers-reduced-motion: reduce) { .mq { overflow-x: auto; } .mq-track { animation: none; } }

/* the language switch, "EN / עב" (Elia, 2026-11-23, like her reference): small and quiet at the end of the menu,
   the language you are reading in light, the other one a link */
.menu .lang { display: flex; align-items: baseline; gap: 6px; font-size: 14px; line-height: 1; letter-spacing: .04em;
  font-weight: 400; margin-inline-start: 8px; }
.menu .lang a { display: inline; }
.menu .lang a:hover { color: #8B0000; }
.lang-on, .lang-sep { opacity: .45; }
/* the copy in the top bar is for phones only */
.lang-m { display: none; }

/* phone (until the phone pass): madaf's 80px header; name above the menu, the name hides when scrolled */
@media (max-width: 640px) {
  /* phones: one row, the name and a hamburger; the menu opens over the whole screen, large and easy to tap */
  :root { --hdr: 60px; --hdr-compact: 60px; }
  .hdr-in { align-items: center; }
  .hdr-in::after { inset-inline: 0; }
  .brand, .hdr.compact .brand { font-size: 18px; margin: 0; border-bottom: 0; }
  .brand-sep, .brand-b, .hdr.compact .brand-sep, .hdr.compact .brand-b { font-size: 15px; }
  .brand-sep { margin-inline: 8px; }
  .burger { display: flex; }
  .menu { position: fixed; top: var(--hdr); inset-inline: 0; bottom: 0; z-index: 49; margin: 0; padding: 12px var(--margin) 40px;
    background: var(--bg); flex-direction: column; align-items: stretch; gap: 0; font-size: 22px; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s ease, transform .25s ease, visibility .25s; }
  .hdr.nav-open .menu { opacity: 1; visibility: visible; transform: none; }
  .hdr.compact .menu { font-size: 22px; }
  .menu > a, .has-sub > a { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .menu > a::after, .has-sub > a::after { display: none; }
  .menu a[aria-current] { color: #8B0000; }
  .has-sub::before { display: none; }
  /* visibility follows the menu: a closed menu's chapter list must not catch taps on the page (Elia, 2026-11-23:
     tapping a photo jumped to the top of another chapter) */
  .sub { position: static; opacity: 1; visibility: inherit; transform: none; margin: 0; padding: 4px 20px 10px 0;
    background: none; box-shadow: none; border: 0; border-bottom: 1px solid var(--line); }
  .sub li + li { margin-top: 0; }
  .sub a { font-size: 19px; padding: 11px 0; white-space: normal; }
  html.nav-lock, html.nav-lock body { overflow: hidden; }
  /* phones: "EN / עב" small in the top bar, beside the menu button (Elia, 2026-11-23) */
  .menu .lang { display: none; }
  .lang-m { display: flex; align-items: baseline; gap: 6px; font-size: 14px; line-height: 1; letter-spacing: .04em;
    margin-left: 14px; margin-right: auto; }
  .lang-m a { color: inherit; text-decoration: none; padding: 12px 0; }
}

/* names editor (page.html?names): only for Elia, never for visitors */
.names-edit .ov { pointer-events: auto; cursor: grab; touch-action: none; outline: 1px dashed rgba(255, 255, 255, .7); outline-offset: -1px; }
.names-edit .ov > span { outline: 1px dashed rgba(139, 0, 0, .8); outline-offset: 3px; }
.names-edit .ov { outline: 0; }
.names-edit .ov.ov-drag { cursor: grabbing; }
.names-edit .ov.ov-moved > span { outline-color: #2E7D32; }
.names-edit .ov > span::after { content: attr(data-fs); position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  font: 11px/1 ui-monospace, monospace; letter-spacing: 0; text-shadow: none; color: #fff; background: rgba(139, 0, 0, .85);
  padding: 2px 4px; border-radius: 3px; white-space: nowrap; pointer-events: none; }
.names-edit .ov.ov-sel > span { outline-style: solid; outline-width: 2px; }
.names-bar button:disabled { opacity: .4; cursor: default; }
.names-bar { position: fixed; z-index: 200; left: 16px; bottom: 16px; width: min(420px, 92vw); padding: 16px 18px;
  background: #fff; color: #333; font-size: 15px; line-height: 1.5; box-shadow: 0 6px 30px rgba(0, 0, 0, .18); border-radius: 6px; }
.names-bar p { margin: 0 0 8px; }
.names-bar button { font: inherit; padding: 6px 14px; cursor: pointer; background: #8B0000; color: #fff; border: 0; border-radius: 4px; }
.names-bar textarea { width: 100%; height: 70px; font: 12px/1.4 monospace; direction: ltr; }
/* captions editor (gallery.html?captions): a box under every photo, the hover caption hidden */
.caps-edit .gallery.masonry figcaption { display: none; }
.caps-edit .gallery figure img { cursor: default; }
.cap-in { position: relative; margin-top: 8px; }
.cap-in textarea { width: 100%; box-sizing: border-box; font: 16px/1.3 var(--f-body, inherit); padding: 6px 8px 6px 40px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); resize: vertical; }
.cap-in.cap-changed textarea { border-color: #8B0000; box-shadow: 0 0 0 1px #8B0000; }
.cap-n { position: absolute; left: 6px; top: 7px; font: 11px/1 ui-monospace, monospace; color: #fff; background: rgba(139, 0, 0, .85);
  padding: 2px 4px; border-radius: 3px; }
/* בעד / נגד as a table (last chapter, Elia 2026-11-17): the chapter's two columns, centre line between them */
.pc { display: grid; grid-template-columns: 1fr var(--colgap) 1fr; direction: ltr; align-items: start; }
.pc > * { direction: rtl; min-width: 0; }
.pc .pc-h { margin: 0; text-align: center; font-size: 28px; line-height: 35px; font-weight: 500; }  /* centred over their columns (Elia, 2026-11-17) */
.pc-rule { margin: 32px 0 40px; }
.pc-cell { margin-top: 40px; }
.pc > .pc-cell[style*="grid-row:3"] { margin-top: 0; }
.pc-cell.pc-sum { margin-top: 80px; }
.pc-cell.pc-sum .pc-h + .pc-p { margin-top: 32px; }
.pc .pc-date p { line-height: 1.9em !important; text-align: right !important; }
.pc .pc-p + .pc-p { margin-top: 19px; }
.pc-mid { position: relative; align-self: stretch; }
.pc-mid::before { content: ""; width: 6px; position: absolute; left: 50%; top: 0; bottom: 0; transform: translateX(-50%);
  border-inline: .67px solid var(--line); }
@media (max-width: 820px) {
  .pc { display: block; }
  .pc-rule, .pc-mid { display: none; }
  .pc > .pc-h { margin-top: 56px; }
  .pc > .pc-h:first-child { margin-top: 0; }
  .pc > .pc-h + .pc-cell { margin-top: 32px; }
  /* phones (Elia, 2026-11-23): בעד and its days, נגד and its days, then שורש and בית בלב */
  .pc { display: flex; flex-direction: column; align-items: stretch; }
  .pc > .pc-sum { order: 1; }
}

/* ---------- phone pass 2 (Elia, 2026-11-20). Everything here is for phones only (<= 640px): the computer version
   must not change at all, so nothing outside this block was touched. */
@media (max-width: 640px) {
  /* photos side by side: each caption under its own photo (site.js moves them on phones only);
     three photos or more in a row: one under the other, the right one first, each with its caption */
  .blk.m-gone { display: none; }
  .blk.m-cap { margin-top: 12px; }
  .blk.m-cap > .tx-cap p { text-align: right !important; }
  .row.imgrow.m-stack { flex-direction: column-reverse; row-gap: 40px; }
  .row.imgrow.m-stack > .cell { flex: none; width: 100%; margin: 0 !important; }

  /* the chapter cards in reading order: משפחת פת and מאשה והלל in the first row */
  .row:has(.cards) { flex-direction: column-reverse; row-gap: 24px; }
  .row:has(.cards) > .cell, .row:has(.cards) > .cell:first-child { margin-top: 0 !important; }

  /* gallery: two columns, the caption under each photo */
  .gallery.masonry, .gallery.masonry.m3 { columns: 2; column-gap: 16px; }
  .gallery.masonry > figure { margin-bottom: 24px; }
  .gallery figcaption { margin-top: 8px; font-size: 14px; line-height: 18px; }

  /* the chapter timeline: a strip of names under the header, sliding sideways, fading at the far end so it is
     clear there is more (after Elia's reference); the current station in the site's bordeaux */
  .tl { position: sticky; top: var(--hdr-compact); bottom: auto; border-top: 0; border-bottom: 1px solid var(--line); }
  body:has(nav.tl) { padding-bottom: 0; }
  .tl-in { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 56px); mask-image: linear-gradient(to right, transparent 0, #000 56px); }
  /* a progress line along the foot of the strip (Elia, 2026-11-22: it should read as a timeline): a dot under each name,
     the dots and the line already passed in bordeaux, the current dot larger, the names still ahead lighter */
  .tl-y { display: none; }
  .tl-t { order: 1; }
  .tl-d { order: 2; margin: 8px 0 6px; }
  .tl-line { top: 47px; }  /* 12 padding + 20 name + 8 + half the 14px dot box: through every dot's centre */
  .tl li:not(.past):not(.on) .tl-t { opacity: .5; }
  .tl.tl-moved .tl-in { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 56px, #000 calc(100% - 40px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 56px, #000 calc(100% - 40px), transparent 100%); }
  .tl ol { gap: 28px; }
  .tl ol::after { content: ''; flex: 0 0 40px; }  /* room to bring the last name out of the fade */
  .tl li { flex: 0 0 auto; }
  .tl a { padding: 12px 0 0; }
  .tl-t { display: block; max-width: none; white-space: nowrap; overflow: visible; -webkit-line-clamp: none;
    font-size: 15px !important; line-height: 20px; }
  .tl li.on .tl-t { color: #8B0000; }

  /* בעד / נגד: the diary lines as easy to read as the rest of the chapter */
  .pc .pc-p .f-mono { font-size: 16px !important; }
  .pc .pc-p p { line-height: 27px !important; text-align: right !important; }

  /* the note about the family tree: the text gets the width of the box */
  .pop-intro .pop-in { padding: 56px 24px 40px; }

  /* nothing smaller than 14 */
  .wc-date { font-size: 14px; }
  .blk > .tx-1l, .blk > .tx-1l * { font-size: 16px !important; white-space: normal; }

  /* the family-tree drawings in the chapter: too small to read on a phone, so say they open large */
  .ph.tree-card::after { content: 'לחצו להגדלה'; display: block; margin-top: 8px; font-size: 14px; line-height: 18px;
    text-align: center; color: var(--accent, var(--ink)); }
}

/* Phone language switch: keep the switch and the menu button full size; on very narrow phones show the short name only */
@media (max-width: 640px) {
  .lang-m, .burger { flex-shrink: 0; }
}
@media (max-width: 374px) {
  .brand-sep, .brand-b, .hdr.compact .brand-sep, .hdr.compact .brand-b { display: none; }
}

/* a caption under a slideshow leaves room for the page counter beside it (Rama, 2026-11-25) */
.blk:has(> .slideshow) + .blk > .tx-cap p { padding-left: 56px; }
.blk:has(> .slideshow) + .blk > .tx-cap p, .blk:has(> .slideshow) + .blk > .tx-cap p * { white-space: normal !important; }
