body[data-design="command-core"]{
  --ds-motion-play:running;
  --ds-motion-line:color-mix(in srgb,var(--ds-cyan) 62%,transparent);
  --ds-motion-hot:color-mix(in srgb,var(--ds-indigo) 58%,var(--ds-cyan));
  --ds-motion-node:color-mix(in srgb,var(--ds-violet) 50%,var(--ds-cyan));
  --ds-motion-ambient-opacity:.16;
}
html[data-theme="light"] body[data-design="command-core"]{
  --ds-motion-line:color-mix(in srgb,#2563eb 54%,transparent);
  --ds-motion-hot:color-mix(in srgb,#4f46e5 64%,#0891b2);
  --ds-motion-node:color-mix(in srgb,#4338ca 62%,#06b6d4);
  --ds-motion-ambient-opacity:.08;
}
body[data-design="command-core"][data-motion="paused"]{--ds-motion-play:paused}

:where(body[data-design="command-core"] [data-motion-plate="ambient"]){
  position:relative;
}
body[data-design="command-core"] [data-motion-plate="ambient"] > .ds-motion-surface{
  position:absolute;inset:-1px;z-index:2;display:block;overflow:hidden;
  border:0;border-radius:inherit;box-shadow:none;
  pointer-events:none;opacity:1;
}
body[data-design="command-core"] [data-motion-plate="ambient"] > .ds-motion-surface::before{
  content:"";position:absolute;inset:-38% -62%;border-radius:inherit;
  background:linear-gradient(112deg,transparent 40%,
    color-mix(in srgb,var(--ds-motion-hot) 72%,transparent) 50%,
    transparent 60%);
  opacity:0;transform:translateX(72%);
  animation:dsAmbientSweep 22s cubic-bezier(.4,0,.2,1) infinite;
  animation-delay:calc(var(--ds-motion-index,0) * -5.5s);
  animation-play-state:var(--ds-motion-play);
}
@keyframes dsAmbientSweep{
  0%,18%,100%{opacity:0;transform:translateX(72%)}
  3%{opacity:var(--ds-motion-ambient-opacity)}
  10%{opacity:calc(var(--ds-motion-ambient-opacity) * .55)}
  16%{opacity:0;transform:translateX(-72%)}
}
body[data-design="command-core"][data-motion="reduced"] *,
body[data-design="command-core"][data-motion="reduced"] *::before,
body[data-design="command-core"][data-motion="reduced"] *::after{
  animation:none!important;transition-duration:.001ms!important;
}
body[data-design="command-core"][data-motion="reduced"] .ds-motion-surface{
  display:none!important;
}
@media (prefers-reduced-motion:reduce){
  body[data-design="command-core"] *,body[data-design="command-core"] *::before,
  body[data-design="command-core"] *::after{
    animation:none!important;
    transition-duration:.001ms!important;
    scroll-behavior:auto!important;
  }
  body[data-design="command-core"] .ds-motion-surface{display:none!important}
}

/* Keep text entry, open threads, and message histories fixed in place. */
body[data-design="command-core"] :where(.tc-comp,.tc-inp,.tct-inp,.tct-sel,.chat-thread,
.chat-msg,.ai-msgs,.ai-msg-user,.ai-msg-bot){
  animation:none!important;transform:none!important;
}
body[data-design="command-core"] :where(#tcBellCnt,.tc-btn-cnt):not([style*="none"]),
body[data-design="command-core"] .tct-btn-cnt{
  animation:dsBadgeArrive .62s ease-out 1;
}
@keyframes dsBadgeArrive{
  0%{transform:scale(.72);box-shadow:0 0 0 transparent}
  58%{transform:scale(1.16);box-shadow:0 0 16px color-mix(in srgb,var(--ds-coral) 45%,transparent)}
  100%{transform:scale(1);box-shadow:0 0 8px color-mix(in srgb,var(--ds-coral) 25%,transparent)}
}

body[data-design="command-core"] .adv-core-ring--one{animation:dsCoreSpin 15s linear infinite;animation-play-state:var(--ds-motion-play)}
body[data-design="command-core"] .adv-core-ring--two{animation:dsCoreSpinReverse 10s linear infinite;animation-play-state:var(--ds-motion-play)}
body[data-design="command-core"] [data-ai-state="pending"] .adv-core{animation:dsCorePending 2.2s ease-in-out infinite;animation-play-state:var(--ds-motion-play)}
body[data-design="command-core"] [data-ai-state="running"] .adv-core{animation:dsCoreRunning .82s ease-in-out infinite alternate;animation-play-state:var(--ds-motion-play)}
body[data-design="command-core"] [data-ai-state="running"] .adv-core-ring--one{animation-duration:2.2s}
body[data-design="command-core"] [data-ai-state="success"] .adv-core{animation:dsCoreSuccess .75s ease-out 1}
body[data-design="command-core"] [data-ai-state="quiet-fail"] .adv-core{animation:dsCoreQuietFail 1.1s ease-out 1}
@keyframes dsCoreSpin{to{transform:rotate(360deg)}}
@keyframes dsCoreSpinReverse{to{transform:rotate(-360deg)}}
@keyframes dsCorePending{0%,100%{transform:scale(.97)}50%{transform:scale(1.025)}}
@keyframes dsCoreRunning{from{transform:scale(.96);filter:hue-rotate(0)}to{transform:scale(1.07);filter:hue-rotate(20deg)}}
@keyframes dsCoreSuccess{35%{filter:hue-rotate(65deg);transform:scale(1.08)}100%{filter:none;transform:scale(1)}}
@keyframes dsCoreQuietFail{35%{filter:hue-rotate(145deg);opacity:.72}100%{filter:none;opacity:1}}

body[data-design="command-core"] .rv-card.rv-overdue,
body[data-design="command-core"] .kb-card.on,
body[data-design="command-core"] .hr-org-card.root{
  position:relative;
}
body[data-design="command-core"] .rv-card.rv-overdue{--ds-semantic-halo:var(--ds-coral)}
body[data-design="command-core"] .kb-card.on,
body[data-design="command-core"] .hr-org-card.root{--ds-semantic-halo:var(--ds-indigo)}
body[data-design="command-core"] .rv-card.rv-overdue::before,
body[data-design="command-core"] .kb-card.on::before,
body[data-design="command-core"] .hr-org-card.root::before{
  content:"";position:absolute;inset:2px;pointer-events:none;border-radius:inherit;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ds-semantic-halo) 36%,transparent);
  opacity:.32;transform:scale(.985);
  animation:dsSemanticHalo 4.8s ease-in-out infinite;
  animation-play-state:var(--ds-motion-play);
}
@keyframes dsSemanticHalo{
  0%,100%{opacity:.25;transform:scale(.985)}
  50%{opacity:.68;transform:scale(1)}
}
body[data-design="command-core"] :where(tr,td,th,input,select,textarea,[contenteditable="true"]){
  animation:none!important;
}
