:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #22201e;
  background: #faf9f7;
  line-height: 1.65;
}

body {
  box-sizing: border-box;
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2.5rem) clamp(1rem, 5vw, 3rem);
  overflow-wrap: break-word;
}

article[lang="zh-Hans"] {
  display: none;
}

#zh:target {
  display: block;
}

#zh:target ~ #en {
  display: none;
}

.page-nav,
.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
}

.page-nav {
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #dedbd6;
}

.brand {
  color: inherit;
  font-weight: 700;
}

.language-switch {
  display: inline-flex;
  margin-inline-start: auto;
  border: 1px solid #dedbd6;
  border-radius: 0.5rem;
  white-space: nowrap;
}

.language-switch a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.75rem;
  text-decoration: none;
}

.language-switch a:first-child {
  border-radius: 0.45rem 0 0 0.45rem;
}

.language-switch a + a {
  border-inline-start: 1px solid #dedbd6;
  border-radius: 0 0.45rem 0.45rem 0;
}

.language-switch a[aria-current="true"] {
  color: #fff;
  background: #8d390c;
}

.language-switch a:hover {
  text-decoration: underline;
}

.language-switch a:focus-visible {
  outline-color: #8d390c;
}

h1,
h2 {
  line-height: 1.3;
}

h1 {
  margin: 1.75rem 0 0.25rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
}

h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.25rem;
}

p,
ul {
  margin: 0.5rem 0 1rem;
}

ul {
  padding-inline-start: 1.5rem;
}

li + li {
  margin-top: 0.5rem;
}

a {
  color: #8d390c;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.updated,
footer {
  color: #58534d;
  font-size: 0.9375rem;
}

.updated {
  margin-bottom: 1.5rem;
}

footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid #dedbd6;
}
