/* Site-wide cursor. cursor.js adds .has-cursor once it is running (fine pointers only),
   so touch devices and no-JS visitors keep their normal cursor.
   states: dot (default) -> bar (over text) -> underline (over anything clickable) */
html.has-cursor,html.has-cursor *{cursor:none !important}

.cur{
  position:fixed;left:0;top:0;z-index:2147483647;pointer-events:none;
  width:0;height:0;
  opacity:0;transition:opacity .25s ease;
  will-change:transform;
}
.cur.on{opacity:1}

.cur-body{
  --ease:cubic-bezier(.22,.8,.24,1);
  position:absolute;left:0;top:0;
  width:7px;height:7px;border-radius:4px;
  background:#15171a;
  /* a hair of paper around the ink keeps it readable over the net's lines */
  box-shadow:0 0 0 1.5px rgba(251,247,242,.85),inset 0 0 0 0 rgba(21,23,26,0);
  transform:translate(-50%,-50%) scale(1);
  transition:
    width .32s var(--ease),height .32s var(--ease),border-radius .32s var(--ease),
    background-color .09s ease-out,box-shadow .22s ease,transform .18s var(--ease);
}
/* over text: the dot stretches into a hairline the height of the line */
.cur[data-s="text"] .cur-body{
  width:1.25px;height:var(--h,18px);border-radius:1px;
  box-shadow:0 0 0 0 rgba(251,247,242,0);
}

/* over a link / button: the dot stretches into a line as wide as the link text and
   glides to sit just under it (cursor.js moves the whole cursor there) */
.cur[data-s="link"] .cur-body{
  width:var(--w,24px);height:2px;border-radius:1px;
  box-shadow:0 0 0 0 rgba(251,247,242,0);
}

/* 3D graph: an open ring over empty space (drag to orbit), a bigger tinted ring over a node, a
   pressed-in disc while dragging */
.cur[data-s="grab"] .cur-body,.cur[data-s="ring"] .cur-body,.cur[data-s="grabbing"] .cur-body{
  border-radius:50%;background-color:rgba(21,23,26,0);
}
.cur[data-s="grab"] .cur-body{width:26px;height:26px;box-shadow:inset 0 0 0 1.25px rgba(21,23,26,.5)}
.cur[data-s="ring"] .cur-body{width:40px;height:40px;background-color:rgba(21,23,26,.07);box-shadow:inset 0 0 0 1.5px rgba(21,23,26,.85)}
.cur[data-s="grabbing"] .cur-body{width:18px;height:18px;background-color:rgba(21,23,26,.16);box-shadow:inset 0 0 0 1.5px rgba(21,23,26,.85)}

/* press */
.cur[data-down] .cur-body{transform:translate(-50%,-50%) scale(.8)}

@media (prefers-reduced-motion:reduce){
  .cur-body,.cur{transition:none}
}

/* the link's own underline steps aside while the cursor line is drawn on it, so the
   two never double up, however a link is styled (set by cursor.js) */
.cur-live,.cur-live *{
  text-decoration-color:transparent !important;
  transition-property:color,background-color,opacity,transform !important;
}
