/* Header theme icon + crossfade */
.theme-ico{position:fixed;z-index:51;display:flex;align-items:center;width:50px;height:26px;padding:0 3px;margin:0;border:1px solid rgba(255,255,255,.28);border-radius:99px;background:none;color:#fff;cursor:pointer;transition:border-color .3s;-webkit-tap-highlight-color:transparent}
.theme-ico:hover,.theme-ico:focus-visible{border-color:rgba(255,255,255,.6);outline:none}
.ti-knob{position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;transform:translateX(24px);transition:transform .45s cubic-bezier(.65,0,.35,1)}
.ti-i{position:relative;display:grid;place-items:center;width:20px;height:20px;transition:color .45s,opacity .45s}
.ti-sun{margin-right:auto;opacity:.55}
.ti-moon{color:#000}
html.theme-light .theme-ico{border-color:rgba(16,16,16,.22);color:#101010}
html.theme-light .theme-ico:hover{border-color:rgba(16,16,16,.5)}
html.theme-light .ti-knob{background:#101010;transform:none}
html.theme-light .ti-sun{color:#fff;opacity:1}
html.theme-light .ti-moon{color:#101010;opacity:.5}
body.cart-open .theme-ico{opacity:0;pointer-events:none}
::view-transition-old(root),::view-transition-new(root){animation-duration:.5s;animation-timing-function:ease}
html.theme-fading *:not(.ti-knob):not(.ti-i){transition:none!important}
.theme-toggle{display:none!important}
.theme-ico.ti-compact{width:26px;padding:0;justify-content:center}
.ti-compact .ti-knob{transform:none!important}
.ti-compact .ti-i{position:absolute;top:2px;left:2px;margin:0}
html:not(.theme-light) .ti-compact .ti-sun,html.theme-light .ti-compact .ti-moon{opacity:0}

/* keep the footer below the fold until page content renders (prevents footer flash / layout shift) */
main{min-height:100vh}

/* home: featured commissions in one row of 4 on desktop (phones/tablets unchanged) */
@media(min-width:1024px){
  .work{--colw:min(calc((100svh - 300px) * .78),calc((min(100vw,1760px) - 2 * var(--pad) - 3 * var(--gap)) / 4))}
  .work .rail{grid-template-columns:repeat(4,var(--colw));grid-auto-rows:calc(var(--colw) / .78)}
  .work .work-head{max-width:calc(4 * var(--colw) + 3 * var(--gap))}
  .work{justify-content:center;padding-bottom:56px}
}

/* pause section snapping + smooth scrolling while the site scrolls for you (menu/buttons/wheel paging).
   Lived in the shop stylesheet before the prints were hidden; needed on every page. */
html.js-gliding,html.js-gliding.in-steps{scroll-snap-type:none!important;scroll-behavior:auto!important}

/* in-page links: quick fade instead of a long scroll (header stays) */
main,.site-footer{transition:opacity .24s ease}
html.nav-fade main,html.nav-fade .site-footer{opacity:0}
