/* First paint for a per-URL PéPi app shell: show its real public lesson while
   the existing authenticated app is starting, then hand the whole viewport
   to that app once its requested screen is ready. */
html[data-pepi-entry-source]:not([data-pepi-entry-live]) body > *:not(#pepiPublicEntryFallback) {
  display: none !important;
}
html[data-pepi-entry-source]:not([data-pepi-entry-live]) #pepiPublicEntryFallback {
  display: block !important;
  box-sizing: border-box;
  width: min(100% - 2rem, 76rem);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3.5rem);
  color: #29251f;
  background: #fbfaf7;
  font: 1.05rem/1.75 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#pepiPublicEntryFallback h1,
#pepiPublicEntryFallback h2,
#pepiPublicEntryFallback h3 {
  margin: 0.9em 0 0.45em;
  color: #29251f;
  line-height: 1.28;
}
#pepiPublicEntryFallback h1 { font-size: clamp(1.8rem, 4vw, 3.2rem); }
#pepiPublicEntryFallback h2 { font-size: clamp(1.3rem, 2.8vw, 2rem); }
#pepiPublicEntryFallback p,
#pepiPublicEntryFallback li { margin-block: 0.65em; }
#pepiPublicEntryFallback a { color: #806000; text-underline-offset: 0.18em; }
#pepiPublicEntryFallback .pepi-entry-fallback-card {
  margin-top: 1.5rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #e3ded3;
  border-radius: 1.25rem;
  background: #fff;
}
#pepiPublicEntryFallback .pepi-entry-fallback-kicker {
  color: #776f62;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
html[data-pepi-entry-source][data-pepi-entry-live] #pepiPublicEntryFallback { display: none !important; }
html[data-pepi-entry-source][data-pepi-entry-live] #pepiConnectedFrame:not([hidden]) { z-index: 100000; }
