:root {
  color-scheme: only light;
  --content-width: 896px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: #eeeef1;
  color: #111111;
  font-family: "Montserrat", sans-serif;
}

.legal-shell {
  width: min(100%, var(--content-width));
  min-height: 100vh;
  margin: 0 auto;
  background: #f3f3f5;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding: 16px 32px;
  background: #ffffff;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: #111111;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
}

.legal-back svg {
  flex: 0 0 auto;
}

.legal-logo {
  display: block;
  width: 104px;
  height: auto;
}

.legal-main {
  padding: 24px 24px 48px;
}

.legal-content {
  padding: 40px;
  border-radius: 16px;
  background: #ffffff;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
}

.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4,
.legal-content h5,
.legal-content h6 {
  margin: 32px 0 16px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.legal-content h1 {
  margin-top: 0;
  font-size: 20px;
}

.legal-content p {
  margin: 0 0 16px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 16px;
  padding-left: 28px;
}

.legal-content li + li {
  margin-top: 6px;
}

.legal-content a {
  color: #6f3fc3;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content > :last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .legal-header {
    min-height: 72px;
    padding: 12px 16px;
  }

  .legal-back {
    font-size: 14px;
  }

  .legal-logo {
    width: 86px;
  }

  .legal-main {
    padding: 12px 12px 32px;
  }

  .legal-content {
    padding: 24px 18px;
    border-radius: 12px;
  }
}
