/* «קוד מותאם» (app/code-block.js, docs/CODE_BLOCK.md): one sandboxed frame,
   sized before it loads — a fixed height (fixed, and auto until the page
   reports its own), or an aspect-ratio — so nothing shifts when it arrives. */
.editorial-code-box{width:100%;max-width:100%;min-width:0;margin:22px auto 4px;box-sizing:border-box;}
.editorial-code-frame{position:relative;width:100%;max-width:100%;overflow:hidden;border-radius:var(--r-control);height:var(--code-h,400px);}
.editorial-code-box[data-mode="ratio"] .editorial-code-frame{height:auto;aspect-ratio:16/9;}
.editorial-code-box[data-ratio="4:3"] .editorial-code-frame{aspect-ratio:4/3;}
.editorial-code-box[data-ratio="1:1"] .editorial-code-frame{aspect-ratio:1/1;max-width:600px;margin-inline:auto;}
.editorial-code-box[data-ratio="9:16"] .editorial-code-frame{aspect-ratio:9/16;max-width:min(100%,400px);margin-inline:auto;}
.editorial-code-frame > iframe{position:absolute;inset:0;display:block;width:100%;height:100%;border:0;background:transparent;}
@media (max-width:640px){ .editorial-code-box{margin-top:16px;} }
/* «מקצה לקצה» (b.edge, app/code-block.js fitEdges): the section spans the
   page — margins from its parent's measured edges, no padding, border or
   corners; its title keeps its own room, and without one nothing is left
   above or below the frame. */
html body .editorial-block.editorial-code[data-code-edge]{width:auto !important;max-width:none !important;margin-left:var(--code-edge-l,0px) !important;margin-right:var(--code-edge-r,0px) !important;
  padding:0 !important;border:0 !important;border-radius:0 !important;box-shadow:none !important;clip-path:none !important;}
.editorial-code[data-code-edge] > .editorial-copy:empty{display:none;}
.editorial-code[data-code-edge] > .editorial-copy{padding:clamp(20px,4vw,44px) clamp(20px,4vw,44px) 0;}
.editorial-code[data-code-edge] .editorial-code-box{margin:0;}
.editorial-code[data-code-edge] .editorial-code-frame{border-radius:0;}
.editorial-code[data-code-edge] > .editorial-copy:not(:empty) + .editorial-code-box{margin-top:16px;}
/* «מרווחים» on an edge section (builder/section-design.js): above and below
   are 0 unless the owner set them (app/code-block.js), applied by
   content-placement.css; in the sections' column the row gap under it goes
   too unless the next section has room of its own above, so 0 touches both
   neighbours. «מרווח בצדדים» adds its room inside the page's edges. */
@media (min-width:641px){
  html .editorial > .editorial-block.editorial-code[data-code-edge]:has(+ .editorial-block:not([style*="--block-space-above-desktop"])){margin-bottom:calc(var(--block-space-below-desktop, 0px) - var(--ed-gap)) !important;}
  html body .editorial-block.editorial-code[data-code-edge][style*="--block-space-side-desktop"]{margin-left:calc(var(--code-edge-l, 0px) + var(--block-space-side-desktop)) !important;margin-right:calc(var(--code-edge-r, 0px) + var(--block-space-side-desktop)) !important;}
}
@media (max-width:640px){
  html .editorial > .editorial-block.editorial-code[data-code-edge]:has(+ .editorial-block:not([style*="--block-space-above-phone"])){margin-bottom:calc(var(--block-space-below-phone, 0px) - var(--ed-gap)) !important;}
  html body .editorial-block.editorial-code[data-code-edge][style*="--block-space-side-phone"]{margin-left:calc(var(--code-edge-l, 0px) + var(--block-space-side-phone)) !important;margin-right:calc(var(--code-edge-r, 0px) + var(--block-space-side-phone)) !important;}
}
