/* Light, CSS-only motion: plays once when an element appears, no JS or server work.
   Durations stay under 250ms and everything is disabled for reduced-motion users. */
@keyframes ui-fade-in{from{opacity:0}to{opacity:1}}
@keyframes ui-rise-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes ui-pop-in{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}
@keyframes ui-sheet-in{from{transform:translateY(16px);opacity:0}to{transform:none;opacity:1}}

/* Dialogs, popovers and their backdrops */
[role="dialog"],[role="alertdialog"],dialog[open]{animation:ui-pop-in .18s ease-out both}
.modal-backdrop,.dialog-backdrop,[class*="backdrop"]{animation:ui-fade-in .15s ease-out both}

/* Notices / toasts / status messages */
[role="status"],[role="alert"],.banner,.toast,.workflow-notice{animation:ui-rise-in .2s ease-out both}

/* Step content and review cards swap in softly */
.review-step-editor,.facing-panel-controls,.model-review-footer,.result-card,.point-result-card,
.consumer-card{animation:ui-rise-in .22s ease-out both}
/* Large containers fade only: a transform on them would re-anchor fixed-position children (tips, toasts). */
.panel,.admin-panel{animation:ui-fade-in .2s ease-out both}

/* Disclosure content */
details[open]>*:not(summary){animation:ui-fade-in .18s ease-out both}

/* Mobile bottom sheets */
@media (max-width:767px){.model-review-footer{animation:ui-sheet-in .22s ease-out both}}

/* Buttons respond to touch/press */
button,.button,[role="button"]{transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease-out}
button:active:not(:disabled){transform:scale(.97)}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}

/* --- Action-driven motion (v2): every user action shows what changed. --- */
@keyframes ui-slide-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes ui-pop-in-2{from{opacity:0;transform:scale(.94) translateY(6px)}to{opacity:1;transform:none}}
@keyframes ui-drop-in{from{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:none}}
:root{--ease-out:cubic-bezier(.2,.8,.2,1)}
/* Step / item / tab content swaps in */
.model-review-scroll,.result-reading-panel,.admin-section:not(.hidden){animation:ui-fade-in .25s ease-out both}
.base-check-section,.opening-choice{animation:ui-slide-in .28s var(--ease-out) both}
.opening-choice:nth-child(2){animation-delay:.03s}.opening-choice:nth-child(3){animation-delay:.06s}.opening-choice:nth-child(4){animation-delay:.09s}.opening-choice:nth-child(5){animation-delay:.12s}
/* Dialogs and menus pop in */
dialog[open],[role="dialog"]{animation:ui-pop-in-2 .24s var(--ease-out) both}
details[open]>div,details[open]>ul,details[open]>section,.nav-menu[open]>*:not(summary),.review-more-menu[open]>div{animation:ui-drop-in .18s var(--ease-out) both}
/* Hover lift and press feedback on buttons and cards */
button:not(:disabled):not(.canvas-viewport button):not([style*="transform"]):hover{transform:translateY(-1px)}
button:not(:disabled):not(.canvas-viewport button):not([style*="transform"]):active{transform:translateY(0) scale(.97)}
.opening-choice,.model-review-categories>button,.workflow-progress>button,.admin-nav button{transition:background-color .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease,transform .15s ease-out}
.opening-choice:hover:not(:disabled){box-shadow:0 4px 14px rgba(29,29,31,.10)}
/* Selected states settle in */
.opening-choice.selected,.model-review-categories>button[aria-pressed="true"],.workflow-progress>button[aria-current="step"]{transition:background-color .25s ease,border-color .25s ease,box-shadow .25s ease}
/* The step tip on the map */
@keyframes hint-in{from{opacity:0;transform:translate(-50%,-6px)}to{opacity:1;transform:translate(-50%,0)}}
.canvas-step-hint{animation:hint-in .22s var(--ease-out) both}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
