:root {
  --bg: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --rule: #e3e3e6;
  --link: #0a58ca;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416;
    --text: #e8e8ea;
    --muted: #9a9aa1;
    --rule: #2c2c31;
    --link: #7fb2ff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei",
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

html[lang|="zh"] body {
  line-height: 1.8;
}

.top,
main {
  max-width: 44rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.brand {
  font-weight: 600;
  letter-spacing: 0.08em;
}

.lang {
  display: flex;
  gap: 0.875rem;
}

.lang a {
  color: var(--muted);
  text-decoration: none;
}

.lang a:hover,
.lang a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.lang .current {
  color: var(--text);
  font-weight: 600;
}

main {
  padding-top: 2.25rem;
  padding-bottom: 4rem;
}

article {
  max-width: 68ch;
}

h1 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h2 {
  margin: 2.25rem 0 0.625rem;
  font-size: 1.1875rem;
  line-height: 1.35;
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.375rem;
}

li {
  margin: 0 0 0.5rem;
  padding-left: 0.125rem;
}

li::marker {
  color: var(--muted);
}

strong {
  font-weight: 600;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  overflow-wrap: anywhere;
}

.meta {
  margin: 0 0 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.meta p {
  margin: 0 0 0.25rem;
  overflow-wrap: anywhere;
}

.meta .k {
  color: var(--muted);
}

@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }

  .top,
  main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  main {
    padding-top: 1.75rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.125rem;
    margin-top: 2rem;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --text: #000000;
    --muted: #444444;
    --rule: #bbbbbb;
    --link: #000000;
  }

  body {
    font-size: 10.5pt;
    line-height: 1.5;
  }

  .lang {
    display: none;
  }

  .top {
    padding-top: 0;
  }

  .top,
  main,
  article {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  main {
    padding-top: 1rem;
    padding-bottom: 0;
  }

  a {
    text-decoration: none;
  }

  h1,
  h2 {
    break-after: avoid;
    page-break-after: avoid;
  }

  li,
  .meta p {
    break-inside: avoid;
  }
}
