:root {
  --sg-bg: #f8fafc;
  --sg-surface: rgba(255, 255, 255, 0.94);
  --sg-surface-strong: #ffffff;
  --sg-border: rgba(148, 163, 184, 0.22);
  --sg-border-strong: rgba(100, 116, 139, 0.26);
  --sg-text: #0f172a;
  --sg-text-muted: #475569;
  --sg-text-soft: #64748b;
  --sg-brand: #0f172a;
  --sg-brand-2: #1e293b;
  --sg-accent: #0d9488;
  --sg-accent-strong: #0f766e;
  --sg-accent-soft: #ccfbf1;
  --sg-alert: #ef4444;
  --sg-radius-lg: 20px;
  --sg-radius-md: 14px;
  --sg-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  --sg-shadow-soft: 0 10px 22px rgba(15, 23, 42, 0.05);
}

body.sg-site {
  background: var(--sg-bg);
  color: var(--sg-text);
}

.sg-site-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #172554 52%, #312e81 100%);
  color: #fff;
}

.sg-site-header::after {
  content: "";
  position: absolute;
  inset: auto -10% -120px auto;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.14) 0%, rgba(45, 212, 191, 0) 72%);
  pointer-events: none;
}

.sg-site-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.sg-site-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
}

.sg-site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sg-site-brand img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: contain;
}

.sg-site-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.sg-site-brand-copy strong {
  font-size: 17px;
}

.sg-site-brand-copy span {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.78);
  font-weight: 600;
}

.sg-site-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sg-site-nav {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  color: var(--sg-text);
  box-shadow: var(--sg-shadow);
  position: relative;
  z-index: 2;
}

.sg-site-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.sg-site-nav-link,
.sg-site-nav-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1;
  font-weight: 800;
  color: var(--sg-text);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.sg-site-nav-link:hover,
.sg-site-nav-button:hover {
  background: rgba(148, 163, 184, 0.14);
}

.sg-site-nav-link.is-active,
.sg-site-nav-button.is-active {
  background: var(--sg-brand);
  color: #fff;
}

.sg-site-nav-link.is-accent {
  color: var(--sg-alert);
}

.sg-site-nav-link.is-accent:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

.sg-site-nav-button.is-accent {
  color: var(--sg-alert);
}

.sg-site-nav-button.is-accent:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

.nav-dropdown:hover > .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 6px;
}

.sg-site-auth {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
  min-width: 180px;
}

.auth-area.sg-site-auth .auth-login,
.auth-area.sg-site-auth .auth-logout,
.auth-area.sg-site-auth .auth-referral {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.auth-area.sg-site-auth .auth-login,
.auth-area.sg-site-auth .auth-logout {
  background: var(--sg-brand);
  color: #fff;
}

.auth-area.sg-site-auth .auth-referral {
  background: #4f46e5;
  color: #fff;
}

.auth-area.sg-site-auth .auth-email {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  color: var(--sg-text-muted);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
}

.auth-area.sg-site-auth .auth-points {
  color: #4f46e5;
  font-size: 11px;
  font-weight: 800;
}

.sg-page-hero {
  margin-top: 22px;
  padding: 8px 0 26px;
  display: grid;
  gap: 20px;
  align-items: center;
}

.sg-page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ccfbf1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.sg-page-title {
  margin: 10px 0 0;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.sg-page-desc {
  margin-top: 14px;
  max-width: 680px;
  color: rgba(226, 232, 240, 0.84);
  font-size: 16px;
  line-height: 1.7;
}

.sg-main-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 0;
}

.sg-section {
  margin-top: 28px;
}

.sg-surface {
  background: var(--sg-surface);
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius-lg);
  box-shadow: var(--sg-shadow-soft);
}

.sg-surface-strong {
  background: var(--sg-surface-strong);
  border: 1px solid var(--sg-border-strong);
  border-radius: var(--sg-radius-lg);
  box-shadow: var(--sg-shadow);
}

.sg-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.sg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sg-accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sg-section-title {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-weight: 900;
  color: var(--sg-text);
}

.sg-section-desc {
  margin: 8px 0 0;
  color: var(--sg-text-muted);
  line-height: 1.7;
}

.sg-shell-footer {
  margin-top: 52px;
  padding: 36px 0 44px;
  background: #0f172a;
  color: #cbd5e1;
}

.sg-shell-footer a {
  color: #bfdbfe;
}

.sg-shell-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  gap: 14px;
}

.sg-shell-footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sg-shell-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
}

.sg-shell-footer-brand img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.sg-shell-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 13px;
  color: #94a3b8;
}

@media (min-width: 768px) {
  .sg-site-nav {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
  }

  .sg-page-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  }
}

@media (max-width: 767px) {
  .sg-site-shell,
  .sg-main-shell,
  .sg-shell-footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .sg-site-nav {
    border-radius: 20px;
    padding: 14px;
  }

  .sg-site-auth {
    width: 100%;
    align-items: stretch;
    min-width: 0;
  }

  .auth-area.sg-site-auth .auth-email {
    align-items: flex-start;
    text-align: left;
  }
}
