:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: light-dark(#24292f, #e6edf3);
  background: light-dark(#ffffff, #0d1117);
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.35rem;
  background: light-dark(#ffffff, #0d1117);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.layout {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.5rem;
  overflow-y: auto;
  border-right: 1px solid light-dark(#d0d7de, #30363d);
  background: light-dark(#f6f8fa, #161b22);
}

.sidebar-brand {
  display: block;
  margin-bottom: 2rem;
  color: inherit;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.sidebar-heading {
  margin: 1.5rem 0 0.4rem;
  padding: 0;
  border: 0;
  color: light-dark(#57606a, #8c959f);
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.search-label {
  display: block;
  margin-bottom: 0.35rem;
  color: light-dark(#57606a, #8c959f);
  font-size: 0.75rem;
  font-weight: 650;
}

#docs-search {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid light-dark(#afb8c1, #484f58);
  border-radius: 0.4rem;
  color: inherit;
  background: light-dark(#ffffff, #0d1117);
}

.search-results {
  max-height: 55vh;
  margin-top: 0.75rem !important;
  overflow-y: auto;
}

.search-results li {
  display: grid;
  gap: 0.1rem;
  padding: 0.3rem 0;
}

.search-results small {
  color: light-dark(#57606a, #8c959f);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar li {
  margin: 0.2rem 0;
}

.sidebar a {
  text-decoration: none;
}

.sidebar a:hover {
  text-decoration: underline;
}

.sidebar a[aria-current="page"] {
  color: light-dark(#0550ae, #79c0ff);
  font-weight: 750;
}

.sidebar-all-options {
  display: block;
  margin-top: 1.5rem;
  font-weight: 650;
}

.content {
  width: min(100%, 82rem);
  padding: 2.5rem clamp(1.25rem, 5vw, 5rem) 3rem;
}

main {
  max-width: 72rem;
}

h1 {
  margin: 0 0 3rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.04em;
}

h2 {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid light-dark(#d0d7de, #30363d);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.heading-link {
  opacity: 0;
  font-weight: 400;
  text-decoration: none;
}

h2:hover .heading-link,
h2:focus-within .heading-link,
h3:hover .heading-link,
h3:focus-within .heading-link {
  opacity: 1;
}

a {
  color: light-dark(#0969da, #58a6ff);
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

code {
  padding: 0.15em 0.35em;
  border-radius: 0.3rem;
  background: light-dark(#eff1f3, #161b22);
}

pre {
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid light-dark(#d8dee4, #30363d);
  border-radius: 0.5rem;
  background: light-dark(#f6f8fa, #161b22);
}

pre code {
  padding: 0;
  background: transparent;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  margin-top: 5rem;
  padding-top: 1rem;
  border-top: 1px solid light-dark(#d0d7de, #30363d);
  color: light-dark(#57606a, #8c959f);
  font-size: 0.9rem;
}

@media (max-width: 52rem) {
  .layout {
    display: block;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    max-height: 45vh;
    border-right: 0;
    border-bottom: 1px solid light-dark(#d0d7de, #30363d);
  }

  .module-list {
    columns: 2;
  }

  .module-list > li {
    break-inside: avoid;
  }

  .content {
    padding-top: 2rem;
  }

  h1 {
    margin-bottom: 2rem;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 32rem) {
  .module-list {
    columns: 1;
  }
}
