html {
  height: 100%;
  width: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

:root {
  --jackpot-purple: #1a0b2e;
  --jackpot-purple-soft: #2a1247;
  --jackpot-gold: #ffc93c;
  --jackpot-gold-deep: #b87e0f;
  --jackpot-cream: #faf9f5;
  --jackpot-cream-warm: #fff8e6;
  --jackpot-text: #21152f;
  --jackpot-muted: #685a76;
  --jackpot-border: rgba(26, 11, 46, 0.14);
  --jackpot-shadow: 0 24px 70px rgba(26, 11, 46, 0.16);
}

.legal-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 201, 60, 0.18),
      transparent 34rem
    ),
    linear-gradient(
      180deg,
      var(--jackpot-cream-warm) 0%,
      var(--jackpot-cream) 42%,
      #f4efe5 100%
    );
  color: var(--jackpot-text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 1rem;
  line-height: 1.75;
}

.legal-shell {
  width: min(100% - 2rem, 1180px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.legal-header {
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border: 1px solid rgba(255, 201, 60, 0.28);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(26, 11, 46, 0.96), rgba(42, 18, 71, 0.94)),
    var(--jackpot-purple);
  box-shadow: var(--jackpot-shadow);
  color: #fffaf0;
  overflow: hidden;
  position: relative;
}

.legal-header::after {
  content: "";
  position: absolute;
  inset: auto -4rem -7rem auto;
  width: 16rem;
  height: 16rem;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(255, 201, 60, 0.24),
    transparent 68%
  );
  pointer-events: none;
}

.legal-header h1 {
  max-width: 840px;
  margin: 0.35rem 0 0;
  color: #ffffff;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.legal-header p {
  max-width: 760px;
  margin: 1rem 0 0;
  color: rgba(255, 250, 240, 0.84);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--jackpot-gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.legal-brand::before {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--jackpot-gold);
  box-shadow:
    0 0 0 0.28rem rgba(255, 201, 60, 0.16),
    0 0 24px rgba(255, 201, 60, 0.52);
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid var(--jackpot-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 42px rgba(26, 11, 46, 0.1);
  backdrop-filter: blur(14px);
  scrollbar-color: rgba(255, 201, 60, 0.85) rgba(26, 11, 46, 0.08);
  scrollbar-width: thin;
}

.legal-sidebar__title {
  margin: 0 0 0.75rem;
  color: var(--jackpot-purple);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.18rem 0;
  padding: 0.72rem 0.85rem;
  border-radius: 14px;
  color: var(--jackpot-muted);
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.legal-sidebar__link:hover,
.legal-sidebar__link:focus-visible {
  background: rgba(255, 201, 60, 0.16);
  color: var(--jackpot-purple);
  outline: none;
  transform: translateX(2px);
}

.legal-sidebar__link.is-active {
  background: linear-gradient(135deg, var(--jackpot-gold), #ffe08a);
  color: #241500;
  box-shadow: 0 10px 22px rgba(184, 126, 15, 0.24);
}

.legal-content {
  max-width: 820px;
  padding: clamp(1.35rem, 4vw, 2.75rem);
  border: 1px solid rgba(26, 11, 46, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--jackpot-shadow);
}

.legal-content h1,
.legal-content h2,
.legal-content h3 {
  color: var(--jackpot-purple);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.legal-content h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.legal-content h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.legal-content h3 {
  margin: 1.35rem 0 0.55rem;
  font-size: clamp(1.12rem, 2vw, 1.35rem);
}

.legal-content p,
.legal-content li {
  color: var(--jackpot-text);
}

.legal-content p,
.legal-content ul,
.legal-content ol {
  margin: 0.85rem 0 0;
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.35rem;
}

.legal-content a {
  color: #6d3b00;
  font-weight: 800;
  text-decoration-color: rgba(255, 201, 60, 0.85);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

.legal-content a:hover,
.legal-content a:focus-visible {
  color: var(--jackpot-purple);
}

.legal-section {
  padding: clamp(1.25rem, 3vw, 2rem) 0;
  border-top: 1px solid rgba(26, 11, 46, 0.11);
}

.legal-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.legal-section:last-child {
  padding-bottom: 0;
}

.legal-footer {
  margin-top: clamp(1.75rem, 4vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(26, 11, 46, 0.12);
  color: var(--jackpot-muted);
  font-size: 0.95rem;
  text-align: center;
}

@media (max-width: 900px) {
  .legal-shell {
    width: min(100% - 1.25rem, 760px);
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-sidebar {
    position: static;
    top: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem;
    border-radius: 18px;
  }

  .legal-sidebar__title {
    flex: 0 0 auto;
    margin: 0 0.25rem 0 0;
    white-space: nowrap;
  }

  .legal-sidebar__link {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
  }

  .legal-sidebar__link:hover,
  .legal-sidebar__link:focus-visible {
    transform: translateY(-1px);
  }

  .legal-content {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .legal-page {
    font-size: 0.98rem;
  }

  .legal-shell {
    width: min(100% - 1rem, 100%);
    padding: 1rem 0 2rem;
  }

  .legal-header,
  .legal-content {
    border-radius: 20px;
  }

  .legal-sidebar {
    align-items: stretch;
    flex-direction: column;
    overflow: visible;
  }

  .legal-sidebar__title {
    margin: 0 0 0.2rem;
  }

  .legal-sidebar__link {
    white-space: normal;
  }
}
