/* Meridian / motion: clear feedback, never a second notification. */
html.atlas-motion-ready .atlas-overview,
html.atlas-motion-ready .atlas-chart .atlas-area,
html.atlas-motion-ready .v09-page-enter { animation:none; }

/* A single selection marker follows navigation. Its position never affects layout. */
html.atlas-motion-ready .sidebar nav { position:relative; }
.atlas-nav-marker { position:absolute; top:0; left:1px; width:2px; height:18px; border-radius:3px; background:var(--primary); pointer-events:none; }
.sidebar nav a { transition:background 180ms ease,color 180ms ease,box-shadow 180ms ease; }
.sidebar nav a.active { box-shadow:inset 0 1px 0 color-mix(in srgb,var(--primary) 5%,transparent); }

/* Actual values remain on screen throughout the brief live-update highlight. */
[data-motion-key] { border-radius:5px; }

/* Tactile controls; hover is reserved for devices that really support it. */
.btn,.icon-btn,.v09-command-launch,.organization-switch { transition:background 180ms ease,border-color 180ms ease,color 180ms ease,box-shadow 180ms ease,transform 180ms cubic-bezier(.2,.75,.2,1); }
.btn.primary { box-shadow:0 1px 2px #21195c15,inset 0 1px 0 #ffffff18; }
.btn:active:not(:disabled):not([aria-disabled="true"]),.icon-btn:active:not(:disabled):not([aria-disabled="true"]),.v09-command-launch:active { transform:translateY(1px) scale(.98); }
.btn .icon,.icon-btn .icon,.atlas-live-bottom a .icon { transition:transform 220ms cubic-bezier(.2,.75,.2,1); }
@media (hover:hover) and (pointer:fine) {
  .btn:hover:not(:disabled):not([aria-disabled="true"]) { transform:translateY(-1px); box-shadow:0 4px 10px #14172909; }
  .btn.primary:hover:not(:disabled):not([aria-disabled="true"]) { box-shadow:0 4px 12px color-mix(in srgb,var(--primary) 22%,transparent),inset 0 1px 0 #ffffff20; }
  .btn:active:not(:disabled):not([aria-disabled="true"]) { transform:translateY(1px) scale(.98); }
  :is(.btn,.icon-btn)[data-action="refresh"]:hover:not(:disabled):not([aria-disabled="true"]) .icon { transform:rotate(25deg); }
  .atlas-live-bottom a:hover .icon { transform:translateX(2px); }
  .organization-switch:hover { box-shadow:0 3px 12px #14172908; }
  .v09-command-results>button { transition:background 120ms ease; }
}

/* Dialog entry only follows the native open state, not live-data refreshes. */
html.atlas-motion-ready dialog[open] { animation:atlas-dialog-settle 260ms cubic-bezier(.2,.8,.2,1) both; }
html.atlas-motion-ready dialog.drawer[open] { animation:atlas-drawer-settle 300ms cubic-bezier(.2,.8,.2,1) both; }
html.atlas-motion-ready dialog[open]::backdrop { animation:atlas-backdrop-settle 200ms ease both; }
#toast { transition:opacity 200ms ease,transform 300ms cubic-bezier(.2,.8,.2,1); }
html.atlas-motion-ready .sale-notification { animation:atlas-message-settle 320ms cubic-bezier(.2,.8,.2,1) both; }
html.atlas-motion-ready .sale-check { animation:atlas-check-settle 380ms cubic-bezier(.2,.8,.2,1) both; }
.account-menu[open] .account-menu-panel { animation:atlas-menu-settle 180ms cubic-bezier(.2,.75,.2,1) both; transform-origin:top right; }
.atlas-chart .atlas-hit :is(line,circle) { transition:opacity 140ms ease; }
.atlas-chart .atlas-hit:focus-visible { outline:none; }

@keyframes atlas-dialog-settle { from { opacity:0; transform:translateY(9px) scale(.992); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes atlas-drawer-settle { from { opacity:.6; transform:translateX(18px); } to { opacity:1; transform:translateX(0); } }
@keyframes atlas-backdrop-settle { from { opacity:0; } to { opacity:1; } }
@keyframes atlas-message-settle { from { opacity:0; transform:translateY(-7px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes atlas-check-settle { 0% { transform:scale(.85); } 60% { transform:scale(1.04); } 100% { transform:scale(1); } }
@keyframes atlas-menu-settle { from { opacity:0; transform:translateY(-4px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }

/* Background tabs stay quiet. The OS preference also disables JS animations. */
html.atlas-motion-paused :is(.atlas-orbit svg,.atlas-auth-art svg,.loading-spinner,.skeleton,.v09-skeleton i,.v09-skeleton b) { animation-play-state:paused; }
@media (max-width:760px) {
  .atlas-nav-marker { display:none; }
  html.atlas-motion-ready dialog.drawer[open] { animation-name:atlas-dialog-settle; }
}
@media (prefers-reduced-motion:reduce) {
  html.atlas-motion-ready *,html.atlas-motion-ready *::before,html.atlas-motion-ready *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
  html.atlas-motion-ready :is(.btn,.icon-btn,.v09-command-launch,.btn .icon,.icon-btn .icon,.atlas-live-bottom a .icon) { transform:none!important; }
}
@media print { .atlas-nav-marker { display:none; } }
