/* ==========================================================
   MgtsPayments — public site (homepage, legal pages, leaderboard)
   ========================================================== */
:root {
  --mg-primary: #2966cb;
  --mg-primary-600: #1f55b0;
  --mg-primary-50: #eef4ff;
  --mg-ink: #0f172a;
  --mg-body: #475569;
  --mg-muted: #64748b;
  --mg-line: #e8edf5;
  --mg-surface: #ffffff;
  --mg-tint: #f6f8fc;
  --mg-navy: #0b1426;
  --mg-navy-2: #12213f;
  --mg-green: #16a34a;
  --mg-red: #dc2626;
  --mg-gold: #e0a83b;
  --mg-silver: #a4acb9;
  --mg-bronze: #bd7a4a;
  --mg-radius: 20px;
  --mg-shadow: 0 10px 30px rgba(15, 23, 42, .06);
  --mg-shadow-lg: 0 24px 60px rgba(15, 23, 42, .12);
  --mg-ease: cubic-bezier(.22, 1, .36, 1);
}

* { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }

html { scroll-behavior: smooth; }

body.mg-site {
  color: var(--mg-body);
  background: var(--mg-surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[id] { scroll-margin-top: 110px; }

.min-w-0 { min-width: 0; }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; font-weight: 600; padding: .7rem 1.35rem; transition: transform .2s var(--mg-ease), box-shadow .2s var(--mg-ease), background-color .2s, color .2s, border-color .2s; }
.btn-lg { padding: .9rem 1.7rem; font-size: 1rem; }
.btn:active { transform: scale(.97); }

.mg-btn-primary { background: var(--mg-primary); color: #fff; border: 1px solid var(--mg-primary); box-shadow: 0 8px 22px rgba(41, 102, 203, .28); }
.mg-btn-primary:hover, .mg-btn-primary:focus { background: var(--mg-primary-600); border-color: var(--mg-primary-600); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(41, 102, 203, .36); }

.mg-btn-ghost { color: var(--mg-ink); border: 1px solid transparent; }
.mg-btn-ghost:hover { background: var(--mg-tint); color: var(--mg-ink); }

.mg-btn-outline-light { color: #fff; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .04); }
.mg-btn-outline-light:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, .1); transform: translateY(-2px); }

.mg-btn-light { background: #fff; color: var(--mg-ink); border: 1px solid #fff; }
.mg-btn-light:hover { background: #eef4ff; color: var(--mg-ink); transform: translateY(-2px); }

/* ---------- Header ---------- */
.mg-site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.mg-navbar {
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
          backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  padding: .9rem 0;
  transition: padding .3s var(--mg-ease), box-shadow .3s, border-color .3s;
}

.mg-site-header.is-scrolled .mg-navbar {
  padding: .55rem 0;
  border-color: var(--mg-line);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.mg-nav-link {
  color: var(--mg-body) !important;
  font-weight: 500;
  font-size: .95rem;
  padding: .5rem .85rem !important;
  border-radius: 999px;
  position: relative;
  transition: color .2s, background-color .2s;
}
.mg-nav-link:hover { color: var(--mg-ink) !important; background: var(--mg-tint); }
.mg-nav-link.active { color: var(--mg-primary) !important; background: var(--mg-primary-50); }

.mg-burger {
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--mg-tint);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
}
.mg-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--mg-ink); transition: transform .3s var(--mg-ease); }
.mg-burger span:nth-child(2) { width: 12px; margin-left: 6px; }

.mg-offcanvas { background: var(--mg-navy); color: #fff; width: min(86vw, 360px) !important; }
.mg-offcanvas .offcanvas-header { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.mg-offcanvas-links .nav-link {
  color: #e2e8f0;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 1rem .25rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mg-offcanvas-links .nav-link i { opacity: .4; transition: transform .2s, opacity .2s; }
.mg-offcanvas-links .nav-link:hover i { transform: translateX(4px); opacity: 1; }
.mg-offcanvas.show .mg-offcanvas-links .nav-item,
.mg-offcanvas.showing .mg-offcanvas-links .nav-item { animation: mg-slide-in .45s var(--mg-ease) both; animation-delay: calc(var(--i) * 45ms + 80ms); }

@keyframes mg-slide-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--mg-ease), transform .8s var(--mg-ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Hero ---------- */
.mg-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 80% -10%, #1c3b78 0%, transparent 60%), linear-gradient(180deg, var(--mg-navy) 0%, var(--mg-navy-2) 100%);
  color: #cbd5e1;
  padding: 88px 0 110px;
}

.mg-hero__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
}

.mg-hero__glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; animation: mg-drift 14s ease-in-out infinite alternate; }
.mg-hero__glow--1 { width: 420px; height: 420px; background: #2966cb; top: -120px; left: -120px; }
.mg-hero__glow--2 { width: 360px; height: 360px; background: #7c3aed; bottom: -160px; right: 10%; opacity: .28; animation-delay: -6s; }

@keyframes mg-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, 30px) scale(1.1); } }

