/* Article reading layout (articles audit, 8.11.2026). Loaded on /post/ pages only, after site.css and demo5-skin.css.
   Yair 8.11 16:21: the article is narrow and the reading/scrolling must be comfortable on desktop and mobile.
   Desktop: one ~720 px reading column (header, cover, body card and form share it). Mobile: the paper card runs edge to edge,
   17 px text, wide line height. Images, tables and long formulas stay inside their own box, never page-level sideways scroll. */
.post .wrap.narrow{max-width:calc(820px + 2*var(--gut))}
.post .post-body{max-width:none;font-size:18.5px;line-height:1.78;padding:clamp(18px,4.6vw,48px)!important;overflow-wrap:break-word}
.post .post-body>*{max-width:100%}
.post .post-body p,.post .post-body ul,.post .post-body ol{margin:0 0 1.05em}
.post .post-body li{margin-bottom:.5em}
.post .post-body li>p{margin:0 0 .45em}
.post .post-body h2,.post .post-body h3,.post .post-body h4{scroll-margin-top:100px;line-height:1.25}
.post .post-body h2{margin:1.9em 0 .6em}
.post .post-body h3{margin:1.6em 0 .5em}
.post .post-body h4{font:400 clamp(18px,1.7vw,21px)/1.3 var(--display);margin:1.3em 0 .4em;color:var(--ink)}
.post .post-body li>h2,.post .post-body li>h3,.post .post-body li>h4{margin-top:.2em}
.post .post-body>:first-child{margin-top:0}
/* images: their own natural size (formula images are small), centred like on the old site, never wider than the card */
.post .post-body img{display:block;max-width:100%;height:auto;margin:1em auto;border-radius:10px}
.post .post-body li img{margin:.6em auto .8em}
.post .post-body figure{margin:1.4em 0}
.post .post-body figure img{margin:0 auto}
.post .post-body figcaption{margin-top:.55em;text-align:center;font-size:15.5px;line-height:1.5;color:var(--ink-2);font-style:italic}
/* tables and anything wide: scroll inside its own box */
.post .post-body .tbl{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:1.2em 0;border:1.5px solid var(--ink);border-radius:12px;background:#fff}
.post .post-body .tbl table{display:table;margin:0;min-width:0;width:100%;font-size:16px;line-height:1.5}
.post .post-body .tbl td,.post .post-body .tbl th{border:1px solid #e3d9c6;padding:9px 12px;vertical-align:top}
.post .post-body .tbl tr:first-child td,.post .post-body .tbl th{background:#F3ECDF;font-weight:700}
.post .post-body pre,.post .post-body code{overflow-x:auto;max-width:100%}
.post .post-body blockquote{margin:1.3em 0;padding:.9em 1.1em;border-inline-start:5px solid #D63A40;background:#F3ECDF;border-radius:0 12px 12px 0;color:var(--ink)}
[dir=rtl] .post .post-body blockquote{border-radius:12px 0 0 12px}
.post .post-body blockquote p:last-child{margin-bottom:0}
/* exercises and their solutions (visible, as on the old Wix site) */
.post .post-body .sol-label{display:inline-block;margin:.5em 0 .1em;padding:2px 12px;border-radius:999px;background:#0E1E4A;color:#fff;font-size:15.5px;line-height:1.7}
.post .post-body .sol-label strong{color:inherit;font-weight:700}
.post .post-body .sol-final{background:#F3ECDF;border-inline-start:4px solid #D63A40;padding:.45em .8em;border-radius:8px}
.post .post-body li.ex{border:1.5px solid #0E1E4A;border-radius:14px;background:#fff;padding:14px 18px 10px;margin:0 0 16px;box-shadow:3px 4px 0 rgba(14,30,74,.10)}
.post .post-body ol:has(>li.ex){padding-inline-start:1.6em}
.post .post-body li.ex::marker{font-family:var(--display);color:#D63A40}
/* video (click to play) and decorative animations from the old posts */
.post .post-body .post-video{position:relative;display:block;max-width:640px;margin:1.4em auto;aspect-ratio:16/9;border-radius:14px;overflow:hidden;border:2px solid #0E1E4A;box-shadow:4px 5px 0 rgba(14,30,74,.14);background:#0E1E4A;padding:0;cursor:pointer;width:100%}
.post .post-body .post-video img{width:100%;height:100%;object-fit:cover;margin:0;border-radius:0}
.post .post-body .post-video .play{position:absolute;inset:0;margin:auto;width:72px;height:52px;border-radius:14px;background:#D63A40;display:grid;place-items:center}
.post .post-body .post-video .play::after{content:"";border-style:solid;border-width:11px 0 11px 18px;border-color:transparent transparent transparent #fff;margin-inline-start:4px}
.post .post-body .post-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.post .post-body .post-video-cap{text-align:center;font-size:15px;color:var(--ink-2);margin-top:-.6em}
.post .post-body video.post-gif{display:block;max-width:min(100%,420px);height:auto;margin:1.2em auto;border-radius:12px}
@media (prefers-reduced-motion:reduce){.post .post-body video.post-gif{display:none}}
@media (max-width:600px){
  .post .wrap.narrow{padding-inline:14px}
  .post .post-body{font-size:17.5px;line-height:1.75;margin-inline:-14px;border-inline:0!important;border-radius:0!important;padding:22px 18px!important;box-shadow:none!important}
  .post .post-body ul,.post .post-body ol{padding-inline-start:1.15em}
  .post .post-body li.ex{padding:12px 14px 8px}
  .post .post-body h2{font-size:24px}
  .post .post-head h1{font-size:clamp(27px,7.4vw,34px);line-height:1.18}
}
