:root {
  --legal-page-width: min(1180px, calc(100vw - 32px));
  --legal-card-radius: 30px;
  --legal-border: rgba(191, 212, 255, 0.18);
  --legal-panel: rgba(7, 12, 24, 0.82);
  --legal-panel-strong: rgba(11, 18, 34, 0.9);
  --legal-copy: rgba(235, 242, 255, 0.92);
  --legal-copy-muted: rgba(206, 219, 246, 0.76);
  --legal-heading: #f7fbff;
  --legal-accent-start: #6be0ff;
  --legal-accent-end: #ffd07a;
  --legal-shadow: 0 28px 78px rgba(0, 0, 0, 0.34);
}

html,
body {
  min-height: 100%;
}

* {
  box-sizing: border-box;
}

body.legal-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at top left, rgba(39, 92, 182, 0.32), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 174, 76, 0.18), transparent 26%),
    linear-gradient(180deg, #071120 0%, #091423 48%, #04070f 100%);
  color: var(--legal-copy);
  font-family: "Inter", sans-serif;
  overflow-x: clip;
}

.menu-shell {
  position: fixed;
  z-index: 16;
}

.menu-toggle {
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(6, 13, 29, 0.76);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.menu-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(150, 197, 255, 0.42);
}

.menu-toggle-lines {
  width: 22px;
  display: grid;
  gap: 5px;
}

.menu-toggle-lines span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: #d8e4fb;
  transition: transform 220ms ease, opacity 220ms ease;
}

.menu-shell.is-open .menu-toggle-lines span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-shell.is-open .menu-toggle-lines span:nth-child(2) {
  opacity: 0;
}

.menu-shell.is-open .menu-toggle-lines span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 16;
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(6, 13, 29, 0.82);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
}

.menu-shell.is-open .site-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-radius: 999px;
  color: #c4d2f2;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 200ms ease, transform 200ms ease, background-color 200ms ease;
}

.menu-link:hover {
  color: #f4f8ff;
  transform: translateX(2px);
}

.menu-link.is-active {
  color: #05121d;
  background: linear-gradient(135deg, #84f3de, #96c5ff);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lang-switcher {
  position: fixed;
  z-index: 16;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(6, 13, 29, 0.76);
  backdrop-filter: blur(8px);
}

.lang-btn {
  border: 0;
  border-radius: 999px;
  color: #c4d2f2;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, transform 200ms ease;
}

.lang-btn:hover {
  color: #f4f8ff;
  transform: translateY(-1px);
}

.lang-btn.is-active {
  color: #05121d;
  background: linear-gradient(135deg, #84f3de, #96c5ff);
}

.legal-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 16%, rgba(107, 224, 255, 0.12), transparent 22%),
    radial-gradient(circle at 84% 10%, rgba(255, 208, 122, 0.1), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24%);
}

.legal-main {
  position: relative;
  z-index: 1;
  padding: max(calc(var(--chrome-top) + 78px), 118px) 16px 64px;
}

.legal-shell {
  width: var(--legal-page-width);
  margin: 0 auto;
  display: grid;
  gap: 26px;
}

.legal-hero {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--legal-border);
  border-radius: var(--legal-card-radius);
  background:
    linear-gradient(132deg, rgba(24, 50, 102, 0.4), rgba(12, 18, 34, 0.14) 46%, rgba(70, 32, 20, 0.2) 100%),
    rgba(7, 12, 24, 0.86);
  box-shadow: var(--legal-shadow);
  backdrop-filter: blur(14px);
}

.legal-kicker,
.legal-meta-label,
.legal-index-title,
.legal-section-eyebrow {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 223, 164, 0.92);
}

.legal-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--legal-heading);
}

.legal-intro {
  margin: 0;
  max-width: 760px;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  color: var(--legal-copy-muted);
}

.legal-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.legal-meta-card {
  padding: 18px 18px 16px;
  border: 1px solid rgba(191, 212, 255, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

.legal-meta-value {
  margin: 8px 0 0;
  color: var(--legal-heading);
  font-size: 1rem;
  line-height: 1.55;
}

.legal-meta-value a {
  color: inherit;
  text-decoration-color: rgba(107, 224, 255, 0.42);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.legal-grid {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.legal-index {
  position: sticky;
  top: max(calc(var(--chrome-top) + 74px), 106px);
  display: grid;
  gap: 14px;
  padding: 22px 18px;
  border: 1px solid var(--legal-border);
  border-radius: 24px;
  background: var(--legal-panel-strong);
  box-shadow: var(--legal-shadow);
}

.legal-index-links {
  display: grid;
  gap: 10px;
}

.legal-index-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  color: var(--legal-copy);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  line-height: 1.45;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.legal-index-link:hover,
.legal-index-link:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.07);
}

.legal-document {
  display: grid;
  gap: 18px;
}

.legal-section {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--legal-border);
  border-radius: 26px;
  background:
    linear-gradient(144deg, rgba(22, 38, 80, 0.26), rgba(10, 16, 30, 0.06) 48%, rgba(48, 24, 30, 0.16) 100%),
    var(--legal-panel);
  box-shadow: var(--legal-shadow);
}

.legal-section h2 {
  margin: 10px 0 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.08;
  color: var(--legal-heading);
}

.legal-section p,
.legal-section li {
  margin: 0;
  font-size: clamp(0.98rem, 1.24vw, 1.04rem);
  line-height: 1.72;
  color: var(--legal-copy);
}

.legal-section p + p,
.legal-section p + ul,
.legal-section ul + p,
.legal-section ul + ul {
  margin-top: 14px;
}

.legal-section ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 10px;
}

.legal-section a {
  color: #b5efff;
  text-decoration-color: rgba(181, 239, 255, 0.42);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.legal-note {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--legal-copy-muted);
}

.legal-page .site-footer {
  position: relative;
  z-index: 1;
  width: var(--legal-page-width);
  margin: 0 auto;
  padding: 0 0 max(22px, env(safe-area-inset-bottom));
}

.legal-page .site-disclaimer {
  margin: 0;
  text-align: center;
  font-size: clamp(0.76rem, 1vw, 0.9rem);
  line-height: 1.55;
  color: rgba(219, 229, 248, 0.76);
}

@media (max-width: 1024px) {
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .legal-index {
    position: static;
  }
}

@media (max-width: 767px) {
  .legal-main {
    padding-top: max(calc(var(--chrome-top) + 68px), 104px);
    padding-bottom: 52px;
  }

  .legal-shell {
    width: min(calc(100vw - 20px), 100%);
    gap: 18px;
  }

  .legal-hero {
    padding: 22px 18px;
    border-radius: 24px;
  }

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

  .legal-index,
  .legal-section {
    border-radius: 22px;
  }

  .legal-page .site-footer {
    width: min(calc(100% - 20px), 100%);
  }
}

@media (hover: none) and (pointer: coarse) {
  .menu-toggle:hover,
  .menu-link:hover,
  .lang-btn:hover,
  .legal-index-link:hover,
  .site-legal-link:hover {
    transform: none;
  }
}
