/* ==========================================================================
   wesley-yang.com — styles
   Plain CSS, no build step. Relative paths only.
   ========================================================================== */

:root{
  --accent:#2f6b4f;
  --accent2:#c1553b;
  --accent3:#3a5a8c;
  --gold:#d99a2b;
  --bg:#f6f5f1;
  --card:#fff;
  --ink:#17191a;
  --ink-2:#4a534e;
  --muted:#6b736d;
  --faint:#9aa39d;
  --line:rgba(20,25,22,.09);
  --sans:'Public Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --display:'Space Grotesk',system-ui,-apple-system,'Segoe UI',sans-serif;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font-family:var(--sans);line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
a:hover{color:var(--accent)}

/* ---------- header / nav ---------- */
#site-nav{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px clamp(20px,5vw,64px);
  border-bottom:1px solid var(--line);
  position:sticky;top:0;z-index:30;
  background:rgba(246,245,241,.88);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
}
.brand{display:flex;align-items:center;gap:12px;color:var(--ink)}
.brand:hover{color:var(--ink)}
.brand-mark{
  display:inline-flex;align-items:center;justify-content:center;
  width:34px;height:34px;border-radius:9px;
  background:var(--accent);color:#fff;
  font-family:var(--display);font-weight:700;font-size:14px;letter-spacing:-.02em;
}
.brand-name{font-family:var(--display);font-size:17px;font-weight:700;letter-spacing:-.01em}

.nav-links{display:flex;gap:26px;align-items:center}
.nav-item{
  position:relative;padding:3px 0;cursor:pointer;
  font-size:12.5px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;
  color:var(--ink-2);transition:color .2s;
}
.nav-item:hover{color:var(--accent)}
.nav-item::after{
  content:"";position:absolute;left:0;right:0;bottom:-3px;height:2px;
  background:var(--accent);border-radius:2px;
  transform:scaleX(0);transform-origin:left;transition:transform .28s ease;
}
.nav-item:hover::after,.nav-item.is-active::after{transform:scaleX(1)}
.nav-item.is-active{color:var(--accent)}

/* This one leaves the page instead of scrolling to a section, so it is styled
   as a small play chip rather than an underlined section link — the underline
   sweep is suppressed because it would promise in-page navigation. */
