function mount(ctx) {
  const canvas = ctx.el;
  const draw = canvas.getContext('2d');
  let width = 0, height = 0, dpr = 1;
  const letters = 'RUNNER'.split('');

  function resize() {
    const box = canvas.getBoundingClientRect();
    dpr = Math.min(window.devicePixelRatio || 1, 2);
    width = Math.max(1, box.width);
    height = Math.max(1, box.height);
    canvas.width = Math.round(width * dpr);
    canvas.height = Math.round(height * dpr);
    draw.setTransform(dpr, 0, 0, dpr, 0, 0);
  }
  const observer = new ResizeObserver(resize);
  observer.observe(canvas);
  resize();

  ctx.raf((time) => {
    const t = time * 0.001;
    draw.clearRect(0, 0, width, height);
    const base = Math.min(width, height);
    const fontSize = Math.max(38, Math.min(base * .225, width / 5.45));
    const tracking = fontSize * .055;
    draw.font = `600 ${fontSize}px Manrope, Arial, sans-serif`;
    let wordWidth = letters.reduce((sum, letter) => sum + draw.measureText(letter).width, 0) + tracking * (letters.length - 1);
    const startX = (width - wordWidth) / 2;
    const midY = height * .52;

    draw.strokeStyle = 'rgba(79, 105, 126, .16)';
    draw.lineWidth = 1;
    draw.beginPath(); draw.moveTo(width * .12, midY + fontSize * .63); draw.lineTo(width * .88, midY + fontSize * .63); draw.stroke();
    let x = startX;
    letters.forEach((letter, i) => {
      const wave = (Math.sin(t * 2.2 - i * .82) + 1) / 2;
      const pulse = Math.max(0, Math.sin(t * 2.2 - i * .82));
      const lift = pulse * fontSize * .18;
      const markX = x + draw.measureText(letter).width / 2;
      draw.fillStyle = i === 3 ? '#4a89ab' : '#14202b';
      draw.globalAlpha = .48 + wave * .52;
      draw.fillText(letter, x, midY - lift);
      draw.globalAlpha = .12 + wave * .22;
      draw.fillStyle = '#5e96b6';
      draw.fillRect(markX - 1, midY + fontSize * .43, 2, 5 + pulse * 12);
      x += draw.measureText(letter).width + tracking;
    });
    const runner = ((t * .125) % 1);
    const runX = width * (.13 + runner * .74);
    draw.globalAlpha = .85;
    draw.fillStyle = '#62c9a2';
    draw.fillRect(runX, midY + fontSize * .63 - 2, 20, 4);
    draw.globalAlpha = 1;
  });
  ctx.cleanup(() => observer.disconnect());
}
