:root {
  color-scheme: light;
  --bg: #f5f4ef;
  --fg: #0c0a09;
  --muted: #44403c;
  --selection-bg: #000000;
  --selection-fg: #ffffff;
  --content-max: 48rem;
  --language-bottom: 12px;
  --language-gap: 16px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 112px 12px 88px;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 monospace;
}

body.page-zh-cn {
  font-family: "Noto Sans SC", monospace;
}

body.page-zh-tw {
  font-family: "Chiron Hei HK", monospace;
}

body.page-ko {
  font-family: "Orbit", monospace;
}

main {
  max-width: var(--content-max);
  margin: auto;
}

.logo {
  display: block;
  width: auto;
  height: auto;
  margin: 0 auto 48px;
}

.language-switcher {
  position: fixed;
  left: 50%;
  bottom: var(--language-bottom);
  transform: translateX(-50%);
  z-index: 9999;
  width: min(calc(100vw - 24px), var(--content-max));
  margin: 0;
  padding: 0;
  font: inherit;
  color: var(--muted);
  line-height: 1.5;
  text-align: left;
  background: transparent;
}

.language-switcher a {
  font-family: inherit;
  color: inherit;
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-fg);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 600;
}

p {
  margin-top: 12px;
  color: var(--muted);
}

i {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  opacity: 0.8;
}

a {
  color: inherit;
  text-decoration: underline;
  opacity: 0.85;
}

a:hover {
  opacity: 1;
  text-decoration-thickness: 2px;
}

@media (max-width: 640px) {
  body {
    padding-top: 96px;
    padding-bottom: 84px;
  }

  h1 {
    font-size: 16px;
  }

  .language-switcher {
    font-size: 14px;
  }

  h2,
  p,
  i {
    font-size: 14px;
  }
}
