
/* Provide CSS fallback so anchor targets leave space for fixed header */
:target { scroll-margin-top: 96px; } /* baseline; JS will compute exact height */
section[id], div[id], h2[id], h3[id] { scroll-margin-top: 96px; }



/* === Stat Cats: Popup Subscribe Restyle (visual only) === */
.sc-subscribe-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 9999;
}
.sc-subscribe-overlay.is-active { display: flex; }

.sc-subscribe-modal {
  width: min(92vw, 520px);
  background: linear-gradient(180deg, rgba(15,23,42,0.98) 0%, rgba(15,23,42,0.96) 100%);
  border: 1px solid rgba(226,106,44,0.35);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.45);
  overflow: hidden;
  position: relative;
}
.sc-subscribe-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(226,106,44,0.25);
}
.sc-subscribe-logo {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: #ED6D42;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(226,106,44,0.25);
}
.sc-subscribe-title {
  font-size: 18px;
  font-weight: 700;
  color: #F8FAFC;
  letter-spacing: 0.2px;
}
.sc-subscribe-body {
  padding: 22px;
}
.sc-subscribe-subtitle {
  color: rgba(248,250,252,0.85);
  font-size: 14px;
  line-height: 1.5;
  margin: 6px 0 18px 0;
}
.sc-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px 14px;
  color: #F8FAFC;
  font-size: 14px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  margin-bottom: 12px;
}
.sc-input::placeholder { color: rgba(248,250,252,0.5); }
.sc-input:focus {
  border-color: #ED6D42;
  box-shadow: 0 0 0 3px rgba(226,106,44,0.25);
}

.sc-submit {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  background: #ED6D42;
  color: #0B0B0B;
  cursor: pointer;
  transition: transform 80ms ease, filter 120ms ease;
  margin-top: 4px;
}
.sc-submit:hover { filter: brightness(1.05); }
.sc-submit:active { transform: translateY(1px); }

.sc-footnote {
  font-size: 12px;
  color: rgba(248,250,252,0.6);
  margin-top: 10px;
  text-align: center;
}

.sc-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(248,250,252,0.9);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.sc-close:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }

@media (prefers-reduced-motion: no-preference) {
  .sc-subscribe-modal { animation: sc-pop 180ms ease-out both; }
  @keyframes sc-pop {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
}

@media (max-width: 420px) {
  .sc-subscribe-title { font-size: 16px; }
}



/* Hide Ghost Portal when we intentionally override signup with custom modal */
body.sc-override-portal #ghost-portal-root { display: none !important; }


/* Success + error state for subscribe modal */
.sc-success, .sc-error { padding: 22px; text-align: center; }
.sc-success h3 { font-size: 20px; font-weight: 800; color: #F8FAFC; margin-bottom: 8px; }
.sc-success p { color: rgba(248,250,252,0.85); font-size: 14px; }
.sc-success .sc-actions { margin-top: 16px; display: flex; gap: 10px; justify-content: center; }
.sc-btn { border: none; border-radius: 12px; padding: 10px 14px; font-weight: 700; cursor: pointer; }
.sc-btn-primary { background: #ED6D42; color: #0B0B0B; }
.sc-btn-ghost { background: rgba(255,255,255,0.06); color: #F8FAFC; border: 1px solid rgba(255,255,255,0.12); }
.sc-submit[disabled] { opacity: 0.7; cursor: not-allowed; }
.sc-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%; animation: sc-spin 800ms linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes sc-spin { to { transform: rotate(360deg); } }
.sc-error { color: #fecaca; font-size: 14px; }

