html {
  overflow-y: scroll;              /* fallback */
  scrollbar-gutter: stable;        /* modern */
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;                
}

header.sticky {
  contain: layout paint;
}

#pageLoader { opacity: 1; transition: opacity 350ms ease 120ms;}
#pageLoader.is-hidden { opacity: 0; pointer-events: none; }

/* === RepublicCommons Loader === */

.rc-loader {
  display: grid;
  place-items: center;
  gap: 10px;
}

/* Rotating gold ring */
.rc-loader__ring {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  border: 4px solid rgba(255,255,255,.18);
  border-top-color: #C6A24A;          /* rc-gold */
  border-right-color: rgba(198,162,74,.55);
  animation: rc-spin 1.05s linear infinite;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.25));
}

/* Cream core with logo */
.rc-loader__core {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(245,241,230,.94);  /* rc-cream */
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
  display: grid;
  place-items: center;
  animation: rc-pulse 1.4s ease-in-out infinite;
}

/* Logo itself */
.rc-loader__logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* Loader text */
.rc-loader__text {
  margin-top: 64px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(255,255,255,.82);
  text-transform: uppercase;
}

/* Animations */
@keyframes rc-spin {
  to { transform: rotate(360deg); }
}

@keyframes rc-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .rc-loader__ring,
  .rc-loader__core {
    animation: none;
  }
}

/* Subtle gold glow behind loader core */
.rc-loader__core::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(198,162,74,0.35) 0%,
    rgba(198,162,74,0.18) 35%,
    rgba(198,162,74,0.08) 55%,
    rgba(198,162,74,0.0) 70%
  );
  filter: blur(6px);
  opacity: 0.65;
  animation: rc-glow 1.4s ease-in-out infinite;
  z-index: -1;
}

@keyframes rc-glow {
  0%, 100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rc-loader__core::before {
    animation: none;
    opacity: 0.55;
  }
}

input:focus {
  box-shadow:
    0 0 0 1px rgba(198,162,74,.45),
    0 0 0 6px rgba(198,162,74,.18);
}

.bg-vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,.35) 70%,
    rgba(0,0,0,.6) 100%
  );
  pointer-events: none;
}

/* While loader is visible, prevent flash/interaction */
[data-rc-loader] { background: rgba(14,42,58,0.92); }

[data-rc-loader] {
  background: rgba(14,42,58,0.92); /* deep navy veil */
}

[data-rc-card] {
  will-change: transform, opacity;
  transform: translateZ(0);
}