/* XGene Stage 2 corrective 1.7.1 — motion, hero geometry, spacing, article reading. */
:root {
	--xg171-navy:#0B2E4A;
	--xg171-blue:#125DF5;
	--xg171-teal:#0AA6A6;
	--xg171-lime:#89CF19;
	--xg171-coral:#F47A3C;
	--xg171-violet:#7458D8;
	--xg171-ink:#153650;
	--xg171-muted:#5C7186;
	--xg171-line:#DCE7F0;
	--xg171-paper:#FBFCFE;
}

/* --------------------------------------------------------------------------
   1. Durable motion: semantic graphics are visible before activation, then move.
   -------------------------------------------------------------------------- */
html.xg-motion-171 [data-xg-animate-diagram],
html.xg-motion-171 [data-xg-pathway] { will-change:transform; }
html.xg-motion-171:not(.xg-reduced-motion) [data-xg-animate-diagram].xg-diagram-primed:not(.xg-diagram-active) { opacity:.96; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active { opacity:1; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-reveal-eligible { transition:transform .56s cubic-bezier(.2,.75,.2,1),opacity .42s ease; transition-delay:var(--xg-motion-delay,0ms); }
html.xg-motion-171:not(.xg-reduced-motion) .xg-reveal-eligible:not(.xg-reveal-entered) { opacity:.7; transform:translateY(10px); }
html.xg-motion-171:not(.xg-reduced-motion) .xg-reveal-eligible.xg-reveal-entered { opacity:1; transform:none; }

/* Homepage motion is deliberately more visible than 1.7.0 while remaining professional. */
html.xg-motion-171:not(.xg-reduced-motion) [data-xg-pathway] .xg-pathway-line { stroke-dasharray:560 !important; stroke-dashoffset:560 !important; transition:none !important; }
html.xg-motion-171:not(.xg-reduced-motion) [data-xg-pathway].xg-pathway-ready .xg-pathway-line { animation:xg171-path-draw 1.55s cubic-bezier(.2,.75,.2,1) forwards !important; }
html.xg-motion-171:not(.xg-reduced-motion) [data-xg-pathway].xg-pathway-ready .xg-pathway-line:nth-of-type(2) { animation-delay:.18s !important; }
html.xg-motion-171:not(.xg-reduced-motion) [data-xg-pathway].xg-pathway-ready .xg-pathway-line:nth-of-type(3) { animation-delay:.36s !important; }
html.xg-motion-171:not(.xg-reduced-motion) [data-xg-pathway].xg-pathway-ready .xg-pathway-line:nth-of-type(4) { animation-delay:.54s !important; }
html.xg-motion-171:not(.xg-reduced-motion) [data-xg-pathway].xg-pathway-ready .xg-evidence-node { animation:xg171-node-float 6.5s ease-in-out 1.35s infinite !important; }
html.xg-motion-171:not(.xg-reduced-motion) [data-xg-pathway].xg-pathway-ready .xg-evidence-node--interpretation { animation-delay:1.7s !important; }
html.xg-motion-171:not(.xg-reduced-motion) [data-xg-pathway].xg-pathway-ready .xg-evidence-node--control { animation-delay:2.05s !important; }
html.xg-motion-171:not(.xg-reduced-motion) [data-xg-pathway].xg-pathway-ready .xg-evidence-node--execution { animation-delay:2.4s !important; }
@keyframes xg171-path-draw { to { stroke-dashoffset:0; } }
@keyframes xg171-node-float { 0%,100%{transform:translate3d(0,0,0)} 50%{transform:translate3d(0,-7px,0)} }
@keyframes xg171-breathe { 0%,100%{transform:scale(1)} 50%{transform:scale(1.045)} }
@keyframes xg171-orbit { to{transform:rotate(360deg)} }
@keyframes xg171-counter-orbit { to{transform:rotate(-360deg)} }
@keyframes xg171-card-pulse { 0%,100%{transform:translateY(0);box-shadow:0 9px 24px rgb(11 46 74 / 7%)} 50%{transform:translateY(-6px);box-shadow:0 15px 34px rgb(11 46 74 / 12%)} }
@keyframes xg171-line-grow { from{transform:scaleY(.04)} to{transform:scaleY(1)} }
@keyframes xg171-flow-grow { from{transform:scaleX(.05)} to{transform:scaleX(1)} }

html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-about-system__orbit { animation:xg171-orbit 18s linear infinite; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-about-system__orbit--inner { animation:xg171-counter-orbit 14s linear infinite; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-about-system__core { animation:xg171-breathe 4.8s ease-in-out infinite; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-about-system__node { animation:xg171-card-pulse 6.8s ease-in-out infinite; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-about-system__node:nth-of-type(2) { animation-delay:.5s; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-about-system__node:nth-of-type(3) { animation-delay:1s; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-about-system__node:nth-of-type(4) { animation-delay:1.5s; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-contact-signal.xg-diagram-active > div { animation:xg171-card-pulse 6.3s ease-in-out infinite !important; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-contact-signal.xg-diagram-active > div:nth-child(2){animation-delay:.55s !important}html.xg-motion-171:not(.xg-reduced-motion) .xg-contact-signal.xg-diagram-active > div:nth-child(3){animation-delay:1.1s !important}
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-hub-signal__core { animation:xg171-breathe 5s ease-in-out infinite !important; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-hub-signal__node { animation:xg171-node-float 6.7s ease-in-out infinite !important; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-hub-signal__line { animation:xg170-line-pulse 3.6s ease-in-out infinite !important; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-methodology-visual__track i { animation:xg171-line-grow 1.7s cubic-bezier(.2,.75,.2,1) forwards !important; transform-origin:top; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-methodology-node { animation:xg171-card-pulse 7s ease-in-out 1.1s infinite !important; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-editorial-flow__connector i { animation:xg171-flow-grow 1.1s cubic-bezier(.2,.75,.2,1) forwards !important; transform-origin:left; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-editorial-flow__node { animation:xg171-card-pulse 7s ease-in-out 1.1s infinite !important; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-book-visual__badge { animation:xg171-breathe 4.5s ease-in-out infinite !important; }
html.xg-motion-171:not(.xg-reduced-motion) .xg-diagram-active .xg-book-visual__line { animation:xg171-card-pulse 6.8s ease-in-out infinite !important; }

.xg-motion-diagnostic { position:fixed; z-index:100000; right:1rem; bottom:4.2rem; max-width:18rem; padding:.55rem .72rem; border:1px solid #f0c89e; border-radius:.6rem; color:#713a17; background:#fff8ef; box-shadow:0 8px 24px rgb(11 46 74 / 12%); font:700 .72rem/1.35 system-ui,sans-serif; }

/* --------------------------------------------------------------------------
   2. Homepage hero geometry: stop evidence graphic collapsing horizontally.
   -------------------------------------------------------------------------- */
@media (min-width: 1101px) {
	.xg-b1a-home .xg-home-hero__grid { grid-template-columns:minmax(0,1.08fr) minmax(30rem,.92fr) !important; }
	.xg-b1a-home .xg-evidence-visual { width:100% !important; min-width:30rem !important; max-width:34rem !important; min-height:31rem !important; margin:0 !important; justify-self:end !important; box-sizing:border-box; }
}
@media (min-width: 921px) and (max-width: 1100px) {
	.xg-b1a-home .xg-home-hero__grid { grid-template-columns:minmax(0,1fr) minmax(25rem,.9fr) !important; }
	.xg-b1a-home .xg-evidence-visual { width:100% !important; min-width:25rem !important; max-width:29rem !important; margin:0 !important; justify-self:end !important; }
}

/* --------------------------------------------------------------------------
   3. About visual redesign and page-family breathing room.
   -------------------------------------------------------------------------- */
.xg-about-system { position:relative; width:min(100%,30rem); aspect-ratio:1; justify-self:center; }
.xg-about-system__orbit { position:absolute; inset:9%; border:1px solid rgb(18 93 245 / 20%); border-radius:50%; background:conic-gradient(from 30deg,rgb(18 93 245 / 4%),rgb(10 166 166 / 8%),rgb(137 207 25 / 5%),rgb(244 122 60 / 5%),rgb(18 93 245 / 4%)); }
.xg-about-system__orbit::before,.xg-about-system__orbit::after { position:absolute; width:.72rem; height:.72rem; border:3px solid #fff; border-radius:50%; background:var(--xg171-blue); box-shadow:0 4px 14px rgb(11 46 74 / 18%); content:""; }
.xg-about-system__orbit::before{top:8%;left:24%}.xg-about-system__orbit::after{right:10%;bottom:22%;background:var(--xg171-teal)}
.xg-about-system__orbit--inner { inset:27%; border-color:rgb(10 166 166 / 25%); background:transparent; }
.xg-about-system__core { position:absolute; z-index:3; inset:35%; display:grid; place-content:center; text-align:center; border-radius:50%; color:#fff; background:linear-gradient(145deg,var(--xg171-navy),#0d6680); box-shadow:0 18px 44px rgb(11 46 74 / 20%); }
.xg-about-system__core span{color:#8fe8e9;font-size:.62rem;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.xg-about-system__core strong{margin-top:.15rem;font-size:1.12rem;line-height:1.05}.xg-about-system__core small{margin-top:.2rem;color:#d8edf2;font-size:.62rem}
.xg-about-system__node { position:absolute; z-index:4; display:grid; min-width:7.8rem; padding:.7rem .8rem; border:1px solid var(--xg171-line); border-radius:.8rem; color:var(--xg171-navy); background:rgb(255 255 255 / 94%); box-shadow:0 9px 24px rgb(11 46 74 / 8%); font-size:.72rem; font-weight:850; }
.xg-about-system__node--one{top:5%;left:7%;border-top:3px solid var(--xg171-blue)}.xg-about-system__node--two{top:13%;right:0;border-top:3px solid var(--xg171-teal)}.xg-about-system__node--three{bottom:8%;left:2%;border-top:3px solid var(--xg171-lime)}.xg-about-system__node--four{right:5%;bottom:3%;border-top:3px solid var(--xg171-coral)}
.xg-about-principles { padding:clamp(2.3rem,4vw,3.8rem) 0 clamp(1.8rem,3vw,2.8rem) !important; background:#fff; }
.xg-contact-pathways { padding:clamp(2.4rem,4vw,3.6rem) 0 clamp(1.8rem,3vw,2.7rem) !important; background:#fff; }
.xg-insight-spectrum { margin:0 !important; padding:clamp(2.4rem,4vw,3.8rem) 0 clamp(1.7rem,3vw,2.8rem) !important; background:#fff; }
.xg-contact-form-section { padding-top:clamp(2.2rem,4vw,4rem) !important; }

/* --------------------------------------------------------------------------
   4. Article hero image, reading rhythm, and dynamic TOC.
   -------------------------------------------------------------------------- */
.xg-editorial-cover__grid { grid-template-columns:minmax(0,1.35fr) minmax(14rem,.65fr) !important; gap:clamp(2rem,3.5vw,3.5rem) !important; padding:clamp(1.9rem,3vw,2.9rem) 0 !important; }
.xg-editorial-cover h1 { max-width:19ch !important; font-size:clamp(2.35rem,3.45vw,3.65rem) !important; line-height:1.01 !important; }
.xg-editorial-dek { max-width:48rem !important; font-size:clamp(1.02rem,.98rem + .18vw,1.16rem) !important; line-height:1.65 !important; }
.xg-editorial-cover__visual { width:min(100%,20rem) !important; max-width:20rem !important; justify-self:end !important; }
.xg-editorial-cover__image { display:grid; aspect-ratio:auto !important; min-height:0 !important; place-items:center; padding:.45rem; background:#fff !important; transform:none !important; }
.xg-editorial-cover__image img { display:block !important; width:auto !important; max-width:100% !important; height:auto !important; max-height:18rem !important; object-fit:contain !important; border-radius:.8rem; }
.xg-editorial-reading-layout { grid-template-columns:minmax(0,48rem) minmax(17rem,19rem) !important; gap:clamp(2.3rem,4vw,3.8rem) !important; padding:clamp(2.6rem,4vw,3.6rem) 0 clamp(4.5rem,7vw,7rem) !important; }
.xg-editorial-reading-content { font-size:clamp(1.035rem,1rem + .1vw,1.09rem) !important; line-height:1.8 !important; }
.xg-editorial-reading-content p { margin-bottom:1.25em !important; }
.xg-editorial-reading-content h2 { margin-top:3.15rem !important; font-size:clamp(1.72rem,2.2vw,2.3rem) !important; }
.xg-editorial-reading-content h3 { margin-top:2.25rem !important; }
.xg-editorial-reading-content .xg-editorial-legacy-toc { display:none !important; }
.xg-editorial-reading-content figure,.xg-editorial-reading-content img { scroll-margin-top:8rem; }
.xg-editorial-reading-rail { position:sticky !important; top:calc(var(--wp-admin--admin-bar--height,0px) + 6.4rem) !important; align-self:start !important; max-height:calc(100vh - var(--wp-admin--admin-bar--height,0px) - 7.3rem) !important; }
.xg-editorial-toc { position:relative; max-height:min(52vh,31rem) !important; scrollbar-width:thin; }
.xg-editorial-toc::before { position:absolute; top:3.2rem; bottom:1rem; left:1rem; width:2px; border-radius:2px; background:#edf2f7; content:""; }
.xg-editorial-toc a { position:relative; margin-left:.4rem; padding:.46rem .52rem .46rem .72rem !important; border-left:0 !important; transition:color .2s ease,background .2s ease,transform .2s ease !important; }
.xg-editorial-toc a::before { position:absolute; top:.82rem; left:-.42rem; width:.42rem; height:.42rem; border:2px solid #fff; border-radius:50%; background:#ccd9e5; box-shadow:0 0 0 1px #d5e1eb; content:""; transition:transform .2s ease,background .2s ease,box-shadow .2s ease; }
.xg-editorial-toc a.is-active { color:var(--xg171-navy) !important; background:linear-gradient(90deg,rgb(10 166 166 / 10%),transparent) !important; transform:translateX(3px); font-weight:850 !important; }
.xg-editorial-toc a.is-active::before { background:var(--xg171-teal); box-shadow:0 0 0 4px rgb(10 166 166 / 14%); transform:scale(1.12); }
.xg-editorial-toc a span { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:3; }
.xg-editorial-progress-card { position:relative; overflow:hidden; }
.xg-editorial-progress-card::after { position:absolute; right:0; bottom:0; left:0; height:2px; background:linear-gradient(90deg,var(--xg171-blue),var(--xg171-teal),var(--xg171-lime)); content:""; opacity:.8; }

/* Slightly more relaxed article image treatment in the body. */
.xg-editorial-reading-content img { border:1px solid #e2eaf1; box-shadow:0 10px 28px rgb(11 46 74 / 8%) !important; }

/* --------------------------------------------------------------------------
   5. Responsive corrections.
   -------------------------------------------------------------------------- */
@media (max-width:1100px) {
	.xg-about-system { width:min(100%,27rem); }
	.xg-editorial-cover__grid { grid-template-columns:1fr !important; }
	.xg-editorial-cover__visual { width:min(100%,28rem) !important; max-width:28rem !important; justify-self:start !important; }
	.xg-editorial-cover__image img { max-height:24rem !important; }
	.xg-editorial-reading-layout { grid-template-columns:minmax(0,48rem) !important; }
}
@media (max-width:780px) {
	.xg-about-system { width:min(100%,23rem); }
	.xg-about-system__node { min-width:6.6rem; padding:.55rem .6rem; font-size:.66rem; }
	.xg-about-principles,.xg-contact-pathways,.xg-insight-spectrum { padding-top:2rem !important; }
	.xg-editorial-cover h1 { font-size:clamp(2.15rem,9vw,3.2rem) !important; }
	.xg-editorial-cover__visual { width:min(100%,23rem) !important; }
	.xg-editorial-reading-layout { padding-top:2rem !important; }
}

@media (prefers-reduced-motion:reduce) {
	.xg-motion-diagnostic { display:block; }
	html.xg-motion-171 .xg-diagram-active *,html.xg-motion-171 [data-xg-pathway] * { animation:none !important; transition:none !important; }
}
