/* dp-chart-motion.css | DNA Protocol chart/diagram motion plugin | additive; uses dp-motion.css tokens; final geometry is always the default */

/* agreement nodes: static tone from real data-proof-state only; node paints with currentColor */
html[data-product] [data-mo=node]{color:var(--mo-track,currentColor)}
html[data-product] [data-proof-state=verified] [data-mo=node]{color:var(--mo-lit,currentColor)}

@media (prefers-reduced-motion:no-preference){
/* classes are added by dp-chart-motion.js only, and removed on animationend */
html[data-product] .dpc-draw{animation:dpc-draw var(--mo-draw,1200ms) var(--mo-ease-settle,ease-out) backwards;animation-play-state:var(--mo-play,running)}
html[data-product] .dpc-swap{animation:dpc-swap var(--mo-base,240ms) var(--mo-ease-std,ease) backwards;animation-play-state:var(--mo-play,running)}
html[data-product] [data-proof-state=verified] .dpc-agree{animation:dpc-agree var(--mo-slow,420ms) var(--mo-ease-std,ease) backwards;animation-delay:calc(var(--dpc-i,0)*var(--mo-stagger,70ms));animation-play-state:var(--mo-play,running)}
/* pause: hidden tab, or host offscreen */
html[data-product][data-dpc-hidden] :is(.dpc-draw,.dpc-swap,.dpc-agree),html[data-product] .dpc-off:is(.dpc-draw,.dpc-swap),html[data-product] .dpc-off :is(.dpc-draw,.dpc-swap){animation-play-state:paused}
/* guards: never animate text, form controls or table rows even if mis-tagged */
html[data-product] :is(text,tspan,tr,td,th,input,select,textarea,button,label):is(.dpc-draw,.dpc-swap,.dpc-agree){animation:none}
}

/* spot: optional CSS-only highlight, fine pointers only, no transform; zero specificity so host styles win */
@media (hover:hover) and (pointer:fine){
:where(html[data-product] [data-mo=spot]){position:relative;isolation:isolate}
:where(html[data-product] [data-mo=spot])::after{content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;background:radial-gradient(240px circle at var(--mo-x,50%) var(--mo-y,0%),var(--mo-lit,currentColor),transparent 70%);opacity:0;transition:opacity var(--mo-base,240ms) var(--mo-ease-std,ease)}
:where(html[data-product] [data-mo=spot]):hover::after{opacity:.08}
}

@media (prefers-reduced-motion:reduce),(forced-colors:active),print{
html[data-product] :is(.dpc-draw,.dpc-swap,.dpc-agree){animation:none!important}
html[data-product] [data-mo=spot]::after{transition:none}
}
@media (forced-colors:active){
html[data-product] [data-mo=spot]::after{display:none}
html[data-product] [data-mo=node]{color:CanvasText}
}

/* dash values live only inside the keyframes: if the animation never runs, geometry is untouched */
@keyframes dpc-draw{from{stroke-dasharray:var(--dpc-len);stroke-dashoffset:var(--dpc-len)}to{stroke-dasharray:var(--dpc-len);stroke-dashoffset:0}}
@keyframes dpc-swap{from{opacity:.6}}
@keyframes dpc-agree{from{color:var(--mo-track,currentColor);opacity:.45}}
