/* Sport on Earth — database-page enhancements (Nov 2, 2026).
   Progressive enhancement only: every rule here is additive. Pages work
   fully with this file missing, blocked, or unsupported.

   1) Scroll-driven performance timelines: elements with .soe-timeline
      reveal and grow their progress rail as they scroll into view,
      driven by the CSS scroll-driven animations API where supported.
   2) View Transitions: player cards carry a view-transition-name so
      opening the full stat breakdown morphs the card into the panel in
      browsers that support the View Transitions API. */

.soe-timeline{position:relative;margin:18px 0;padding-left:26px}
.soe-timeline::before{content:"";position:absolute;left:8px;top:6px;bottom:6px;width:3px;
  background:var(--acc,#1f6b4a);opacity:.28;border-radius:2px}
.soe-timeline .soe-tl-rail{position:absolute;left:8px;top:6px;width:3px;height:100%;
  background:var(--acc,#1f6b4a);border-radius:2px;transform-origin:top;transform:scaleY(0)}
.soe-timeline .soe-tl-item{position:relative;margin:0 0 14px}
.soe-timeline .soe-tl-item::before{content:"";position:absolute;left:-23px;top:7px;width:11px;height:11px;
  border-radius:50%;background:var(--card,#fff);border:3px solid var(--acc,#1f6b4a)}
.soe-timeline .soe-tl-year{font-family:Archivo,Arial,sans-serif;font-weight:800;font-size:.82rem;
  letter-spacing:.08em;text-transform:uppercase;color:var(--acc,#1f6b4a)}

@supports (animation-timeline: scroll()) {
  .soe-timeline .soe-tl-rail{
    animation:soe-tl-grow linear both;
    animation-timeline:view();
    animation-range:entry 0% exit 100%;
  }
  .soe-timeline .soe-tl-item{
    animation:soe-tl-in linear both;
    animation-timeline:view();
    animation-range:entry 0% entry 60%;
  }
}
@keyframes soe-tl-grow{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@keyframes soe-tl-in{from{opacity:.25;transform:translateY(10px)}to{opacity:1;transform:none}}

/* Card -> breakdown morph (View Transitions API). The JS sets
   view-transition-name inline on the active card and panel; these
   rules only tune the animation. */
::view-transition-old(soe-card),::view-transition-new(soe-card){
  animation-duration:.38s;animation-timing-function:cubic-bezier(.2,.7,.3,1);
}
@media (prefers-reduced-motion: reduce){
  ::view-transition-old(soe-card),::view-transition-new(soe-card){animation:none}
  .soe-timeline .soe-tl-rail,.soe-timeline .soe-tl-item{animation:none;transform:none}
}

.soe-breakdown{border:2px solid var(--fg,#10281c);border-radius:8px;background:var(--card,#fff);
  padding:16px 18px;margin:14px 0}
.soe-breakdown h3{margin:0 0 4px}
.soe-breakdown .soe-bd-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin-top:10px}
.soe-breakdown .soe-bd-cell{border:1px solid var(--mut,#4d6357);border-radius:6px;padding:8px 10px}
.soe-breakdown .soe-bd-cell b{display:block;font-family:Archivo,Arial,sans-serif;font-size:.72rem;
  letter-spacing:.14em;text-transform:uppercase;color:var(--acc,#1f6b4a)}
