/* Case study late overrides (mobile / Safari / perf) — generated from the page's original style blocks, same order (order matters for the cascade) */
/* ── safari-edges ── */
/* iOS Safari tints its toolbars from fixed layers that touch the screen edges: keep closed overlays out of the way and give the loader a solid cream */
#pl .pl-noise{-webkit-mask-image:linear-gradient(transparent,#000 4%,#000 97%,transparent);mask-image:linear-gradient(transparent,#000 4%,#000 97%,transparent);height:100%!important}
/* Safari does not draw fixed layers under its bottom toolbar: hide the page there while the loader is up */
@media (max-width:700px){html:has(#pl:not(.done)) body>:not(#pl):not(script):not(style),html:has(#pl.leave) body>:not(#pl):not(script):not(style){visibility:hidden!important}}
#pl{bottom:auto!important;height:100lvh!important;background:radial-gradient(70% 42% at 50% 46%,rgba(250,226,212,.85),rgba(250,226,212,0) 100%),#F4F0E8!important}
.lb:not(.open){visibility:hidden;transition:opacity .3s ease,visibility 0s linear .3s}
.lb.open{visibility:visible;transition:opacity .3s ease}
/* mobile: draw edge-to-edge (viewport-fit=cover) so Safari blurs real page content under its status bar and toolbar; fixed controls step below the notch */
@media(max-width:760px) {
  .nav-burger{top:calc(14px + env(safe-area-inset-top))!important}
  .tocbtn{top:calc(20px + env(safe-area-inset-top))!important}
  .rail,.rail.away,.rail.nav-hide{top:calc(64px + env(safe-area-inset-top))!important}
  .toc{top:calc(68px + env(safe-area-inset-top))!important}
  .prog{top:env(safe-area-inset-top)!important}
  .lb{padding-top:calc(64px + env(safe-area-inset-top))!important;padding-bottom:calc(24px + env(safe-area-inset-bottom))!important}
}
/* ── mobile-topnav ── */
/* mobile: a full-width solid cream bar at the top holds the navigation. It reaches under the status bar, so Safari tints the status bar the same cream; page content fades out as it scrolls beneath it */
@media(max-width:700px) {
  html body .nav-burger{display:none!important}
  html body .rail,html body .rail.away,html body .rail.nav-hide,html body .rail.away.nav-hide{position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:auto!important;width:auto!important;min-width:0!important;transform:none!important;opacity:1!important;pointer-events:auto!important;flex-direction:row!important;justify-content:center!important;align-items:center!important;gap:2px!important;padding:calc(8px + env(safe-area-inset-top)) 12px 8px!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#F4F0E8!important;z-index:40!important}
  html body .rail::after{content:"";position:absolute;left:0;right:0;top:100%;height:22px;pointer-events:none;background:linear-gradient(#F4F0E8,rgba(244,240,232,0))}
  html body .rail .ind{display:none!important}
  html body .rail a{justify-content:center!important;padding:8px 14px!important;font-size:14px!important;border-radius:999px!important}
  html body .rail a.on{background:#fff!important;box-shadow:0 1px 6px rgba(90,30,120,.08)!important}
  html body .tocbtn{top:calc(66px + env(safe-area-inset-top))!important;left:16px!important}
  html body .toc{top:calc(112px + env(safe-area-inset-top))!important}
  html body .prog{top:calc(52px + env(safe-area-inset-top))!important;z-index:41!important}
  html body .page,html body .hero{scroll-margin-top:72px}
  html body .rail.nav-hide,html body .rail.away.nav-hide{transform:translateY(calc(-100% - 24px))!important;transition:transform .35s cubic-bezier(.2,.7,.2,1)!important}
  html body .tocbtn{transition:top .35s cubic-bezier(.2,.7,.2,1)!important}
  html:has(.rail.nav-hide) body .tocbtn{top:calc(12px + env(safe-area-inset-top))!important}
  html:has(.rail.nav-hide) body .toc{top:calc(58px + env(safe-area-inset-top))!important}
  html:has(.rail.nav-hide) body .prog{top:env(safe-area-inset-top)!important}
  html body .col.top>a.back{display:none!important}
  html body figure.hero{border-radius:10px!important}
  html body figure.hero>video,html body figure.hero>img{border-radius:10px!important;clip-path:inset(0 round 10px)!important}
  html body .toc.toc.toc{background:rgba(251,249,246,.97)!important;box-shadow:0 1px 0 rgba(255,255,255,.95) inset,0 14px 36px rgba(70,40,100,.14)!important}
  html body .rail.rail::after{height:44px!important;background:linear-gradient(var(--bar,#F4F0E8) 0%,color-mix(in srgb,var(--bar,#F4F0E8) 72%,transparent) 30%,color-mix(in srgb,var(--bar,#F4F0E8) 32%,transparent) 62%,transparent 100%)!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);-webkit-mask-image:linear-gradient(#000 0%,#000 35%,transparent 100%);mask-image:linear-gradient(#000 0%,#000 35%,transparent 100%)}
  html body::before{bottom:auto!important;height:100lvh!important;-webkit-mask-image:linear-gradient(#000 0,#000 72%,transparent 100%);mask-image:linear-gradient(#000 0,#000 72%,transparent 100%)}
}
/* ── lb-soft ── */
/* lightbox: lighter image shadow on the light page */
html body .lb .lb-stage{box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 12px 36px rgba(70,40,100,.10)!important}
html body .lb img{box-shadow:none!important}
/* ── to-top ── */
/* floating back-to-top on case studies: appears after scrolling down */
.totop{position:fixed;right:max(20px,env(safe-area-inset-right));bottom:calc(24px + env(safe-area-inset-bottom));z-index:35;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:#34322C;background:rgba(255,255,255,.88);border:1px solid rgba(255,255,255,.95);box-shadow:inset 0 1px 0 #fff,0 8px 24px rgba(70,40,100,.14);opacity:0;transform:translateY(12px);pointer-events:none;transition:opacity .25s ease,transform .25s ease,background .2s}
.totop.on{opacity:1;transform:none;pointer-events:auto}
.totop:hover{background:#fff}
.totop:focus-visible{outline:2px solid #9609B5;outline-offset:3px}
.totop svg{width:18px;height:18px}
@media(max-width:700px) {
  .totop{bottom:calc(16px + env(safe-area-inset-bottom));right:16px;width:42px;height:42px;box-shadow:inset 0 1px 0 #fff,0 8px 24px rgba(90,30,120,.12)!important}
}
@media(prefers-reduced-motion:reduce) {
  .totop{transition:opacity .2s}
}
/* ── video-ios ── */
video::-webkit-media-controls-start-playback-button{display:none!important;-webkit-appearance:none}
video::-webkit-media-controls{display:none!important}
/* ── foot-safari ── */
/* mobile: footer ends ~32px above Safari's floating address bar (bar top sits ~79px above the screen bottom) */
@media(max-width:700px) {
  html body footer.contact{padding-bottom:76px!important}
}
/* ── loader-edges ── */
/* mobile: every loader has peach top/bottom edges and the page behind it is peach while it shows, so the area Safari leaves under its toolbar matches */
@media(max-width:700px) {
  html:has(#pl:not(.done)),html:has(#pl:not(.done)) body,html:has(#pl.leave),html:has(#pl.leave) body{background-color:#FBE7DE!important}
  html body #pl{background:radial-gradient(70% 42% at 50% 46%,rgba(250,226,212,.85),rgba(250,226,212,0) 100%),linear-gradient(#FBE7DE 0,rgba(251,231,222,0) 34%,rgba(251,231,222,0) 66%,#FBE7DE 100%),#F4F0E8!important}
}
/* ── loader-scroll ── */
/* mobile Safari leaves fixed layers out of the area under its toolbar: the loader scrolls with the page instead (pinned to the current scroll position), so its gradient reaches the bottom edge */
@media(max-width:700px) {
  html body #pl:not(.done){position:absolute!important;top:0!important;left:0!important;right:0!important;bottom:auto!important;transform:translateY(var(--ply,0px))}
}
