html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border: 1px solid #475569;
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: #cbd5e1;
  font-size: 0.75rem;
  line-height: 1rem;
  transition:
    background-color 150ms,
    color 150ms,
    border-color 150ms;
}

.theme-toggle:hover {
  background-color: #1e293b;
  color: #fff;
}

.theme-toggle:focus-visible {
  outline: 2px solid #9146ff;
  outline-offset: 2px;
}

.theme-toggle-icon {
  display: none;
  align-items: center;
  justify-content: center;
}

.theme-toggle-icon svg {
  display: block;
  width: 1rem;
  height: 1rem;
}

html:not([data-theme-mode]) .theme-toggle-icon[data-theme-icon="auto"],
html[data-theme-mode="auto"] .theme-toggle-icon[data-theme-icon="auto"],
html[data-theme-mode="light"] .theme-toggle-icon[data-theme-icon="light"],
html[data-theme-mode="dark"] .theme-toggle-icon[data-theme-icon="dark"] {
  display: inline-flex;
}

html[data-theme="light"] .theme-toggle {
  border-color: #cbd5e1;
  color: #334155;
}

html[data-theme="light"] .theme-toggle:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.site-header {
  position: relative;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid #1e293b;
  background-color: rgb(2 6 23 / 80%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.site-header-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

@media (min-width: 768px) {
  .site-header-inner {
    flex-wrap: nowrap;
  }

  .site-menu {
    display: none;
  }
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.site-brand:hover {
  color: #fff;
}

.site-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background-color: #9146ff;
}

.site-brand-mark svg {
  width: 1rem;
  height: 1rem;
  fill: #fff;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  font-size: 0.75rem;
  line-height: 1rem;
}

@media (min-width: 640px) {
  .site-nav {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
}

.site-nav-link,
.site-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: #94a3b8;
  cursor: pointer;
  font: inherit;
  line-height: inherit;
  padding: 0.375rem 0.5rem;
  text-decoration: none;
  transition: background-color 150ms, color 150ms;
}

@media (min-width: 640px) {
  .site-nav-link,
  .site-nav-button {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

.site-nav-link:hover,
.site-nav-button:hover {
  color: #fff;
}

.site-nav-link.is-active {
  background-color: #1e293b;
  color: #fff;
}

.site-menu {
  margin: 0;
}

.site-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  background: none;
  color: #cbd5e1;
  cursor: pointer;
  list-style: none;
  padding: 0;
  transition:
    background-color 150ms,
    color 150ms,
    border-color 150ms;
}

.site-nav-toggle::-webkit-details-marker {
  display: none;
}

.site-nav-toggle::marker {
  content: "";
}

.site-nav-toggle:hover,
.site-menu[open] .site-nav-toggle {
  background-color: #1e293b;
  color: #fff;
}

.site-nav-toggle:focus-visible {
  outline: 2px solid #9146ff;
  outline-offset: 2px;
}

.site-nav-toggle-icon {
  display: none;
  align-items: center;
  justify-content: center;
}

.site-nav-toggle-icon svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.site-nav-toggle .site-nav-toggle-icon[data-nav-icon="open"],
.site-menu[open] .site-nav-toggle-icon[data-nav-icon="close"] {
  display: inline-flex;
}

.site-menu[open] .site-nav-toggle-icon[data-nav-icon="open"] {
  display: none;
}

.site-badge {
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  padding: 0.25rem 0.625rem;
}

.site-badge.is-private {
  background-color: rgb(145 70 255 / 15%);
  color: #bf94ff;
}

.site-badge.is-public {
  background-color: #1e293b;
  color: #cbd5e1;
}

@media (max-width: 767px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.25rem;
    padding: 0.5rem 1rem 0.75rem;
    border-bottom: 1px solid #1e293b;
    background-color: #020617;
    box-shadow: 0 16px 32px rgb(0 0 0 / 35%);
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .site-menu[open] ~ .site-nav {
    display: flex;
  }

  .site-nav-link,
  .site-nav-button {
    justify-content: flex-start;
    width: 100%;
    padding: 0.625rem 0.75rem;
  }

  .site-badge {
    align-self: flex-start;
    margin: 0.25rem 0.75rem;
  }

  .site-nav .theme-toggle {
    align-self: flex-start;
    margin-top: 0.25rem;
  }
}

html[data-theme="light"] .site-header {
  border-color: #e2e8f0;
  background-color: rgb(255 255 255 / 92%);
}

html[data-theme="light"] .site-brand,
html[data-theme="light"] .site-brand:hover {
  color: #0f172a;
}

html[data-theme="light"] .site-nav-link,
html[data-theme="light"] .site-nav-button {
  color: #475569;
}

html[data-theme="light"] .site-nav-link:hover,
html[data-theme="light"] .site-nav-button:hover {
  color: #0f172a;
}

html[data-theme="light"] .site-nav-link.is-active {
  background-color: #e2e8f0;
  color: #0f172a;
}

html[data-theme="light"] .site-badge.is-private {
  background-color: #f3e8ff;
  color: #6d28d9;
}

html[data-theme="light"] .site-badge.is-public {
  background-color: #e2e8f0;
  color: #334155;
}

html[data-theme="light"] .site-nav-toggle {
  border-color: #cbd5e1;
  color: #334155;
}

html[data-theme="light"] .site-nav-toggle:hover,
html[data-theme="light"] .site-menu[open] .site-nav-toggle {
  background-color: #f1f5f9;
  color: #0f172a;
}

@media (max-width: 767px) {
  html[data-theme="light"] .site-nav {
    border-color: #e2e8f0;
    background-color: #fff;
    box-shadow: 0 16px 32px rgb(15 23 42 / 12%);
  }
}
