.theme-toggle{position:fixed;top:0;right:8px;z-index:20;display:grid;place-items:center;width:44px;height:44px;border-radius:0 0 12px 12px;background:#123d64;color:#fff;box-shadow:0 3px 12px #0004;font:23px/1 Arial,sans-serif}
.theme-toggle[data-night]{background:#ff9027;color:#17110b}
.theme-toggle:focus-visible{outline:2px solid #ff9027;outline-offset:2px}
.theme-curtain{position:fixed;inset:0;z-index:100;background:#101010;pointer-events:none;transform:scaleY(0);transform-origin:top;transition:transform .32s cubic-bezier(.65,0,.35,1)}
.theme-curtain[data-day]{background:#f6faff}
.theme-curtain.cover{transform:scaleY(1)}
@media(max-width:1050px){body:has(.theme-toggle) .hero header.wrap,body:has(.theme-toggle) .preview-nav,body:has(.theme-toggle) .inner-header{padding-right:45px}}
@media(min-width:1051px) and (max-width:1280px){body:has(.theme-toggle) header.wrap,body:has(.theme-toggle) .preview-nav{padding-right:36px}}
@media(prefers-reduced-motion:reduce){.theme-curtain{transition:none}}
.theme-toggle{border:0;padding:0;cursor:pointer}
/* On compact headers, keep the toggle beside the Menu control—not floating in the centre. */
@media(max-width:1320px){
  body > .theme-toggle{
    top:18px!important;
    right:calc(clamp(12px,4vw,34px) + 118px)!important;
    left:auto!important;
    transform:none!important;
    z-index:80!important;
  }
}
@media(max-width:420px){body > .theme-toggle{right:108px!important}}

/* Once JavaScript moves it into the header, it becomes a true header control. */
header > .theme-toggle{
  position:static!important;
  flex:0 0 auto;
  width:42px!important;
  height:42px!important;
  margin:0!important;
  transform:none!important;
  border-radius:9px!important;
  box-shadow:none!important;
}
@media(max-width:1320px){
  header > .theme-toggle{margin-top:-16px!important;margin-left:auto!important;height:54px!important;border-radius:0 0 12px 12px!important;align-self:flex-start}
  header .mobile-menu{margin-left:8px!important;margin-right:0!important}
}
@media(max-width:760px){header > .theme-toggle{margin-top:-6px!important;height:50px!important}}
@media(min-width:1051px){
  header > .theme-toggle{
    position:fixed!important;
    top:0!important;
    right:12px!important;
    left:auto!important;
    width:44px!important;
    height:48px!important;
    margin:0!important;
    border-radius:0 0 12px 12px!important;
    z-index:80!important;
  }
  .hero > header.landing-sticky > .theme-toggle,
  .hero > header.landing-sticky.is-scrolled > .theme-toggle{right:12px!important}
}
/* Always escape the header flex layout when the full navigation is visible. */
body:not(:has(header .mobile-menu[open])) > .theme-toggle,
header > .theme-toggle.theme-toggle{
  position:fixed!important;
  top:0!important;
  right:12px!important;
  left:auto!important;
  margin:0!important;
  transform:none!important;
  z-index:200!important;
}
@media(max-width:1050px){
  /* Compact navigation retains the attached control beside Menu. */
  header > .theme-toggle{position:static!important;right:auto!important;top:auto!important;z-index:auto!important}
}
/* Keep the compact header logo fitted when the page theme changes. */
header .brand:has(img[src="../images/logo-compact-600.jpg"]){display:flex;align-items:center;flex:0 1 auto;min-width:0;max-width:100%}
header .brand img[src="../images/logo-compact-600.jpg"]{display:block;width:clamp(145px,18vw,240px);max-width:100%;height:auto;aspect-ratio:2427/512;object-fit:contain;border-radius:6px;background:#fff}
html[data-night] header .brand img[src="../images/logo-compact-600.jpg"]{padding:4px 6px;aspect-ratio:auto}
@media(max-width:1050px){header .brand img[src="../images/logo-compact-600.jpg"]{width:min(210px,53vw)}}
html body header .brand img[src="../images/logo-compact-clear-520.png"]{background:transparent;padding:0;object-fit:contain}

/* New editorial landing blocks follow the same night palette as the base theme. */
html[data-night] .build-journey{background:#121415!important;color:#f7f0e6!important}
html[data-night] .build-journey::before{background:radial-gradient(circle at 78% 16%,#b76a2d28,transparent 28%)!important}
html[data-night] .build-journey h2,html[data-night] .build-journey__stages b{color:#f7f0e6!important}
html[data-night] .build-journey__intro-copy,html[data-night] .build-journey__stages li{color:#bac5cb!important}
html[data-night] .build-journey__stages{border-color:#ffffff2b!important}
html[data-night] .build-journey__stages li{border-color:#ffffff2b!important}
html[data-night] .build-journey__stages li::before{box-shadow:0 0 0 5px #121415!important}
html[data-night] .process{background:transparent!important;color:#f7f0e6!important}
html[data-night] .process-premium__intro h2,html[data-night] .process-premium__timeline h3{color:#f7f0e6!important}
html[data-night] .process-premium__intro>span,html[data-night] .process-premium__timeline p{color:#c1cbd0!important}
html[data-night] .process-premium__node{background:#171a1c!important;color:#f3b45d!important}
html[data-night] .process-premium__timeline article>div{border-color:#ffffff2b!important}
html[data-night] .process-premium__cta{color:#f7f0e6!important}
html[data-night] .service-showcase-heading h2,html[data-night] .service-showcase-card h3{color:#f7f0e6!important}
html[data-night] .service-showcase-heading>span,html[data-night] .service-showcase-card>div>span{color:#c1cbd0!important}
html[data-night] .studio-trust{border-color:#ffffff2b!important}
html[data-night] .trust-showcase__copy h2{color:#f7f0e6!important}
html[data-night] .trust-showcase__copy>span{color:#c1cbd0!important}

/* Authoritative placement: identical on normal pages and over the landing hero. */
body > .theme-toggle{position:fixed!important;top:0!important;left:auto!important;right:12px!important;margin:0!important;transform:none!important;z-index:200!important;border-radius:0 0 12px 12px!important}
@media(max-width:1050px){
  body > .theme-toggle{right:calc(clamp(12px,4vw,34px) + 112px)!important;width:42px!important;height:50px!important}
}
@media(max-width:420px){body > .theme-toggle{right:104px!important}}

