/*
 * XGene Stage 9 RC1f — targeted production-parity corrections.
 * Preserves the RC1e animation-slot architecture and all accepted Stage 8/9 behavior.
 */

/* --------------------------------------------------------------------------
   1. Public document scrolling — undo RC1e track suppression and prevent the
      wide gray gutter while retaining a visible, functional browser scrollbar.
   -------------------------------------------------------------------------- */
html{overflow-y:auto!important;overflow-x:hidden!important;scrollbar-gutter:auto!important;scrollbar-color:#8da5b5 #fff!important}
body{overflow-x:hidden!important;overflow-y:visible!important;scrollbar-gutter:auto!important}
html::-webkit-scrollbar{width:9px!important;height:9px!important}
html::-webkit-scrollbar-track{background:#fff!important;border:0!important}
html::-webkit-scrollbar-thumb{background:#8da5b5!important;border:2px solid #fff!important;border-radius:999px!important}
html::-webkit-scrollbar-thumb:hover{background:#55748a!important}
body::-webkit-scrollbar{width:0!important;height:0!important}

/* --------------------------------------------------------------------------
   2. Expert single — remove Astra container/top-gap interference and make the
      hero a true page-family full-bleed band with the standard XGene shell.
   -------------------------------------------------------------------------- */
body.single-xg-expert .site-content{padding-top:0!important;margin-top:0!important}
body.single-xg-expert .site-content>.ast-container,
body.single-xg-expert .ast-container#content,
body.single-xg-expert #content>.ast-container{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
body.single-xg-expert #primary,
body.single-xg-expert .content-area{width:100%!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important}
body.single-xg-expert #main,
body.single-xg-expert .xg-expert-profile,
body.single-xg-expert .xg-expert-profile__article{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
body.single-xg-expert .xg-expert-hero{width:100vw!important;max-width:none!important;margin:0 calc(50% - 50vw)!important;padding:clamp(3.2rem,5vw,5.4rem) 0!important}
body.single-xg-expert .xg-expert-hero__grid{width:min(86rem,calc(100% - 3rem))!important;max-width:none!important;margin-inline:auto!important}
body.single-xg-expert .xg-expert-context>.xg-shell,
body.single-xg-expert .xg-expert-next>.xg-shell,
body.single-xg-expert .xg190-related>.xg-shell{width:min(86rem,calc(100% - 3rem))!important;max-width:none!important;margin-inline:auto!important}

/* --------------------------------------------------------------------------
   3. Definitive article CTA contrast correction. This intentionally outranks
      article prose-link rules and all legacy button rules.
   -------------------------------------------------------------------------- */
body.single-xg-article :is(.xg-editorial-reading-content,.xg-editorial-body,.entry-content,.xg-editorial-end) a.xg-button:not(.xg-button--outline):not(.xg-button--ghost-light),
body.single-xg-article :is(.xg-editorial-reading-content,.xg-editorial-body,.entry-content,.xg-editorial-end) a.xg-button--navy,
body.single-xg-article :is(.xg-editorial-reading-content,.xg-editorial-body,.entry-content,.xg-editorial-end) a.xg-button--primary,
body.single-xg-article :is(.xg-editorial-reading-content,.xg-editorial-body,.entry-content) .wp-block-button:not(.is-style-outline)>.wp-block-button__link{
  color:#fff!important;-webkit-text-fill-color:#fff!important;text-decoration:none!important
}
body.single-xg-article :is(.xg-editorial-reading-content,.xg-editorial-body,.entry-content) a.xg-button--navy,
body.single-xg-article :is(.xg-editorial-reading-content,.xg-editorial-body,.entry-content) a.xg-button--primary{background:#0b2e4a!important;border-color:#0b2e4a!important}
body.single-xg-article :is(.xg-editorial-reading-content,.xg-editorial-body,.entry-content,.xg-editorial-end) a.xg-button--outline,
body.single-xg-article :is(.xg-editorial-reading-content,.xg-editorial-body,.entry-content) .wp-block-button.is-style-outline>.wp-block-button__link{
  color:#0d61ce!important;-webkit-text-fill-color:#0d61ce!important;background:#fff!important
}

/* --------------------------------------------------------------------------
   4. Governed 404 — realistic CC0 Golden Retriever photo in a richer XGene
      recovery scene. The image is CC0 and may be used commercially without
      attribution; source and rights are documented in ASSET_OWNERSHIP.md.
   -------------------------------------------------------------------------- */
.xg-404-dog-scene{isolation:isolate;background:
 radial-gradient(circle at 76% 45%,rgb(0 225 255 / 18%),transparent 22%),
 radial-gradient(circle at 26% 72%,rgb(244 122 60 / 14%),transparent 26%),
 linear-gradient(155deg,rgb(255 255 255 / 12%),rgb(255 255 255 / 3%))!important}
.xg-404-dog-scene__portal{position:absolute;z-index:1;top:50%;right:13%;width:16rem;height:16rem;transform:translateY(-53%);border:2px solid rgb(96 231 240 / 75%);border-radius:50%;box-shadow:0 0 0 1.2rem rgb(10 166 166 / 7%),0 0 3.5rem rgb(21 190 230 / 34%),inset 0 0 2rem rgb(26 221 233 / 18%);animation:xg404-portal-pulse 3.8s ease-in-out infinite}
.xg-404-dog-scene__portal:before,.xg-404-dog-scene__portal:after{content:"";position:absolute;inset:12%;border:1px solid rgb(255 255 255 / 34%);border-radius:50%;transform:rotate(18deg)}
.xg-404-dog-scene__portal:after{inset:24%;border-color:rgb(244 122 60 / 42%);transform:rotate(-24deg)}
.xg-404-dog-scene__portal span,.xg-404-dog-scene__portal i{position:absolute;width:.55rem;height:.55rem;border-radius:50%;background:#7ff3f5;box-shadow:0 0 1rem currentColor;animation:xg404-orbit 4.8s linear infinite}
.xg-404-dog-scene__portal span{top:4%;left:48%}.xg-404-dog-scene__portal i{right:9%;bottom:25%;background:#ff8754;animation-duration:6.2s;animation-direction:reverse}
.xg-404-dog-scene__404{z-index:5;top:2.8rem;right:2.7rem}.xg-404-dog-scene__404 strong{background:linear-gradient(135deg,#fff,#66e9ef 56%,#ff9a64);-webkit-background-clip:text;background-clip:text;color:transparent!important;filter:drop-shadow(0 12px 26px rgb(0 0 0 / 18%))}
.xg-404-dog-photo{position:absolute;z-index:4;left:5%;bottom:5.8rem;width:15rem;height:10.5rem;margin:0;overflow:hidden;border:1px solid rgb(255 255 255 / 32%);border-radius:55% 45% 52% 48% / 48% 50% 50% 52%;box-shadow:0 22px 44px rgb(0 0 0 / 24%),0 0 0 .45rem rgb(255 255 255 / 8%);transform-origin:50% 100%;animation:xg404-real-dog-jump 4.5s cubic-bezier(.45,0,.2,1) infinite}
.xg-404-dog-photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:58% 48%;filter:saturate(1.08) contrast(1.03) brightness(1.03);transform:scale(1.08)}
.xg-404-dog-photo__glow{position:absolute;inset:auto 8% 2% 8%;height:18%;border-radius:50%;background:rgb(87 232 237 / 34%);filter:blur(14px)}
.xg-404-dog-scene__path{left:12%;bottom:5.2rem;gap:2rem;transform:rotate(-9deg)}
.xg-404-dog-scene__path span:nth-child(odd){background:#0fd4d4}.xg-404-dog-scene__path span:nth-child(even){background:#ff824d}
@keyframes xg404-real-dog-jump{0%,14%,100%{transform:translate3d(0,0,0) rotate(-2deg)}38%{transform:translate3d(8rem,-6.5rem,0) rotate(5deg)}64%{transform:translate3d(16rem,-1.8rem,0) rotate(-3deg)}78%{transform:translate3d(17rem,0,0) rotate(0)}}
@keyframes xg404-portal-pulse{0%,100%{transform:translateY(-53%) scale(.97);opacity:.82}50%{transform:translateY(-53%) scale(1.04);opacity:1}}
@keyframes xg404-orbit{from{transform:rotate(0deg) translateX(7.8rem) rotate(0deg)}to{transform:rotate(360deg) translateX(7.8rem) rotate(-360deg)}}

/* Hide the superseded CSS dog silhouette even if older RC1e markup is cached. */
.xg-404-dog{display:none!important}

@media(max-width:1100px){
  body.single-xg-expert .xg-expert-hero__grid,
  body.single-xg-expert .xg-expert-context>.xg-shell,
  body.single-xg-expert .xg-expert-next>.xg-shell,
  body.single-xg-expert .xg190-related>.xg-shell{width:min(100% - 2rem,86rem)!important}
  .xg-404-dog-photo,.xg-404-dog-scene__portal{display:none!important}
}
@media(prefers-reduced-motion:reduce){
  .xg-404-dog-photo,.xg-404-dog-scene__portal,.xg-404-dog-scene__portal span,.xg-404-dog-scene__portal i{animation:none!important}
  .xg-404-dog-photo{transform:translate3d(9rem,-1rem,0)!important}
}

/* Stored/editor-authored CTA fallback: catch inline XGene navy buttons that do
   not carry the standard .xg-button class. */
body.single-xg-article :is(.xg-editorial-reading-content,.xg-editorial-body,.entry-content) a[style*="#0b2e4a" i],
body.single-xg-article :is(.xg-editorial-reading-content,.xg-editorial-body,.entry-content) a[style*="rgb(11, 46, 74)" i]{color:#fff!important;-webkit-text-fill-color:#fff!important;text-decoration:none!important}
