/* Groups Academy — moving light around boxes + Free Bits button. Plain CSS, no build step. */
@property --gx-a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes gx-spin { to { --gx-a: 360deg; } }

/* Any white/slate card with rounded corners and a shadow gets a light running around its border */
:is(div, a, article, section, li)[class*="rounded-xl"][class*="shadow"]:not(.fixed):not(.absolute):not(.sticky):not(.ga-stat):not([role="dialog"]):not(.no-glow),
:is(div, a, article, section, li)[class*="rounded-2xl"][class*="shadow"]:not(.fixed):not(.absolute):not(.sticky):not(.ga-stat):not([role="dialog"]):not(.no-glow),
.glow-card {
  position: relative;
}
:is(div, a, article, section, li)[class*="rounded-xl"][class*="shadow"]:not(.fixed):not(.absolute):not(.sticky):not(.ga-stat):not([role="dialog"]):not(.no-glow)::before,
:is(div, a, article, section, li)[class*="rounded-2xl"][class*="shadow"]:not(.fixed):not(.absolute):not(.sticky):not(.ga-stat):not([role="dialog"]):not(.no-glow)::before,
.glow-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(from var(--gx-a), transparent 0deg, transparent 250deg, #FC7B08 300deg, #ffd9a8 330deg, #002771 350deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: gx-spin 4s linear infinite;
}
.dark :is(div, a, article, section, li)[class*="rounded-xl"][class*="shadow"]::before { background: conic-gradient(from var(--gx-a), transparent 0deg, transparent 250deg, #FC7B08 300deg, #fff 335deg, #60a5fa 350deg, transparent 360deg); }

/* Free Bits button: orange pill with a light sweeping round it */
.glow-btn {
  position: relative;
  background: #FC7B08;
  color: #fff;
  border-radius: 9999px;
  padding: .375rem 1rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 0 0 0 rgba(252,123,8,.5);
  animation: gx-pulse 2.4s ease-in-out infinite;
}
.glow-btn:hover { background: #e06c00; }
.glow-btn::before {
  content: "";
  position: absolute;
  inset: -3px;
  padding: 2px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(from var(--gx-a), transparent 0deg, transparent 270deg, #002771 320deg, #fff 345deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: gx-spin 2.5s linear infinite;
}
@keyframes gx-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(252,123,8,.45); } 50% { box-shadow: 0 0 0 6px rgba(252,123,8,0); } }

@media (prefers-reduced-motion: reduce) {
  [class*="rounded-xl"]::before, [class*="rounded-2xl"]::before, .glow-card::before, .glow-btn::before, .glow-btn { animation: none; }
}

/* ---- Mobile / small-screen safety net ---- */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, video, iframe, svg { max-width: 100%; }
img { height: auto; }
header a img { max-width: 52vw; object-fit: contain; }
pre, code { overflow-x: auto; max-width: 100%; }
.prose-ca table, .prose table, article table { display: block; max-width: 100%; overflow-x: auto; }
.prose-ca, article, h1, h2, h3, .font-semibold, .font-medium { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px; }              /* stops iOS zoom-on-focus */
  a, button { min-height: 36px; }
  main, .max-w-7xl { padding-left: .75rem; padding-right: .75rem; }
}
