:root {
  color-scheme: light dark;
  --legal-background: #ffffff;
  --legal-text-primary: #000000;
  --legal-text-secondary: #3c3c43;
  --legal-link: #007aff;
  --legal-divider: rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --legal-background: #1c1c1e;
    --legal-text-primary: #ffffff;
    --legal-text-secondary: #d1d1d6;
    --legal-link: #0a84ff;
    --legal-divider: rgba(255, 255, 255, 0.14);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--legal-background);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--legal-background);
  color: var(--legal-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

.legal-document {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px 20px calc(48px + env(safe-area-inset-bottom));
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1 {
  margin-bottom: 28px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0;
}

h2 {
  margin: 30px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--legal-divider);
  font-size: 20px;
  font-weight: 650;
  line-height: 1.32;
  letter-spacing: 0;
}

h3 {
  margin: 22px 0 10px;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.38;
  letter-spacing: 0;
}

p {
  margin-bottom: 14px;
  color: var(--legal-text-secondary);
}

ul {
  margin-bottom: 16px;
  padding-left: 1.35em;
  color: var(--legal-text-secondary);
}

li {
  margin-bottom: 8px;
  padding-left: 0.1em;
}

li:last-child {
  margin-bottom: 0;
}

a {
  color: var(--legal-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (min-width: 768px) {
  .legal-document {
    padding: 40px 32px 72px;
  }

  h1 {
    font-size: 32px;
  }
}