.nav-game{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 12px;border-radius:999px;
  background:rgba(47,107,79,.1);color:var(--accent);
  transition:background .2s,color .2s,transform .2s;
}
.nav-game::after{display:none}
.nav-game:hover{background:var(--accent);color:#fff;transform:translateY(-1px)}
.nav-game:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.nav-game svg{flex:0 0 auto}

.nav-hamb{
  display:none;background:none;border:0;cursor:pointer;padding:6px;
  color:var(--ink);transition:color .2s;
}
.nav-hamb:hover{color:var(--accent)}

/* ---------- layout ---------- */
.wrap{max-width:1180px;margin:0 auto;padding:0 clamp(20px,5vw,64px) 64px}
.grid{display:grid;gap:16px;margin-bottom:16px}
.grid-kpi{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.grid-2{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}

.card{
  background:var(--card);border:1px solid var(--line);border-radius:18px;
  padding:clamp(20px,3vw,30px);margin-bottom:16px;
}
.card:last-of-type{margin-bottom:0}

/* ---------- page header ---------- */
.page-head{
  display:flex;flex-wrap:wrap;gap:24px;align-items:flex-end;justify-content:space-between;
  padding:clamp(36px,6vw,68px) 0 clamp(26px,4vw,40px);
}
.page-head-text{max-width:640px}
.kicker{
  font-size:12px;letter-spacing:.28em;text-transform:uppercase;
  color:var(--accent);font-weight:700;margin-bottom:14px;
}
.kicker-muted{color:var(--muted);letter-spacing:.18em;margin-bottom:8px}
.page-head h1{
  font-family:var(--display);font-weight:700;
  font-size:clamp(32px,6vw,58px);line-height:1.02;letter-spacing:-.025em;margin:0;
}
.lede{
  font-size:clamp(15px,2vw,18px);line-height:1.6;color:#5f6b66;margin:16px 0 0;
  text-wrap:pretty;
}
.year-tabs{display:flex;gap:6px;padding:5px;background:#eceae3;border-radius:12px}
.year-tabs button{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;color:var(--muted);background:none;border:0;font-family:inherit;cursor:pointer;transition:color .18s,background .18s}
.year-tabs button:hover{color:var(--ink)}
.year-tabs button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.year-tabs .is-on{font-weight:700;background:#fff;color:var(--accent);box-shadow:0 2px 8px -3px rgba(20,25,22,.25)}

/* ---------- KPI cards ---------- */
.kpi{padding:22px 24px;margin-bottom:0;transition:transform .25s,box-shadow .25s}
.kpi:hover{transform:translateY(-4px);box-shadow:0 20px 40px -24px rgba(20,25,22,.45)}
.kpi-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.kpi-label{font-size:12.5px;color:var(--muted);font-weight:600}
.pill{font-size:11.5px;font-weight:700;padding:3px 8px;border-radius:6px;white-space:nowrap}
.pill-accent{color:var(--accent);background:rgba(47,107,79,.1)}
.pill-accent2{color:var(--accent2);background:rgba(193,85,59,.1)}
.kpi-value{font-family:var(--display);font-size:40px;font-weight:700;margin:10px 0 8px;line-height:1}
.kpi-unit{font-size:18px;color:var(--faint)}
.spark{width:100%;height:30px;display:block}

/* ---------- sections & charts ---------- */
.sec-head{
  display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;
  align-items:baseline;margin-bottom:26px;
}
.sec-head-text{flex:1 1 auto;min-width:0}
.card h2{font-family:var(--display);font-weight:700;font-size:clamp(19px,2.5vw,23px);margin:0;letter-spacing:-.01em}
.sec-head h2,.h2-lg{font-size:clamp(20px,3vw,26px)}
.h2-lg{margin:0 0 24px}
.sub{font-size:13px;color:var(--muted);margin-top:4px}
.sub-gap{margin:4px 0 18px}
.sub-gap-lg{margin:4px 0 24px}

.legend{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--ink-2);font-weight:600;flex:0 0 auto}
.legend-row{display:flex;flex-wrap:wrap;gap:18px;margin-bottom:14px;font-size:12.5px;font-weight:600}
.swatch{width:20px;height:3px;border-radius:2px;display:inline-block}
.swatch-accent{background:var(--accent)}
.swatch-accent2{background:var(--accent2)}
.swatch-accent3{background:var(--accent3)}
.swatch-gold{background:var(--gold)}

.chart{width:100%;height:auto;display:block}
.gridlines line{stroke:rgba(20,25,22,.09);stroke-width:1}
.axis text{fill:var(--faint)}
.axis-y{font-family:var(--display);font-size:11px;text-anchor:end}
.axis-left{font-family:var(--display);font-size:10.5px;text-anchor:start}
.axis-x{font-family:var(--sans);font-size:12px;text-anchor:middle}

/* ---------- goal rings ---------- */
.rings{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;text-align:center}
.ring{width:100%;max-width:118px;height:auto;display:block;margin:0 auto}
.ring-text{font-family:var(--display);font-size:24px;font-weight:700;fill:var(--ink)}
.ring-label{font-size:13px;font-weight:600;color:var(--ink-2);margin-top:10px}

/* ---------- PB table ---------- */
.pb-head,.pb-rows{display:grid;grid-template-columns:1fr auto auto;gap:10px 18px}
.pb-head{
  font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--faint);
  font-weight:700;padding-bottom:10px;border-bottom:1px solid rgba(20,25,22,.1);
}
.pb-head span:nth-child(2),.pb-head span:nth-child(3){text-align:right}
.pb-rows{gap:14px 18px;align-items:center;padding-top:14px;font-size:15.5px}
.pb-dist{font-weight:600}
.pb-time{font-family:var(--display);font-weight:600;text-align:right}
.pb-trend{text-align:right;color:var(--accent);font-weight:600;font-size:13.5px}

/* ---------- timeline ---------- */
.timeline{position:relative;padding-left:30px;border-left:2px solid rgba(20,25,22,.12)}
.tl-item{position:relative;padding:0 0 26px 4px}
.tl-item:last-child{padding-bottom:4px}
.tl-dot{
  position:absolute;left:-37px;top:4px;width:11px;height:11px;
  background:var(--accent);box-shadow:0 0 0 4px var(--card);
}
.tl-head{display:flex;gap:14px;align-items:baseline;flex-wrap:wrap}
.tl-year{font-family:var(--display);font-weight:700;color:var(--accent)}
.tl-title{font-size:18px;font-weight:600}
.tl-desc{margin:5px 0 0;font-size:14.5px;color:var(--muted);max-width:560px}

/* ---------- contact ---------- */
.contact-line{
  font-family:var(--display);font-weight:700;font-size:clamp(20px,3vw,26px);
  line-height:1.25;margin:0 0 16px;letter-spacing:-.01em;
}
.contact-email{
  font-family:var(--display);font-size:clamp(18px,3vw,28px);font-weight:600;
  color:var(--accent);border-bottom:1px solid;padding-bottom:2px;
  transition:opacity .2s;word-break:break-word;
}
.contact-email:hover{opacity:.7;color:var(--accent)}
.social{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}
.social a{
  padding:9px 18px;border:1px solid rgba(20,25,22,.16);border-radius:999px;
  font-size:13px;font-weight:600;transition:border-color .2s,color .2s;
}
.social a:hover{border-color:var(--accent);color:var(--accent)}

.footer{margin-top:44px;text-align:center;font-size:13px;color:var(--faint)}

/* ---------- animations ---------- */
@keyframes trkDraw{from{stroke-dashoffset:1700}to{stroke-dashoffset:0}}
@keyframes trkArea{from{opacity:0}to{opacity:1}}
@keyframes trkRise{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@keyframes trkPop{from{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}

.anim-draw{animation:trkDraw 1.7s cubic-bezier(.4,0,.2,1) both}
.anim-draw.d1{animation-delay:.1s}
.anim-draw.d2{animation-delay:.25s}
.anim-draw.d3{animation-delay:.4s}
.anim-area{animation:trkArea 1.2s ease .3s both}
.anim-pop{animation:trkPop .5s ease 1.4s both}
.anim-rise{transform-origin:center bottom;animation:trkRise .9s cubic-bezier(.2,.7,.3,1) both}
.ring-arc{transition:stroke-dashoffset 1.4s cubic-bezier(.4,0,.2,1)}
.ring-arc.d2{transition-delay:.15s}
.ring-arc.d3{transition-delay:.3s}

/* ---------- responsive: tablet & mobile ---------- */
@media(max-width:900px){
  .nav-hamb{display:inline-flex;align-items:center;justify-content:center}
  .nav-links{
    position:absolute;top:100%;left:0;right:0;display:none;
    flex-direction:column;align-items:flex-start;gap:18px;
    background:var(--bg);padding:22px clamp(20px,5vw,64px);
    border-bottom:1px solid rgba(20,25,22,.12);
    box-shadow:0 26px 44px -30px rgba(20,25,22,.5);
  }
  #site-nav[data-open="true"] .nav-links{display:flex}
  .nav-item::after{display:none}
  .nav-item{font-size:14px}
}
@media(max-width:620px){
  .grid-kpi,.grid-2{grid-template-columns:1fr}
  .page-head{align-items:flex-start}
  .year-tabs{width:100%}
  .year-tabs button{flex:1;text-align:center}
  .kpi-value{font-size:36px}
  .rings{grid-template-columns:1fr;gap:22px}
  .ring{max-width:132px}
  .pb-head,.pb-rows{grid-template-columns:1fr auto auto;gap:10px 12px}
}
@media(max-width:380px){
  .brand-name{display:none}
  .pb-rows{font-size:14.5px}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none!important;transition:none!important}
}

/* ---------- print ---------- */
@media print{
  #site-nav{position:static;background:none}
  .nav-hamb,.year-tabs{display:none}
  .card{break-inside:avoid;box-shadow:none}
  body{background:#fff}
}

/* ==========================================================================
   Sprint "trading terminal"
   A dark instrument panel deliberately set against the light page, so the
   race data reads like a market chart. One pane per distance; scales and
   geometry are computed in app.js, this file only styles it.
   ========================================================================== */
.tape{
  display:flex; flex-wrap:wrap; gap:8px 10px; margin:2px 0 12px;
}
.tape-item{
  display:inline-flex; align-items:center; gap:7px;
  padding:6px 11px; border-radius:8px;
  background:#12171d; color:#e8eef5;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12.5px; letter-spacing:.02em;
}
.tape-dot{ width:7px; height:7px; border-radius:50%; flex:none; }
.tape-item b{ font-weight:700; opacity:.85; }
.tape-val{ font-weight:700; }
.tape-chg--up{ color:#3ddc84; }      /* faster than the first race */
.tape-chg--down{ color:#ff6b6b; }
.tape-chg--flat{ color:#9aa7b4; }

.term{ background:#0e1319; border-radius:14px; padding:10px 6px 4px; overflow:hidden; }
.term-svg{ display:block; width:100%; height:auto; }

.tp-bg{ fill:#141b23; }
.tp-grid{ stroke:rgba(255,255,255,.07); stroke-width:1; }
.tp-line{ fill:none; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.tp-dot{ stroke:#0e1319; stroke-width:1.6; }
.tp-dot--last{ stroke-width:2; }
.tp-in{ fill:rgba(255,255,255,.55); }
.tp-lastline{ stroke-width:1; stroke-dasharray:3 3; opacity:.55; }
.tp-tag{ opacity:.95; }
.tp-tagtxt{
  fill:#0e1319; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12.5px; font-weight:700; text-anchor:middle;
}
.tp-name{ font-family:var(--display); font-size:13px; font-weight:700; letter-spacing:.06em; }
.tp-n{ fill:rgba(255,255,255,.42); font-size:9.5px; letter-spacing:.04em; }
.tp-ax,.tp-date{
  fill:rgba(255,255,255,.5);
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:9.5px;
}
.tp-ax{ text-anchor:end; }
.tp-date{ text-anchor:middle; }

.term-foot{
  display:flex; align-items:center; gap:7px;
  margin:9px 2px 0; font-size:12px; color:var(--muted);
}
.tp-in-key{
  width:6px; height:6px; border-radius:50%; background:var(--muted); flex:none;
}

/* ---- FIDE fact list under the chess chart ---- */
.facts-h{
  margin:18px 0 8px; font-family:var(--display);
  font-size:13px; letter-spacing:.05em; text-transform:uppercase; color:var(--ink-2);
}
.facts{ display:grid; gap:0; }
.fact{
  display:flex; justify-content:space-between; align-items:baseline; gap:14px;
  padding:6px 0; border-bottom:1px solid rgba(20,25,22,.07); font-size:14.5px;
}
.fact:last-child{ border-bottom:0; }
.fact-k{ color:var(--ink-2); }
.fact-v{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-weight:600; text-align:right;
}
.fact-v em{ font-style:normal; font-weight:400; color:var(--muted); font-size:12.5px; }
.facts-note{ margin-top:8px; font-size:12px; color:var(--muted); text-align:right; }

@media (max-width:600px){
  .tape-item{ font-size:11.5px; padding:5px 9px; }
  .fact{ font-size:13.5px; }
}
.tape-rec{
  color:#9aa7b4; padding-left:8px; margin-left:2px;
  border-left:1px solid rgba(255,255,255,.14); font-size:11.5px; letter-spacing:.04em;
}

/* ==========================================================================
   Interactivity: draw-in animations, tooltip, isolate, pie
   Everything here is disabled under prefers-reduced-motion — the charts must
   still show their final state, just without the movement.
   ========================================================================== */

/* Line draws itself. pathLength="1" on the <path> means one keyframe works
   for any path, whatever its real length. */
@keyframes wy-draw{ from{ stroke-dashoffset:1 } to{ stroke-dashoffset:0 } }
@keyframes wy-pop{ from{ opacity:0; transform:scale(.2) } to{ opacity:1; transform:scale(1) } }
@keyframes wy-fade{ from{ opacity:0 } to{ opacity:1 } }

.tp-line{ stroke-dasharray:1; animation:wy-draw 1.1s cubic-bezier(.4,0,.2,1) both }
.tp-dot{
  transform-box:fill-box; transform-origin:center; cursor:pointer;
  animation:wy-pop .38s cubic-bezier(.34,1.56,.64,1) both;
  animation-delay:calc(.5s + var(--i,0) * .045s);
  transition:r .15s ease;
}
.tp-dot:hover,.tp-dot.is-hot{ r:6.2 }
.tp-dot:focus-visible{ outline:2px solid #fff; outline-offset:2px }
.tp-tag,.tp-tagtxt,.tp-lastline{ animation:wy-fade .5s ease both; animation-delay:1.1s }

/* Ticker chip isolates one distance */
.tape-item{ cursor:pointer; transition:transform .15s ease, box-shadow .15s ease }
.tape-item:hover{ transform:translateY(-2px) }
.tape-item.is-sel{ box-shadow:0 0 0 2px rgba(255,255,255,.55) inset }
.term-svg[data-only] .tp-pane{ opacity:.22; transition:opacity .25s ease }
.term-svg[data-only="50 M"] .tp-pane[data-ev="50 M"],
.term-svg[data-only="80 M"] .tp-pane[data-ev="80 M"],
.term-svg[data-only="120 M"] .tp-pane[data-ev="120 M"]{ opacity:1 }
.term-hint{ margin-left:auto; font-weight:600; color:var(--accent) }

/* Floating tooltip, shared by every chart */
.wtip{
  position:absolute; z-index:60; pointer-events:none;
  background:#12171d; color:#e8eef5; border-radius:9px; padding:7px 11px;
  font-size:12.5px; line-height:1.35; white-space:nowrap;
  box-shadow:0 12px 26px -12px rgba(0,0,0,.7);
  opacity:0; transform:translateY(4px); transition:opacity .14s ease, transform .14s ease;
}
.wtip.is-on{ opacity:1; transform:translateY(0) }
.wtip b{ display:block; font-size:11px; letter-spacing:.06em; opacity:.7 }
.wtip-t{ font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-weight:700; font-size:15px }
.wtip-d{ display:block; opacity:.62; font-size:11.5px }

/* Chess rating lines draw in too */
#c2-0,#c2-1,#c2-2{ stroke-dasharray:1; animation:wy-draw 1.3s cubic-bezier(.4,0,.2,1) both }
#c2-1{ animation-delay:.15s } #c2-2{ animation-delay:.3s }

/* ---- interactive pie ---- */
.pie-modes{ display:flex; gap:6px; padding:5px; background:#eceae3; border-radius:12px; margin-bottom:16px }
.pie-mode{
  flex:1; padding:8px 14px; border:0; border-radius:8px; background:none; cursor:pointer;
  font-family:inherit; font-size:13px; font-weight:600; color:var(--muted);
  transition:background .18s, color .18s;
}
.pie-mode:hover{ color:var(--ink) }
.pie-mode.is-on{ background:#fff; color:var(--accent); font-weight:700; box-shadow:0 2px 8px -3px rgba(20,25,22,.25) }
.pie-mode:focus-visible{ outline:2px solid var(--accent); outline-offset:2px }

/* two donuts side by side — white and black */
.pies{ display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:14px }
.pie-card{ background:rgba(20,25,22,.03); border-radius:14px; padding:14px 14px 10px }
.pie-h{
  display:flex; align-items:baseline; justify-content:space-between; gap:8px;
  margin:0 0 8px; font-family:var(--display); font-size:14px; font-weight:700;
}
.pie-n{ font-size:11.5px; font-weight:600; color:var(--muted); font-family:var(--sans) }
.pie-body{ display:flex; flex-direction:column; align-items:center; gap:8px }
.pie-svg{ width:100%; max-width:180px; height:auto; display:block }
.pie-slice{
  cursor:pointer; transform-box:fill-box; transform-origin:center;
  animation:wy-pop .45s cubic-bezier(.34,1.56,.64,1) both;
  animation-delay:calc(var(--i,0) * .1s);
  transition:filter .18s ease;
}
.pie-slice:hover{ filter:brightness(1.14) }
.pie-slice.is-pick{ filter:drop-shadow(0 5px 10px rgba(20,25,22,.35)) }
.pie-slice:focus-visible{ outline:2px solid var(--ink); outline-offset:2px }
.pie-mid-n{ font-family:var(--display); font-size:26px; font-weight:700; fill:var(--ink); text-anchor:middle }
.pie-mid-l{ font-size:10.5px; fill:var(--muted); text-anchor:middle; letter-spacing:.04em }
.pie-mid-s{ font-size:11px; font-weight:700; fill:var(--accent); text-anchor:middle }

.pie-legend{ display:flex; flex-direction:column; gap:3px; width:100% }
.pie-key{
  display:flex; align-items:center; gap:8px; width:100%;
  padding:5px 8px; border:0; border-radius:8px; background:transparent; cursor:pointer;
  font-family:inherit; font-size:13px; color:var(--ink); text-align:left;
  transition:background .16s ease;
}
.pie-key:hover{ background:rgba(20,25,22,.06) }
.pie-key.is-pick{ background:rgba(20,25,22,.09); font-weight:600 }
.pie-key i{ width:10px; height:10px; border-radius:3px; flex:none }
.pie-key b{ margin-left:auto; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace }
.pie-key span{ color:var(--muted); font-size:11.5px; min-width:36px; text-align:right }
.pie-key:focus-visible{ outline:2px solid var(--accent); outline-offset:1px }

@media (prefers-reduced-motion:reduce){
  .tp-line,.tp-dot,.tp-tag,.tp-tagtxt,.tp-lastline,.pie-slice,
  #c2-0,#c2-1,#c2-2{ animation:none !important; stroke-dashoffset:0 !important; opacity:1 !important }
}

/* ==========================================================================
   Chart characters: walking pawns, running sprinter, confetti
   All motion is off under prefers-reduced-motion; the charts keep their data.
   ========================================================================== */

/* ---- chess: one hit-dot per month ---- */
.c2-dot{
  stroke:#fff; stroke-width:1.3; cursor:pointer;
  transform-box:fill-box; transform-origin:center;
  transition:r .15s ease, stroke-width .15s ease;
}
.c2-dot:hover,.c2-dot.is-hot{ r:5.6; stroke-width:2 }
.c2-dot.is-peak{ stroke:var(--ink); stroke-width:1.8 }   /* highest rating */
.c2-dot:focus-visible{ outline:2px solid var(--accent); outline-offset:1px }

/* ---- chess: pawns walking the curves ---- */
@keyframes wy-walkPath{ from{ offset-distance:0% } to{ offset-distance:100% } }
@keyframes wy-step{
  0%,100%{ transform:translateY(0) rotate(-4deg) }
  50%    { transform:translateY(-1.6px) rotate(4deg) }
}
.c2-walk{
  offset-rotate:0deg;                        /* stay upright along the curve */
  animation:wy-walkPath 16s linear infinite;
}
.c2-walk--w{ animation-duration:19s }        /* the two never march in lockstep */
.c2-walk-in{
  transform-box:fill-box; transform-origin:center bottom;
  animation:wy-step .62s ease-in-out infinite;
}
.c2-walk--w *{ fill:#fff; stroke:#17191a; stroke-width:.9 }
.c2-walk--b *{ fill:#17191a; stroke:#fff; stroke-width:.9 }
/* reading a value stops the marching so the two don't compete for attention */
#c2-svg.is-paused .c2-walk,
#c2-svg.is-paused .c2-walk-in{ animation-play-state:paused }

/* ---- sprint: personal-best dots ---- */
.tp-dot.is-pb{ stroke:#fff; stroke-width:2.2 }
.tp-dot.is-pb::after{ content:none }

/* ---- sprint: the little runner ---- */
/* Timing comes from per-pane @keyframes generated in app.js and set inline,
   because the pace changes segment by segment with each race. Only the
   geometry lives here. */
.tp-run{ offset-rotate:0deg }
.tp-run-in{ transform-box:fill-box; transform-origin:center }
.tp-limb{ transform-box:fill-box; transform-origin:top left }

/* ---- confetti on a personal best ---- */
@keyframes wy-cfti{
  0%  { opacity:0; transform:translate(0,0) rotate(0) scale(.5) }
  12% { opacity:1 }
  100%{ opacity:0; transform:translate(var(--dx),var(--dy)) rotate(var(--rot)) scale(1) }
}
.cfti{
  transform-box:fill-box; transform-origin:center;
  animation:wy-cfti .95s cubic-bezier(.2,.8,.4,1) var(--d,0ms) both;
}

@media (prefers-reduced-motion:reduce){
  .c2-walk,.c2-walk-in,.tp-run,.tp-run-in,.tp-limb,.cfti{
    animation:none !important;
  }
}
