:root {
  color-scheme: light;
  --legal-ink: #07143a;
  --legal-copy: #465a70;
  --legal-muted: #6f8194;
  --legal-brand: #007f77;
  --legal-line: #d6e1ec;
  --legal-bg: #edf2f3;
}

* {
  box-sizing: border-box;
}

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

body {
  height: 100dvh;
  overflow: hidden;
  color: var(--legal-ink);
  background: var(--legal-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.legal-shell {
  width: min(100vw, 56.25dvh);
  height: 100dvh;
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  container-type: inline-size;
  background: #fff;
}

.legal-header {
  min-height: 27cqw;
  padding: calc(4.5cqw + env(safe-area-inset-top)) 4.5cqw 4.3cqw;
  border-bottom: 1px solid var(--legal-line);
  display: grid;
  grid-template-columns: 10.5cqw minmax(0, 1fr);
  gap: 3.2cqw;
  align-items: center;
  background:
    radial-gradient(circle at 92% 0%, rgba(24, 147, 139, .11), transparent 34cqw),
    #fff;
}

.legal-back {
  width: 10.5cqw;
  height: 10.5cqw;
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--legal-line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--legal-ink);
  background: #f8fbfb;
  font-size: clamp(24px, 6cqw, 36px);
  line-height: 1;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.legal-back:hover,
.legal-back:focus-visible {
  border-color: var(--legal-brand);
  background: #eef8f6;
  outline: 3px solid rgba(0, 127, 119, .14);
  outline-offset: 2px;
}

.legal-back:active {
  transform: scale(.97);
}

.legal-kicker {
  margin: 0 0 .8cqw;
  color: var(--legal-brand);
  font-size: clamp(10px, 2.65cqw, 16px);
  font-weight: 800;
  letter-spacing: .08em;
}

.legal-header h1 {
  margin: 0;
  font-size: clamp(21px, 5.3cqw, 32px);
  line-height: 1.18;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.legal-updated {
  margin: 1.4cqw 0 0;
  color: var(--legal-muted);
  font-size: clamp(11px, 2.7cqw, 16px);
  line-height: 1.4;
}

.legal-document {
  min-height: 0;
  margin: 0;
  max-width: none;
  padding: 4.5cqw 4.5cqw calc(7cqw + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  line-height: 1.8;
  scroll-behavior: smooth;
}

.card {
  border: 1px solid var(--legal-line);
  border-radius: 3cqw;
  padding: 4.5cqw;
  background: #fff;
  box-shadow: 0 2cqw 5cqw rgba(13, 35, 50, .055);
}

.card > :first-child {
  margin-top: 0;
}

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

h2 {
  margin: 6cqw 0 2cqw;
  padding-left: 2.8cqw;
  border-left: .9cqw solid var(--legal-brand);
  color: var(--legal-ink);
  font-size: clamp(17px, 4.2cqw, 24px);
  line-height: 1.35;
}

p,
li {
  color: var(--legal-copy);
  font-size: clamp(14px, 3.45cqw, 19px);
  line-height: 1.82;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

p {
  margin: 0 0 3.2cqw;
}

ul,
ol {
  margin: 2cqw 0 3.5cqw;
  padding-left: 6cqw;
}

li + li {
  margin-top: 1.5cqw;
}

@media (min-aspect-ratio: 9 / 16) and (min-width: 700px) {
  .legal-shell {
    box-shadow: 0 0 5.5cqw rgba(22, 32, 42, .14);
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .legal-header {
    min-height: 22cqw;
    padding-block: 3cqw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-back {
    transition: none;
  }
}
