/* Document pages have their own quiet, readable surface. */
html:has(.legal-page) {
  color-scheme: dark;
  background: #151515;
  scroll-padding-top: 24px;
}

.legal-page {
  --paper: #151515;
  --ink: #f5f5f5;
  --muted: #d5d5d5;
  --line: #ffffff26;
  --body: 18px;
  --small: 15px;
  background: #151515;
  color: #f5f5f5;
  min-height: 100svh;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.legal-page .site-header {
  max-width: 1100px;
  padding: 24px 40px;
  gap: 16px;
}

.legal-page .brand {
  min-height: 44px;
  color: #f5f5f5;
}

.legal-page .brand img {
  width: 42px;
  flex: 0 0 42px;
}

.legal-page .site-header .button {
  min-height: 48px;
  padding: 12px 18px;
  gap: 12px;
  background: #252525;
  color: #fff;
  border: 1px solid #ffffff24;
  box-shadow: none;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.4;
  transform: none;
}

.legal-page .site-header .button .icon {
  width: 17px;
  height: 17px;
}

.legal-page .legal,
.legal-page .site-footer {
  max-width: 840px;
  padding-inline: 40px;
}

.legal-page .legal {
  padding-top: 64px;
  padding-bottom: 80px;
}

.legal-page .legal h1 {
  margin-bottom: 32px;
  color: #fff;
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.045em;
  overflow-wrap: break-word;
}

.legal-page .legal h2 {
  margin: 40px 0 12px;
  color: #fff;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.015em;
}

.legal-page .legal p,
.legal-page .legal li {
  color: #e1e1e1;
  font-size: var(--body);
  line-height: 1.75;
  letter-spacing: 0;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.legal-page .legal p {
  margin-bottom: 22px;
}

.legal-page .legal ul {
  margin-block: 16px 28px;
  padding-left: 22px;
  color: #e1e1e1;
}

.legal-page .legal li + li {
  margin-top: 10px;
}

.legal-page .legal a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #ffffff80;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.legal-page .legal .legal-link-row > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 6px;
}

.legal-page .legal-language-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: -8px 0 12px;
  color: #929292;
}

.legal-page .legal-language-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: var(--small);
}

.legal-page .legal-language-nav a:first-child {
  margin-left: -12px;
}

.legal-page .legal-section {
  scroll-margin-top: 24px;
}

.legal-page .legal-section + .legal-section {
  border-top: 1px solid #ffffff26;
  padding-top: 24px;
  margin-top: 56px;
}

.legal-page .site-footer {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 20px;
  padding-top: 32px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  color: #f5f5f5;
}

.legal-page .footer-brand {
  min-height: 44px;
  width: 100%;
  gap: 14px;
}

.legal-page .footer-brand span,
.legal-page .site-footer > p {
  color: #b8b8b8;
  font-size: var(--small);
}

.legal-page .site-footer > div {
  gap: 4px 24px;
}

.legal-page .site-footer > div a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 10px;
  color: #f5f5f5;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: #ffffff60;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.legal-page .site-footer > p {
  padding-top: 24px;
  border-top: 1px solid #ffffff26;
  line-height: 1.6;
}

.legal-page a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
  border-radius: 4px;
}

@media (hover: hover) {
  .legal-page .site-header .button:hover,
  .legal-page .legal-language-nav a:hover {
    background: #303030;
    box-shadow: none;
    transform: none;
  }
  .legal-page .legal a:hover,
  .legal-page .site-footer a:hover {
    text-decoration-color: #fff;
  }
}

@media (max-width: 700px) {
  .legal-page {
    --body: 17px;
  }
  .legal-page .site-header {
    padding: max(16px, env(safe-area-inset-top)) 22px 16px;
  }
  .legal-page .brand span {
    display: none;
  }
  .legal-page .legal,
  .legal-page .site-footer {
    padding-inline: max(22px, env(safe-area-inset-left));
  }
  .legal-page .legal {
    padding-top: 40px;
    padding-bottom: 44px;
  }
  .legal-page .legal h1 {
    font-size: 36px;
    margin-bottom: 28px;
  }
  .legal-page .legal h2 {
    font-size: 21px;
    margin-top: 34px;
  }
  .legal-page .site-footer > div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
  }
  .legal-page .site-footer > div a {
    padding-block: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.legal-page) {
    scroll-behavior: auto;
  }
}
