:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5c667a;
  --line: #dfe4ec;
  --soft: #f6f8fb;
  --accent: #1769e0;
  --width: 76rem;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.65;
}
a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: #fff;
  padding: 0.5rem;
}
header {
  height: 4rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0 max(1rem, calc((100vw - var(--width)) / 2));
  position: sticky;
  top: 0;
  background: #fffffff2;
  backdrop-filter: blur(10px);
  z-index: 2;
}
.brand {
  font-weight: 750;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.15rem;
}
.brand span {
  font-weight: 500;
  color: var(--muted);
}
.languages {
  display: flex;
  gap: 0.6rem;
  margin-left: auto;
}
.languages a {
  font-size: 0.78rem;
  color: var(--muted);
}
.app {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.35rem 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.layout {
  max-width: var(--width);
  margin: auto;
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr) 12rem;
  gap: 2.5rem;
  padding: 2.5rem 1rem 4rem;
}
.layout > aside {
  font-size: 0.85rem;
}
.layout > aside section {
  margin-bottom: 1.25rem;
}
.sidebar-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.layout > aside ul,
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-item {
  margin: 0.3rem 0;
}
.layout > aside a,
.toc a {
  text-decoration: none;
  color: var(--muted);
}
.layout > aside a[aria-current="page"] {
  font-weight: 650;
  color: var(--ink);
}
.toc {
  font-size: 0.8rem;
  position: sticky;
  top: 6rem;
  align-self: start;
}
.toc ol {
  margin-top: 0.5rem;
}
.toc li {
  margin: 0.35rem 0;
}
.toc .depth-3 {
  padding-left: 0.75rem;
}
.crumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.doc,
.hero {
  max-width: 46rem;
}
.doc h1,
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 0.25rem 0;
}
.lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 1rem 0 2.5rem;
}
.doc h2 {
  font-size: 1.55rem;
  margin: 2.7rem 0 0.7rem;
  line-height: 1.25;
}
.doc h3 {
  font-size: 1.15rem;
  margin: 2rem 0 0.5rem;
}
.heading-link {
  opacity: 0;
  margin-left: 0.4rem;
  text-decoration: none;
  font-size: 0.8em;
}
.doc h2:hover .heading-link,
.doc h3:hover .heading-link,
.heading-link:focus {
  opacity: 1;
}
.doc img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: 0 0.75rem 2rem #17203314;
}
.doc figure {
  margin: 2rem 0;
}
.doc figure img {
  margin: 0;
}
.doc figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
.doc pre,
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--soft);
  border-radius: 0.3rem;
}
.doc code {
  padding: 0.12rem 0.3rem;
}
.doc pre {
  padding: 1rem;
  overflow: auto;
}
.doc table {
  border-collapse: collapse;
  width: 100%;
}
.doc th,
.doc td {
  border: 1px solid var(--line);
  padding: 0.5rem;
  text-align: left;
}
.related {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
}
.cards {
  margin: 3rem 0;
}
.cards > h2 {
  font-size: 1.4rem;
}
.cards > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.cards article {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1rem;
}
.cards h3 {
  font-size: 1rem;
  margin: 0;
}
.cards p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}
footer {
  border-top: 1px solid var(--line);
  padding: 2rem max(1rem, calc((100vw - var(--width)) / 2));
  font-size: 0.8rem;
  color: var(--muted);
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .layout > aside {
    display: none;
  }
  .toc {
    position: static;
    order: -1;
    background: var(--soft);
    padding: 1rem;
    border-radius: 0.5rem;
  }
  .cards > div {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 540px) {
  header {
    gap: 0.7rem;
  }
  .brand span {
    display: none;
  }
  .app {
    display: none;
  }
  .layout {
    padding-top: 1.5rem;
  }
}
