/* Synoptic motion — springs and short ease-outs (see assets/js/motion.js). */
:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: linear(0, 0.0567, 0.1985, 0.3741, 0.5463, 0.6957, 0.8143, 0.9012, 0.9603, 0.9969, 1.0167, 1.0249, 1.0259, 1.0229, 1.0183, 1.0135, 1.0091, 1.0055, 1.0028, 1.0009, 1);
}

/* Sliding highlight behind the active segment. */
.has-motion-highlight { isolation: isolate; }
.motion-highlight {
  position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none;
  border-radius: var(--radius-xs); background: var(--surface);
  box-shadow: 0 0 0 1px var(--border), 0 1px 2px #0000000f;
  transition: transform .44s var(--spring), width .44s var(--spring), height .3s var(--ease-out), opacity .2s;
}
.segmented-control.has-motion-highlight > button.is-active,
.segmented-control.has-motion-highlight > button[aria-pressed="true"] { background: transparent; box-shadow: none; }
.segmented-control > button { transition: color .2s var(--ease-out); }
.rm-switch.has-motion-highlight .motion-highlight { background: var(--action-subtle); box-shadow: none; }

/* Sliding numbers: each character rolls inside its own clipped cell. */
.sliding-number { display: inline-flex; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sn-cell { position: relative; display: inline-block; overflow: hidden; vertical-align: top; white-space: pre; }
.sn-cell > span { display: inline-block; }
.sn-cell > .sn-ghost { position: absolute; left: 0; top: 0; }

@media (prefers-reduced-motion: reduce) {
  .motion-highlight { transition: none; }
}