.mg-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .45rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #dbe6ff;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 1.4rem;
}
.mg-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: mg-pulse 2s infinite; }

@keyframes mg-pulse { 70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

.mg-hero__title {
  color: #fff;
  font-weight: 800;
  font-size: clamp(2.1rem, 4.6vw, 3.55rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  margin-bottom: 1.25rem;
}

.mg-gradient-text {
  background: linear-gradient(90deg, #8fb4ff 0%, #c4b5fd 50%, #8fb4ff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: mg-shine 6s linear infinite;
}
@keyframes mg-shine { to { background-position: 200% center; } }

.mg-hero__lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: #aab8d0; max-width: 540px; margin: 0 auto 2rem; line-height: 1.65; }
@media (min-width: 992px) { .mg-hero__lead { margin-left: 0; } }

.mg-hero__trust { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; justify-content: center; font-size: .9rem; color: #93a4c3; }
.mg-hero__trust i { color: #8fb4ff; margin-right: 4px; }
@media (min-width: 992px) { .mg-hero__trust { justify-content: flex-start; } }

.mg-hero-card-wrap { position: relative; max-width: 520px; margin: 0 auto; }

.mg-hero-card {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 24px;
  padding: 22px;
  color: #e2e8f0;
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  overflow: hidden;
  container-type: inline-size;
}
@keyframes mg-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.mg-hero-card__eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #93a4c3; }
.mg-hero-card__title { font-weight: 700; color: #fff; font-size: 1.15rem; }
.mg-hero-card__foot { font-size: .78rem; color: #93a4c3; margin-top: 14px; }

.mg-live { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; color: #6ee7b7; background: rgba(16, 185, 129, .12); border: 1px solid rgba(16, 185, 129, .3); padding: .25rem .6rem; border-radius: 999px; }
.mg-live span { width: 6px; height: 6px; border-radius: 50%; background: #34d399; animation: mg-pulse 2s infinite; }

.mg-rate-list { display: grid; gap: 10px; }
.mg-rate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .06);
  transition: background-color .25s;
}
.mg-rate-row:hover { background: rgba(255, 255, 255, .1); }
.mg-rate-row__brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; color: #fff; font-size: .92rem; }
.mg-rate-row__logo { width: 34px; height: 34px; object-fit: contain; border-radius: 10px; background: #fff; padding: 4px; flex: 0 0 auto; }
.mg-rate-row__mono { width: 34px; height: 34px; border-radius: 10px; background: rgba(143, 180, 255, .2); color: #c7d7ff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; flex: 0 0 auto; }
.mg-rate-row__mono--crypto { background: rgba(245, 158, 11, .18); color: #fbbf24; font-size: 1.1rem; }
.mg-rate-row__nums { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: flex-end; }
.mg-rate-row__brand .text-truncate { min-width: 0; }

/* Narrow card: put the rates under the broker name instead of letting them push out */
@container (max-width: 430px) {
  .mg-rate-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .mg-rate-row__nums { justify-content: flex-start; flex-wrap: wrap; }
}

.mg-chip { font-size: .74rem; font-weight: 600; padding: .28rem .55rem; border-radius: 8px; white-space: nowrap; }
.mg-chip--buy { background: rgba(34, 197, 94, .15); color: #86efac; }
.mg-chip--sell { background: rgba(248, 113, 113, .15); color: #fca5a5; }

.mg-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: var(--mg-ink);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: var(--mg-shadow-lg);
  font-size: .82rem;
  line-height: 1.2;
}
.mg-float strong { display: block; font-size: .85rem; }
.mg-float small { color: var(--mg-muted); }
.mg-float__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #fff5dd; color: var(--mg-gold); font-size: 1rem; }
.mg-float__icon--green { background: #dcfce7; color: var(--mg-green); }
.mg-float { z-index: 2; pointer-events: none; }
.mg-float--a { left: -18px; bottom: -34px; }
.mg-float--b { right: -14px; top: -40px; }
.mg-hero-card-wrap { padding: 28px 0 22px; }
@media (max-width: 1199.98px) { .mg-float--b { display: none; } }

@media (max-width: 575.98px) {
  .mg-hero { padding: 56px 0 84px; }
  .mg-float--a { display: none; }
  .mg-float--b { display: none; }
  .mg-hero-card-wrap { padding: 0; }
}

/* ---------- Partners ---------- */
.mg-partners { padding: 34px 0; border-bottom: 1px solid var(--mg-line); background: #fff; }
.mg-partners__label { text-align: center; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mg-muted); margin-bottom: 18px; }
.mg-partners__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px 44px; }
.mg-partners__row img { height: 34px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .65; transition: filter .3s, opacity .3s, transform .3s var(--mg-ease); }
.mg-partners__row img:hover { filter: none; opacity: 1; transform: translateY(-2px); }
.mg-partners__crypto { font-weight: 700; color: #94a3b8; font-size: 1.05rem; display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Sections ---------- */
.mg-section { padding: 96px 0; position: relative; }
.mg-section--tint { background: var(--mg-tint); }
.mg-section--dark { background: linear-gradient(180deg, var(--mg-navy) 0%, var(--mg-navy-2) 100%); overflow: hidden; }
@media (max-width: 767.98px) { .mg-section { padding: 64px 0; } }

.mg-section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.mg-eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mg-primary); background: var(--mg-primary-50); padding: .4rem .9rem; border-radius: 999px; margin-bottom: 14px; }
.mg-eyebrow--light { color: #c7d7ff; background: rgba(143, 180, 255, .12); }
.mg-section-title { font-weight: 800; color: var(--mg-ink); font-size: clamp(1.7rem, 3.2vw, 2.5rem); letter-spacing: -.02em; line-height: 1.15; margin-bottom: 12px; }
.mg-section-lead { color: var(--mg-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ---------- Benefits ---------- */
.mg-benefit {
  height: 100%;
  background: #fff;
  border: 1px solid var(--mg-line);
  border-radius: var(--mg-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--mg-ease), box-shadow .35s var(--mg-ease);
}
.mg-benefit:hover { transform: translateY(-6px); box-shadow: var(--mg-shadow-lg); }
.mg-benefit__media { aspect-ratio: 16 / 8; overflow: hidden; }
.mg-benefit__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--mg-ease); }
.mg-benefit:hover .mg-benefit__media img { transform: scale(1.05); }
.mg-benefit__body { padding: 24px 26px 28px; position: relative; }
.mg-benefit__body h3 { font-size: 1.25rem; font-weight: 700; color: var(--mg-ink); margin: 14px 0 8px; }
.mg-benefit__body p { margin: 0; line-height: 1.65; }

.mg-icon-badge { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--mg-primary-50); color: var(--mg-primary); font-size: 1.25rem; margin-top: -48px; border: 4px solid #fff; box-sizing: content-box; }

/* ---------- Steps ---------- */
.mg-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; }
.mg-steps::before { content: ""; position: absolute; top: 44px; left: 12%; right: 12%; height: 2px; background: repeating-linear-gradient(90deg, #c7d7f5 0 8px, transparent 8px 16px); }
.mg-step { position: relative; text-align: center; background: #fff; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); padding: 30px 20px; transition: transform .35s var(--mg-ease), box-shadow .35s; }
.mg-step:hover { transform: translateY(-6px); box-shadow: var(--mg-shadow); }
.mg-step__num { position: absolute; top: 14px; right: 16px; font-weight: 800; font-size: .8rem; color: var(--mg-primary); background: var(--mg-primary-50); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.mg-step__icon { width: 64px; height: 64px; margin-bottom: 18px; }
.mg-step h4 { font-size: 1.12rem; font-weight: 700; color: var(--mg-ink); }
.mg-step p { margin: 0; font-size: .93rem; }
@media (max-width: 991.98px) { .mg-steps { grid-template-columns: repeat(2, 1fr); } .mg-steps::before { display: none; } }
@media (max-width: 479.98px) { .mg-steps { grid-template-columns: 1fr; } }

/* ---------- Rates ---------- */
.mg-rate-card { height: 100%; background: #fff; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); padding: 22px; transition: transform .35s var(--mg-ease), box-shadow .35s, border-color .35s; }
.mg-rate-card:hover { transform: translateY(-6px); box-shadow: var(--mg-shadow-lg); border-color: #cdd9f0; }
.mg-rate-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.mg-rate-card__head h5 { font-weight: 700; color: var(--mg-ink); font-size: 1.02rem; }
.mg-rate-card__logo { width: 52px; height: 52px; border-radius: 14px; background: var(--mg-tint); display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; font-weight: 800; color: var(--mg-primary); }
.mg-rate-card__logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.mg-rate-card__logo--crypto { background: #fff7e6; color: #f59e0b; font-size: 1.5rem; }
.mg-rate-card__nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mg-rate-card__num { border-radius: 14px; padding: 12px 14px; }
.mg-rate-card__num small { display: block; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.mg-rate-card__num strong { display: block; font-size: 1.25rem; color: var(--mg-ink); font-variant-numeric: tabular-nums; margin: 2px 0; }
.mg-rate-card__num span { font-size: .75rem; color: var(--mg-muted); }
.mg-rate-card__num--buy { background: #f0fdf4; }
.mg-rate-card__num--buy small { color: var(--mg-green); }
.mg-rate-card__num--sell { background: #fef2f2; }
.mg-rate-card__num--sell small { color: var(--mg-red); }

/* ---------- Leaderboard teaser ---------- */
.mg-mini-board { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 24px; padding: 18px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.mg-mini-board__head { display: flex; justify-content: space-between; align-items: center; color: #dbe6ff; font-weight: 600; padding: 4px 6px 14px; }
.mg-mini-board__row { display: grid; grid-template-columns: 34px 42px 1fr auto; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .05); margin-bottom: 8px; color: #fff; }
.is-visible .mg-mini-board__row { animation: mg-rise .7s var(--mg-ease) both; animation-delay: calc(var(--i) * 120ms + 200ms); }
@keyframes mg-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.mg-mini-board__avatar { width: 42px; height: 42px; border-radius: 50%; background: rgba(143, 180, 255, .18); color: #c7d7ff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.mg-mini-board__handle { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-mini-board__score { font-weight: 800; color: #8fb4ff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mg-mini-board__score small { font-weight: 500; color: #93a4c3; }
.mg-mini-board__empty { display: flex; gap: 14px; align-items: center; padding: 22px; color: #93a4c3; }
.mg-mini-board__empty i { font-size: 1.6rem; color: #8fb4ff; }

.mg-medal { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff; background: #334155; }
.mg-medal--1 { background: var(--mg-gold); box-shadow: 0 0 0 4px rgba(224, 168, 59, .2); }
.mg-medal--2 { background: var(--mg-silver); }
.mg-medal--3 { background: var(--mg-bronze); }

/* ---------- Services ---------- */
.mg-service { height: 100%; background: #fff; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); padding: 34px; transition: transform .35s var(--mg-ease), box-shadow .35s; }
.mg-service:hover { transform: translateY(-6px); box-shadow: var(--mg-shadow-lg); }
.mg-service__icon { width: 84px; height: 84px; margin-bottom: 24px; transition: transform .5s var(--mg-ease); }
.mg-service:hover .mg-service__icon { transform: rotate(-6deg) scale(1.06); }
.mg-service h3 { font-size: 1.25rem; font-weight: 700; color: var(--mg-ink); }
.mg-service p { margin: 0; line-height: 1.65; }

/* ---------- Testimonials ---------- */
.mg-testimonial { height: 100%; margin: 0; background: #fff; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); padding: 28px; display: flex; flex-direction: column; transition: transform .35s var(--mg-ease), box-shadow .35s; }
.mg-testimonial:hover { transform: translateY(-6px); box-shadow: var(--mg-shadow); }
.mg-testimonial__stars { color: #f59e0b; font-size: .9rem; margin-bottom: 14px; display: flex; gap: 2px; }
.mg-testimonial blockquote { flex: 1; color: var(--mg-body); line-height: 1.7; margin: 0 0 22px; }
.mg-testimonial figcaption { display: flex; align-items: center; gap: 12px; }
.mg-testimonial figcaption img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.mg-testimonial figcaption strong { display: block; color: var(--mg-ink); }
.mg-testimonial figcaption small { color: var(--mg-muted); }

/* ---------- FAQ ---------- */
.mg-faq .accordion-item { border: 1px solid var(--mg-line); border-radius: 16px !important; overflow: hidden; margin-bottom: 12px; transition: box-shadow .3s, border-color .3s; }
.mg-faq .accordion-item:has(.accordion-button:not(.collapsed)) { border-color: #cdd9f0; box-shadow: var(--mg-shadow); }
.mg-faq .accordion-button { font-weight: 600; color: var(--mg-ink); padding: 1.15rem 1.3rem; background: #fff; }
.mg-faq .accordion-button:not(.collapsed) { color: var(--mg-primary); background: #fff; box-shadow: none; }
.mg-faq .accordion-button::after { background-size: 1rem; transition: transform .35s var(--mg-ease); }
.mg-faq .accordion-body { padding: 0 1.3rem 1.3rem; line-height: 1.7; }

/* ---------- CTA ---------- */
.mg-cta { position: relative; overflow: hidden; text-align: center; border-radius: 28px; padding: 88px 24px; background: radial-gradient(800px 400px at 50% 0%, #2d5fb8 0%, transparent 70%), var(--mg-navy); color: #cbd5e1; }
.mg-cta h2 { color: #fff; font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -.02em; }
.mg-cta p { color: #aab8d0; margin: 12px auto 30px; max-width: 520px; }

/* ---------- Footer ---------- */
.mg-footer { background: #0a1222; color: #94a3b8; padding: 64px 0 24px; }
.mg-footer__muted { color: #94a3b8; max-width: 340px; line-height: 1.7; }
.mg-footer__title { color: #fff; font-weight: 700; font-size: .95rem; margin-bottom: 16px; }
.mg-footer__link { display: block; color: #94a3b8; text-decoration: none; padding: 5px 0; transition: color .2s, transform .2s; }
.mg-footer__link:hover { color: #fff; transform: translateX(3px); }
.mg-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .85rem; }
.mg-social { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: #e2e8f0; text-decoration: none; font-size: 1.1rem; transition: background-color .25s, transform .25s var(--mg-ease); }
.mg-social:hover { background: var(--mg-primary); color: #fff; transform: translateY(-3px); }

.mg-to-top { position: fixed; right: 18px; bottom: 18px; width: 46px; height: 46px; border-radius: 14px; background: var(--mg-primary); color: #fff; display: grid; place-items: center; text-decoration: none; box-shadow: 0 10px 24px rgba(41, 102, 203, .35); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s, transform .3s var(--mg-ease); z-index: 1020; }
.mg-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.mg-to-top:hover { color: #fff; background: var(--mg-primary-600); }

/* ---------- Page hero (privacy, terms, leaderboard, rules) ---------- */
.hero-section-privacy,
.mg-page-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(900px 420px at 70% -20%, #1c3b78 0%, transparent 60%), linear-gradient(180deg, var(--mg-navy) 0%, var(--mg-navy-2) 100%);
  min-height: 0;
  padding: 72px 0 !important;
}
.hero-section-privacy .geometric-overlay { display: none; }
.hero-section-privacy h1, .mg-page-hero h1 { font-weight: 800; letter-spacing: -.02em; font-size: clamp(2rem, 5vw, 3.2rem) !important; }
.text-light-purple { color: #c4b5fd; }
.content-section { color: var(--mg-body); line-height: 1.8; }
.content-section h1, .content-section h2, .content-section h3, .content-section h4 { color: var(--mg-ink); font-weight: 700; margin-top: 1.6rem; }

/* Keep the desktop navbar on one line; the install button only appears where there's room */
.mg-nav-link { white-space: nowrap; }
.mg-navbar .btn { white-space: nowrap; }
@media (max-width: 1199.98px) {
  .mg-navbar .navbar-collapse [data-pwa-install] { display: none !important; }
  .mg-nav-link { padding: .5rem .6rem !important; }
}
