/* =========================================================
   Free-form page designs — shared by the public page AND the
   editor, so what you arrange is exactly what visitors see.
   1 design unit = 1/1200 of the page width (var(--u)).
   ========================================================= */
.lay-doc{ display:flex; flex-direction:column; gap:22px; margin:0 auto; max-width:1200px; }
.lay-page{
  position:relative; width:100%; overflow:hidden;
  container-type:inline-size;
  --u: calc(100cqw / 1200);
  background-size:cover; background-position:center; background-repeat:no-repeat;
  border-radius:14px; box-shadow:0 10px 30px rgba(25,16,73,.08);
  font-size:calc(var(--u) * 24);
}
.lay-it{ position:absolute; box-sizing:border-box; display:block; text-decoration:none; color:inherit; }
.lay-it > *{ width:100%; height:100%; box-sizing:border-box; }

.lay-txt{ display:flex; flex-direction:column; overflow:visible; word-wrap:break-word; overflow-wrap:anywhere; }
.lay-txt-in{ width:100%; }
.lay-txt p,.lay-txt div,.lay-txt h1,.lay-txt h2,.lay-txt h3{ margin:0; }
.lay-txt p + p{ margin-top:.5em; }
.lay-txt h1{ font-size:1.8em; } .lay-txt h2{ font-size:1.45em; } .lay-txt h3{ font-size:1.2em; }
.lay-txt ul,.lay-txt ol{ margin:.3em 0; padding-inline-start:1.3em; }
.lay-txt a{ color:#1d4ed8; text-decoration:underline; }
.lay-txt blockquote{ margin:.4em 0; padding-inline-start:.8em; border-inline-start:.2em solid var(--pink,#e11b6b); }

.lay-shape{ border-radius:0; }
.lay-ellipse .lay-shape{ border-radius:50%; }

.lay-line > .lay-ln{ position:absolute; }
.lay-line > .lay-ln-h{ left:0; top:50%; width:100%; height:0; transform:translateY(-50%); }
.lay-line > .lay-ln-v{ top:0; left:50%; height:100%; width:0; transform:translateX(-50%); }

.lay-ico{ display:grid; place-items:center; border-radius:50%; }
.lay-ico svg{ width:100%; height:100%; display:block; }
.lay-icon .lay-ico[style*="background"] svg{ width:62%; height:62%; }

.lay-image img{ width:100%; height:100%; display:block; box-sizing:border-box; }

/* ---------- slides mode (one page at a time) ---------- */
.lay-mode-slides.lay-ready{ gap:0; }
.lay-mode-slides.lay-ready .lay-page{ display:none; }
.lay-mode-slides.lay-ready .lay-page.on{ display:block; }
.lay-nav{ display:flex; align-items:center; justify-content:center; gap:12px; margin-top:14px; }
.lay-nav button{ border:1px solid #e2e4ec; background:#fff; border-radius:10px; width:42px; height:38px;
  font-size:18px; cursor:pointer; color:#20233a; }
.lay-nav button:hover{ border-color:var(--pink,#e11b6b); color:var(--pink,#e11b6b); }
.lay-nav .lay-count{ font-size:13px; color:#6b7280; min-width:60px; text-align:center; }
.lay-doc:fullscreen{ background:#111; justify-content:center; padding:2vh 2vw; max-width:none; }
.lay-doc:fullscreen .lay-page{ max-height:96vh; width:auto; margin:auto; border-radius:0; }

/* the article wrapper loses its own padding/background when it holds a design */
.article.has-layout{ background:transparent; border:0; padding:0; }
.prose.has-layout{ max-width:1200px; }
