/* Decorative enhancements; the existing typography, layout and cursor stay intact. */
#jm-reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1040;
  height: 3px;
  background: linear-gradient(90deg, #70c4e9, #1d5699);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

#jm-cursor-trail {
  position: fixed;
  inset: 0;
  z-index: 1030;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.jm-reveal-pending {
  opacity: 0;
  transform: translateY(14px);
}

.jm-reveal-ready {
  transition: opacity 460ms ease-out, transform 460ms ease-out;
}

.jm-reveal-ready.jm-reveal-visible {
  opacity: 1;
  transform: none;
}

/* A keyboard user can always see and reach content immediately. */
.jm-reveal-pending:focus-within {
  opacity: 1;
  transform: none;
}

#jm-motion-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1040;
  padding: 7px 12px;
  border: 1px solid #d9e3ef;
  border-radius: 20px;
  background: #fff;
  color: #1d5699;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 2px 10px rgb(29 86 153 / 8%);
  cursor: pointer;
}

#jm-motion-toggle:hover { background: #f3f7fc; }
#jm-motion-toggle:focus-visible { outline: 2px solid #1d5699; outline-offset: 3px; }
#jm-motion-toggle:disabled { color: #666; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  #jm-cursor-trail { display: none; }
  .jm-reveal-pending,
  .jm-reveal-ready {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media print {
  #jm-cursor-trail, #jm-reading-progress, #jm-motion-toggle { display: none !important; }
  .jm-reveal-pending, .jm-reveal-ready { opacity: 1 !important; transform: none !important; }
}
