:root {
  --paper: #f8f6fb;
  --ink: #17151b;
  --muted: #746e7a;
  --purple: #7554f5;
  --line: rgba(31, 26, 39, 0.11);
  --font-cn: "Noto Sans SC", sans-serif;
  --font-en: "DM Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 3%, rgba(135, 91, 244, 0.09), transparent 22%),
    var(--paper);
  font-family: var(--font-cn);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.legal-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  width: 100%;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(28px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(248, 246, 251, 0.86);
  backdrop-filter: blur(18px);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 19px/1 var(--font-en);
}

.legal-brand svg {
  width: 34px;
  height: 34px;
}

.legal-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.legal-home {
  color: #5f5966;
  font-size: 12px;
}

.legal-language {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.7);
}

.legal-language button {
  min-width: 42px;
  height: 30px;
  padding: 0 11px;
  color: #827b88;
  border: 0;
  border-radius: 99px;
  background: transparent;
  cursor: pointer;
  font: 500 10px/1 var(--font-en);
}

.legal-language button.active {
  color: white;
  background: var(--ink);
}

.legal-hero {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 82px 0 55px;
  border-bottom: 1px solid var(--line);
}

.legal-kicker {
  color: #785ec0;
  font: 500 10px/1 var(--font-en);
  letter-spacing: 0.16em;
}

.legal-hero h1 {
  margin: 24px 0 19px;
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.055em;
}

.legal-summary {
  max-width: 670px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.legal-layout {
  display: grid;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  grid-template-columns: 210px minmax(0, 760px);
  gap: 90px;
  padding: 64px 0 110px;
}

.legal-aside {
  align-self: start;
  position: sticky;
  top: 128px;
}

.legal-aside span {
  display: block;
  margin-bottom: 13px;
  color: #a09aa5;
  font: 500 9px/1 var(--font-en);
  letter-spacing: 0.14em;
}

.legal-aside p {
  margin: 0;
  color: #625c68;
  font-size: 12px;
  line-height: 1.8;
}

.legal-aside a {
  display: inline-flex;
  margin-top: 25px;
  gap: 18px;
  padding-bottom: 7px;
  color: var(--purple);
  border-bottom: 1px solid rgba(117, 84, 245, 0.32);
  font-size: 11px;
}

.legal-document {
  min-width: 0;
}

.legal-content {
  margin: 0;
  color: #3c3741;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-cn);
  font-size: 14px;
  line-height: 2.05;
}

html[lang="en"] .legal-content {
  font-family: var(--font-en);
  font-size: 14px;
  line-height: 1.9;
}

.legal-loading {
  color: var(--muted);
}

.legal-footer {
  color: #8b8490;
  background: #151319;
}

.legal-footer-inner {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  min-height: 94px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  font-size: 10px;
}

.legal-footer a:hover {
  color: white;
}

@media (max-width: 760px) {
  .legal-header {
    min-height: 70px;
    padding: 0 20px;
  }

  .legal-home {
    display: none;
  }

  .legal-hero,
  .legal-layout,
  .legal-footer-inner {
    width: calc(100% - 40px);
  }

  .legal-hero {
    padding: 55px 0 40px;
  }

  .legal-layout {
    display: block;
    padding: 38px 0 75px;
  }

  .legal-aside {
    position: static;
    margin-bottom: 38px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
  }

  .legal-content,
  html[lang="en"] .legal-content {
    font-size: 13px;
  }

  .legal-footer-inner {
    min-height: 120px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
  }
}
