/* ══════════════════════════════════════════════════════
   TRANSITIONS
   ══════════════════════════════════════════════════════ */
.fade-enter { animation: fadeSlideIn .45s cubic-bezier(.22,1,.36,1) forwards; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero, .chart-card, .delta-banner, .kpi-row, .progress-row, .grid-2,
.all-tournaments, .movements-strip {
  transition: opacity .35s cubic-bezier(.22,1,.36,1),
              transform .35s cubic-bezier(.22,1,.36,1);
}
@media (prefers-reduced-motion: reduce) {
  .fade-enter { animation: none; }
  .hero, .chart-card, .delta-banner, .kpi-row, .progress-row, .grid-2,
  .all-tournaments, .movements-strip { transition: none; }
}

/* The back-to-top control and the keyboard hints live in shell.css and
   controls.css. */

/* ══════════════════════════════════════════════════════
   SKELETON LOADING STATES
   ══════════════════════════════════════════════════════ */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1.0; }
}
.skeleton {
  background: var(--surface3);
  border-radius: var(--radius-sm);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-chart { height: 260px; width: 100%; border-radius: var(--radius); }
.skeleton-text { height: 14px; margin-bottom: 10px; border-radius: 4px; }
.skeleton-text:nth-child(1) { width: 80%; }
.skeleton-text:nth-child(2) { width: 60%; }
.skeleton-text:nth-child(3) { width: 70%; }
.skeleton-text:nth-child(4) { width: 50%; }
.skeleton-card { height: 80px; width: 100%; border-radius: var(--radius); }
@media (max-width: 639px) {
  /* Hero on mobile is ~150–180px tall (number + label + CI + 2-up KPIs).
     Bumping skeleton-card from 80px reduces CLS when real content lands. */
  .skeleton-card { height: 160px; }
  .skeleton-chart { height: 240px; }
  /* Tighten empty-state vertical padding so they don't dominate mobile screens */
  .fav-empty, .compare-empty { padding: var(--s-5) var(--s-4); }
}

/* ══════════════════════════════════════════════════════
   ACCESSIBILITY
   ══════════════════════════════════════════════════════ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.chess-sq:focus {
  outline: 2px solid var(--gold, #C8971A);
  outline-offset: -2px;
  z-index: 1;
}

