:root {
  --ease-out: cubic-bezier(0.22, 0.7, 0.24, 1);
  --motion-rise: 520ms;
  --motion-fill: 900ms;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.content > * { animation: rise-in var(--motion-rise) var(--ease-out) both; }
.content > :nth-child(1) { animation-delay: 0ms; }
.content > :nth-child(2) { animation-delay: 40ms; }
.content > :nth-child(3) { animation-delay: 80ms; }
.content > :nth-child(4) { animation-delay: 120ms; }
.content > :nth-child(5) { animation-delay: 160ms; }
.content > :nth-child(6) { animation-delay: 200ms; }
.content > :nth-child(7) { animation-delay: 240ms; }
.content > :nth-child(8) { animation-delay: 280ms; }
.content > :nth-child(n + 9) { animation-delay: 320ms; }

.content > .lb-views,
.content > .lb-views > [data-view],
.content > [data-view],
.content > .history,
.content > .history > [data-view] { animation: none; }
.content > .home-variant { animation: none; }
.content > .home-variant > * { animation: rise-in var(--motion-rise) var(--ease-out) 40ms both; }
.content > .history > [data-view] > *, .content > .history > .card { animation: rise-in var(--motion-rise) var(--ease-out) 80ms both; }
.content > .lb-views > *, .content > .lb-views > [data-view] > *, .content > [data-view] > * { animation: rise-in var(--motion-rise) var(--ease-out) 80ms both; }
.content > .lb-views > [data-view] > :nth-child(2) { animation-delay: 120ms; }
.content > .lb-views > [data-view] > :nth-child(3) { animation-delay: 160ms; }

@keyframes fill-in {
  from { clip-path: inset(0 100% 0 0 round 999px); }
  to { clip-path: inset(0 0 0 0 round 999px); }
}
.progress__fill { animation: fill-in var(--motion-fill) var(--ease-out) 200ms both; }

@property --ring-reveal {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}
@keyframes ring-reveal {
  from { --ring-reveal: 0; }
  to { --ring-reveal: 1; }
}
@keyframes cap-in {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: none; }
}
.target-ring { animation: ring-reveal 1100ms var(--ease-out) 200ms both; }
.target-ring__cap--end { animation: cap-in 240ms var(--ease-out) 1150ms both; }

.card,
.kpi-card,
.link-row,
.streak-tile,
.challenge-card,
.stat-tile,
.announcement-banner {
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), background-color 160ms ease;
}
.card:hover,
.kpi-card:hover,
.link-row:hover,
.streak-tile:hover,
.challenge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px 0 rgba(59, 47, 138, 0.11);
}
.challenge-card:hover,
.streak-tile[href]:hover,
.link-row:hover { box-shadow: 0 16px 36px 0 rgba(59, 47, 138, 0.11), inset 0 0 0 1px var(--border-focus); }
.kpi-card:hover .icon-tile { background: var(--bg-accent-soft); }
.stat-tile:hover { background: var(--bg-accent-subtle); }
.announcement-banner:hover { box-shadow: 0 16px 36px 0 rgba(78, 60, 203, 0.25); }
.icon-tile { transition: background-color 160ms ease; }
.list-row[href],
.list-row--plain { transition: background-color 160ms ease, transform 160ms ease; }
.list-row--plain:hover { background: var(--bg-subtle); border-radius: var(--radius-sm); box-shadow: 0 0 0 6px var(--bg-subtle); }
.list-row[href]:hover { transform: translateX(2px); }
.button,
.nav-item,
.tab,
.language-switch__seg { transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease; }
.button:active,
.tab:active { transform: scale(0.97); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}
