/* MOBILE PULL-TO-REFRESH START
   Non-Study pages only. Does not style or alter the shared navbar. */

/* Stop rubber-band movement at page boundaries. This does not disable
   ordinary document or nested-panel scrolling. The touch handler below
   supplies the site's own intentional pull-to-refresh gesture. */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  html, body {
    overscroll-behavior-y: none;
  }

  /* Use the small, stable viewport as the minimum for ordinary pages.
     A 100vh body can be taller than the visible iPhone viewport by exactly
     the browser-toolbar height, creating a phantom scroll on short pages. */
  html, body:not(.llm-body) {
    min-height: 100svh;
  }
}

.site-mobile-refresh-indicator {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  z-index: 2147483000;
  display: none;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 28px);
  min-height: 42px;
  padding: 9px 14px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(28, 28, 28, .96);
  color: #f2f2f2;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .36);
  font: 750 14px/1.2 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.site-mobile-refresh-indicator.is-visible {
  display: flex;
}

.site-mobile-refresh-indicator__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.site-mobile-refresh-indicator.is-ready {
  background: rgba(239, 239, 239, .98);
  color: #151515;
  border-color: rgba(255, 255, 255, .5);
}

.site-mobile-refresh-indicator.is-refreshing .site-mobile-refresh-indicator__icon {
  animation: site-mobile-refresh-spin .65s linear infinite;
}

@keyframes site-mobile-refresh-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .site-mobile-refresh-indicator.is-refreshing .site-mobile-refresh-indicator__icon {
    animation: none;
  }
}

/* MOBILE PULL-TO-REFRESH END */
