/* /preservation/ (tools/preservation_build.py, src/preservation.js) - scoped to .pres-page; shares the search field with /agri/ (agri.css). */
.pres-filters { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; margin: .6rem .2rem 0; }
.pres-filters select { font: inherit; padding: .35rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--panel, var(--bg)); color: inherit; min-block-size: 44px; }
.pres-filters label { display: inline-flex; gap: .4rem; align-items: center; }
.pres-list { list-style: none; padding: 0; margin: 0; }
.pres-row { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem .3rem; border-block-end: 1px solid var(--border); scroll-margin-block-start: 5rem; }
.pres-row.is-on { background: var(--surface, rgba(31,107,74,.08)); outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.pres-thumb { flex: none; display: block; inline-size: 96px; block-size: 96px; border-radius: 8px; overflow: hidden; background: var(--surface, #eee); }
.pres-thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.pres-txt { min-inline-size: 0; flex: 1; }
.pres-txt p { margin: .3rem 0; font-size: .95rem; line-height: 1.5; }   /* the description: one step under the address heading, never above it (a11y zoom scales the root, not this) */
.pres-txt b { font-size: 1.1rem; }
.pres-src { font-size: .85rem; color: var(--muted); margin-block-start: .25rem; }
.pres-more { font: inherit; padding: .6rem 1.2rem; min-block-size: 44px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel, var(--bg)); color: inherit; cursor: pointer; }
.pres-map { block-size: min(70vh, 600px); min-block-size: 360px; }
.pres-mk { box-sizing: border-box; cursor: pointer; }
.pres-mk-dot { inline-size: 14px; block-size: 14px; border-radius: 50%; background: #1f6b4a; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.45); }
.pres-mk-photo { inline-size: 48px; block-size: 48px; border-radius: 50%; overflow: hidden; border: 3px solid #1f6b4a; box-shadow: 0 2px 6px rgba(0,0,0,.4); background: #fff; }
.pres-mk-photo img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.pres-pop { direction: rtl; text-align: right; color: #222; }
.pres-popimg { display: block; inline-size: 100%; max-block-size: 110px; object-fit: cover; border-radius: 6px; margin-block-end: .4rem; }
.pres-page .maplibregl-popup-content { direction: rtl; }
.pres-city-block .pres-strip { display: flex; gap: .5rem; overflow-x: auto; margin: .4rem 0; padding: 0; list-style: none; }
.pres-city-block .pres-strip img { inline-size: 84px; block-size: 84px; object-fit: cover; border-radius: 8px; display: block; }
.pres-nomap [data-map] { display: none; }
.pres-cities { list-style: none; padding: 0; margin: .6rem 0 1.4rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; }
.pres-citycard { border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; background: var(--panel, var(--bg)); }
.pres-citycard a { font-size: 1.15rem; text-decoration: none; display: block; min-block-size: 44px; line-height: 44px; }
.pres-es { margin: .35rem 0; }
.pres-esh { font-size: .85rem; color: var(--muted); font-weight: 600; }
.pres-es p { margin: .15rem 0; }
.pres-esd summary { cursor: pointer; list-style: none; font-size: .9rem; }
.pres-esd summary::-webkit-details-marker { display: none; }
.pres-esc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pres-esm { color: #1f6b4a; font-weight: 600; text-decoration: underline; }
.pres-esd[open] summary { display: none; }
.pres-esd p { font-size: .9rem; max-block-size: 9rem; overflow: auto; }
.pres-pop { min-width: 0; overflow-wrap: anywhere; }
.pres-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: .5rem .2rem; font-size: .95rem; }
.pres-legend label { display: inline-flex; gap: .4rem; align-items: center; min-block-size: 44px; }
.pres-key { display: inline-block; inline-size: 14px; block-size: 14px; flex: none; }
.pres-key-s { border-radius: 50%; background: #1f6b4a; border: 2px solid #fff; box-shadow: 0 0 0 1px #1f6b4a; }
.pres-key-d { background: #c2410c; border: 2px solid #fff; box-shadow: 0 0 0 1px #c2410c; transform: rotate(45deg); }
.pres-mk-disc { inline-size: 22px; block-size: 22px; display: flex; align-items: center; justify-content: center; }
.pres-dk { display: block; inline-size: 14px; block-size: 14px; background: #c2410c; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.5); transform: rotate(45deg); }
.pres-disc { border-inline-start: 4px solid #c2410c; padding-inline-start: .7rem; }
.pres-mtg { margin: .5rem 0; padding-block-start: .4rem; border-block-start: 1px dashed var(--border); }
.pres-esd3 .pres-esc { -webkit-line-clamp: 3; }
.pres-esd[open] .pres-esm { display: none; }
.pres-nomore .pres-esm { display: none; }                       /* the text is fully visible: no "עוד" (measured in preservation.js) */
.pres-nomore summary { cursor: default; }
.pres-nomore[open] summary { display: block; }
.pres-nomore > p { display: none; }
.pres-about summary { cursor: pointer; font-weight: 600; min-block-size: 44px; display: flex; align-items: center; }
.pres-about summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.pres-mk.is-on { outline: 3px solid #1d4ed8; outline-offset: 2px; border-radius: 50%; }
.pres-mk:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
dialog.pres-dialog { border: 0; border-radius: 14px; padding: 0; margin: auto; width: 92% !important; max-width: 640px !important; height: auto; max-height: 90%;   /* % not vw: the site zooms every body child (a11y.css), a % resolves in the zoomed space, vw does not */ background: var(--panel, var(--bg, #fff)); color: inherit; box-shadow: 0 10px 40px rgba(0,0,0,.35); overflow: hidden; }
.pres-dialog::backdrop { background: rgba(0,0,0,.55); }
.pres-dbody { padding: 3.2rem 1.2rem 1.4rem; max-block-size: 100%; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; }
.pres-dx { position: absolute; inset-block-start: .5rem; inset-inline-start: .5rem; z-index: 2; inline-size: 44px; block-size: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel, var(--bg, #fff)); color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.pres-dx:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.pres-dimg { display: block; inline-size: 100%; max-block-size: 45vh; object-fit: cover; border-radius: 8px; margin-block-end: .6rem; }
.pres-dh { margin: .2rem 0; font-size: 1.3rem; }
.pres-dbody .pres-es p { font-size: 1rem; line-height: 1.6; }
@media (max-width: 640px) { dialog.pres-dialog { width: calc(100% - 16px) !important; max-width: none !important; height: calc(100% - 16px); max-height: none; margin: 8px; } .pres-dbody { max-block-size: none; block-size: 100%; } }
dialog.pres-dialog[open] { display: flex; flex-direction: column; }
.pres-dialog .pres-dbody { flex: 1 1 auto; min-block-size: 0; }
/* round 2 (Ram 11-25): every building's address is its own link (#b-<id>); the info window leads to that block; the legend says shape + colour in words */
.pres-self { color: inherit; text-decoration: none; }
.pres-self:hover, .pres-self:focus-visible { text-decoration: underline; }
.pres-dgo { margin: .2rem 0 .6rem; font-size: 1rem; }
.pres-dgo a { font-weight: 600; text-decoration: underline; }
.pres-keys { display: flex; flex-direction: column; gap: .2rem; margin: .6rem .2rem; padding: .7rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--panel, var(--bg)); }
.pres-keys .pres-keyrow { display: flex; align-items: center; gap: .8rem; min-block-size: 44px; font-size: 1.05rem; line-height: 1.4; }
.pres-keys .pres-keyrow label { display: flex; align-items: center; gap: .8rem; min-block-size: 44px; flex: 1; }
.pres-keys .pres-keyicon { flex: none; inline-size: 34px; block-size: 34px; display: flex; align-items: center; justify-content: center; }
.pres-keys .pres-key { inline-size: 22px; block-size: 22px; }
.pres-keys .pres-key-p { inline-size: 34px; block-size: 34px; border-radius: 50%; border: 3px solid #1f6b4a; background: #e8efe9; box-shadow: 0 1px 3px rgba(0,0,0,.4); display: block; }
.pres-keys .pres-key-d { inline-size: 20px; block-size: 20px; }
@media (min-width: 900px) { #presMapBlock { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 0 1.2rem; align-items: start; } #presMapBlock > .pres-map { grid-column: 1; grid-row: 1 / span 3; } #presMapBlock > .pres-keys { grid-column: 2; grid-row: 1; margin-block-start: 0; } #presMapBlock > .acc-hint { grid-column: 2; grid-row: 2; } }
.pres-sv { margin: .2rem 0 .6rem; font-size: 1rem; }
.pres-sv a { font-weight: 600; text-decoration: underline; }

/* full screen (Ram 11-25): the map block fills the screen - Fullscreen API where there is one, this same rule set pinned with position:fixed where there is not */
body.pres-fs-lock { overflow: hidden; }
#presMapBlock.pres-fs { align-items: stretch; position: fixed; inset: 0; z-index: 1000; display: flex !important; flex-direction: column; box-sizing: border-box; inline-size: 100%; block-size: 100vh; block-size: 100dvh; margin: 0; padding: 8px; background: var(--bg, #fff); overflow: hidden; }
#presMapBlock.pres-fs > .pres-map { flex: 1 1 auto; block-size: auto; min-block-size: 0; margin: 0; }
#presMapBlock.pres-fs > .pres-keys { flex: none; max-block-size: 34vh; max-block-size: 34dvh; overflow: auto; margin: 6px 0 0; padding: .3rem .8rem; }
#presMapBlock.pres-fs > .acc-hint { display: none; }
@media (min-width: 900px) { #presMapBlock.pres-fs { flex-direction: row; gap: 10px; } #presMapBlock.pres-fs > .pres-keys { flex: 0 0 20rem; max-block-size: none; margin: 0; align-self: stretch; } }
.pres-fsbtn { white-space: nowrap; font: inherit; font-weight: 600; font-size: .95rem; min-block-size: 44px; padding: 0 .9rem; cursor: pointer; color: #111; background: #fff; border: 0; border-radius: 4px; }

.pres-dfig { margin: .4rem 0 .6rem; max-inline-size: 28rem; }
.pres-dfig .pres-dimg { max-block-size: 18rem; margin-block-end: .25rem; }
.pres-dfig-big { max-inline-size: none; }
.pres-dfig-big .pres-dimg { max-block-size: 45vh; }
.pres-cr { display: inline-block; text-align: start; unicode-bidi: isolate; }
.pres-cr a { white-space: nowrap; }
/* the library's 29px-wide button rule cut the "מסך מלא" label on phones (11-25 review): the button is as wide as its words */
.maplibregl-ctrl-group .pres-fsbtn { width: auto; inline-size: auto; min-inline-size: 44px; }
