:root {
  color-scheme: dark;
  --bg: #07080c;
  --panel: #11131a;
  --text: #f8fafc;
  --muted: #aab0bd;
  --soft: #d4d8e1;
  --line: rgba(255, 255, 255, 0.12);
  --red: #e11d48;
  --gold: #f6c453;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(225, 29, 72, 0.18), transparent 30rem),
    linear-gradient(180deg, #0a0b11 0%, var(--bg) 52%, #090a0f 100%);
  color: var(--text);
}

a {
  color: inherit;
}

.legal-main {
  width: min(860px, calc(100% - 32px));
  margin: 28px auto 72px;
}

.language-nav {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: flex;
  width: fit-content;
  margin: 0 0 28px auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  background: rgba(17, 19, 26, 0.9);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.language-button {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
}

.language-button:hover,
.language-button:focus-visible,
.language-button.is-active {
  background: rgba(246, 196, 83, 0.13);
  color: white;
}

.language-button:focus-visible {
  outline: 2px solid rgba(246, 196, 83, 0.72);
  outline-offset: 2px;
}

.legal-language {
  scroll-margin-top: 76px;
}

.language-label {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-hero {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
}

.legal-meta {
  display: grid;
  gap: 7px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-meta p {
  margin: 0;
}

.legal-document {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 19, 26, 0.72);
  padding: clamp(22px, 5vw, 48px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.legal-section + .legal-section {
  margin-top: 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 34px;
}

.legal-section h2 {
  margin-bottom: 18px;
  color: white;
  font-size: clamp(1.2rem, 3vw, 1.48rem);
  line-height: 1.35;
}

.legal-section h3 {
  margin: 20px 0 9px;
  color: white;
  font-size: 1.02rem;
  line-height: 1.55;
}

.legal-section p {
  margin: 0;
  color: var(--soft);
  font-size: 1rem;
  line-height: 1.9;
}

.legal-section p + p {
  margin-top: 13px;
}

.legal-section h3 + p {
  margin-top: 0;
}

.legal-section a,
.legal-meta a {
  color: var(--gold);
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}

.document-end {
  margin-top: 40px !important;
  color: var(--muted) !important;
  text-align: center;
}

.legal-language[lang="en"] .legal-section p {
  line-height: 1.78;
}

@media (max-width: 600px) {
  .legal-main {
    margin-top: 14px;
    margin-bottom: 48px;
  }

  .language-nav {
    top: 8px;
    margin-bottom: 22px;
  }

  .legal-document {
    padding: 22px 18px;
  }

  .legal-section + .legal-section {
    margin-top: 30px;
    padding-top: 28px;
  }

  .legal-section p {
    font-size: 0.96rem;
    line-height: 1.82;
  }

}
