/* Button wrapper */

    .back-to-top {
      position: fixed;
      right: 16px;             /* distance from right edge */
      bottom: 16px;            /* distance from bottom edge */
      z-index: 9999;
      display: inline-block;
    }

    /* The button itself */
    .back-to-top button {
      -moz-appearance: none;
           appearance: none;
      -webkit-appearance: none;
      border: 0;
      background: #0b79d0;
      color: white;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      box-shadow: 0 6px 18px rgba(11,121,208,0.18);
      cursor: pointer;
      font-size: 20px;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
      opacity: 0.98;
    }

    /* Hover / focus */
    .back-to-top button:hover,
    .back-to-top button:focus {
      transform: translateY(-2px);
      box-shadow: 0 10px 24px rgba(11,121,208,0.22);
      outline: none;
    }

    /* Focus-visible for keyboard users */
    .back-to-top button:focus-visible {
      box-shadow: 0 0 0 4px rgba(11,121,208,0.18);
    }

    /* Respect reduced motion preference */
    @media (prefers-reduced-motion: reduce) {
      .back-to-top button { transition: none; }
    }
