* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  display: grid;
  grid-template-columns: 140px minmax(0, 740px);
  gap: 3rem;
  width: min(100% - 2rem, 928px);
  margin: 2rem auto 6rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
}

html[lang="zh-CN"] body {
  font-family: Georgia, "Songti SC", STSong, "Times New Roman", serif;
}

main {
  min-width: 0;
  container-type: inline-size;
}

.ad-slot {
  display: none;
  align-items: center;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 2.75rem;
}

.ad-label {
  color: #666;
  font: 0.7rem/1.4 Arial, sans-serif;
}

.ad-slot iframe {
  display: block;
  border: 0;
  flex-shrink: 0;
}

@container (min-width: 728px) {
  .ad-slot--728x90 {
    display: flex;
    min-height: calc(90px + 0.98rem + 0.5rem);
  }
}

@container (min-width: 300px) {
  .ad-slot--300x250 {
    display: flex;
    min-height: calc(250px + 0.98rem + 0.5rem);
  }
}

a {
  color: inherit;
}

.function-nav {
  position: sticky;
  top: 2rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.4;
}

.function-nav strong {
  margin-bottom: 0.4rem;
}

.language-switch {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
  height: 2rem;
  padding: 0 0.65rem;
  border: 1px solid currentColor;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.85rem;
  line-height: 1;
  text-decoration: none;
}

.function-nav .section-link {
  margin-top: 0.25rem;
  font-weight: bold;
}

.function-nav .item-link {
  padding-left: 0.75rem;
}

small,
.source,
.label,
.since {
  font-size: 0.9rem;
}

h2,
h3,
h4,
h5 {
  font-family: "Courier New", Courier, monospace;
}

h2 {
  margin: 0 0 2.5rem;
  font-size: 1.3rem;
}

h3 {
  margin: 0 0 2.75rem;
  font-size: 1.1rem;
  scroll-margin-top: 2rem;
}

h4 {
  margin: 0 0 1rem;
  padding: 0.5rem 0.65rem;
  background: #eceae5;
  font-size: 1.1rem;
  line-height: 1.4;
  scroll-margin-top: 2rem;
}

h5 {
  margin: 1.75rem 0 0.5rem;
  font-size: 0.95rem;
}

p {
  max-width: 65ch;
  margin: 0.85rem 0;
}

section {
  margin-bottom: 4.5rem;
  scroll-margin-top: 2rem;
}

code,
pre {
  font-family: "Courier New", Courier, monospace;
}

code {
  font-size: 0.92em;
}

pre {
  margin: 0.9rem 0 1.25rem;
  overflow-x: auto;
  white-space: pre;
  font-size: 0.95rem;
  line-height: 1.6;
}

.signature {
  margin-top: 0;
  font-size: 1rem;
}

.since {
  margin: -0.8rem 0 1.25rem;
  font-family: "Courier New", Courier, monospace;
  font-style: italic;
}

.kw {
  color: #7a2d2d;
  font-weight: bold;
}

.type {
  color: #684f00;
  font-weight: bold;
}

.lit {
  color: #5f3a74;
  font-weight: bold;
}

.fn {
  color: #174b68;
  font-weight: bold;
}

.str {
  color: #245c3a;
  font-style: italic;
}

.output {
  margin-top: 0.2rem;
}

.label {
  margin: 1rem 0 0;
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
}

.source {
  margin-top: 3rem;
}

@media (max-width: 800px) {
  body {
    display: block;
  }

  .function-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin-bottom: 2.5rem;
  }

  .function-nav strong {
    flex-basis: 100%;
    margin-bottom: 0.2rem;
  }

}
