:root {
  --surface-page: #faf8f2;
  --text-sun: #1a1a1a;
  --text-earth: #808080;
  --system-link: #007aff;
  --control-border: #d8d5cd;
  --control-active: #1a1a1a;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface-page);
}

body {
  margin: 0;
  color: var(--text-sun);
  background: var(--surface-page);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 24px;
  text-rendering: optimizeLegibility;
}

.document {
  width: min(100%, 640px);
  margin: 0 auto;
  padding: 24px 24px 96px;
}

.document-header {
  margin-bottom: 36px;
}

.language-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 3px 10px;
  color: var(--text-sun);
  border: 1px solid var(--control-border);
  border-radius: 999px;
  text-decoration: none;
}

.language-switcher a[aria-current="page"] {
  color: var(--surface-page);
  background: var(--control-active);
  border-color: var(--control-active);
}

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

h1 {
  font-size: 34px;
  font-weight: 700;
  line-height: 48px;
  letter-spacing: -0.02em;
}

.updated-at {
  margin-top: 6px;
  color: var(--text-earth);
}

.section + .section {
  margin-top: 24px;
}

h2 {
  font-size: 22px;
  font-weight: 650;
  line-height: 36px;
  letter-spacing: -0.01em;
}

h2 + p,
h2 + ul,
h2 + ol {
  margin-top: 18px;
}

p + p,
p + ul,
p + ol,
ul + p,
ol + p {
  margin-top: 18px;
}

h3 {
  margin-top: 18px;
  font-size: 17px;
  font-weight: 600;
  line-height: 30px;
}

h3 + p,
h3 + ul,
h3 + ol {
  margin-top: 6px;
}

ul,
ol {
  padding-left: 1.4em;
}

li + li {
  margin-top: 6px;
}

a {
  color: var(--system-link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:focus-visible {
  outline: 2px solid var(--text-sun);
  outline-offset: 3px;
}

.related-pages {
  padding-bottom: 24px;
}

.related-pages a {
  display: block;
  width: fit-content;
}

.related-pages a + a {
  margin-top: 18px;
}

.language-redirect {
  padding-top: 96px;
}

.language-redirect .language-switcher {
  margin-top: 24px;
}

@media (min-width: 768px) {
  .document {
    padding-top: 48px;
  }
}
