:root {
  --theme-color: #0269ff;
  --font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
  --content-max-width: min(80%, 1024px);
  --sidebar-font-size: 14px;
  --sidebar-toggle-width: 14px;
}

.app-nav {
  position: fixed;
  top: 0;
  background-color: color-mix(in srgb, var(--color-bg) 70%, transparent);
  font-weight: 500;
  padding-right: 3.5rem;
}

.theme-toggle {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-block: 0.45rem !important;
  padding: 0 !important;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--color-mono-3);
  border-radius: var(--border-radius, 3px);
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--theme-color);
  color: var(--theme-color);
}

@media screen and (max-width: 768px) {
  .app-nav a {
    font-size: 12px;
  }

  .theme-toggle {
    font-size: 0.9rem;
  }
}

.sidebar .app-name {
  margin: 0;
  padding: 0.5rem 1rem;
  background: var(--color-bg);
  opacity: 0.9;
  position: sticky;
  top: 0;
  text-align: left;
  z-index: 100;
}

.sidebar .app-name-link > img {
  vertical-align: text-top;
  max-width: 70%;
}

.sidebar .search {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--color-mono-2);
  position: sticky;
  top: calc(var(--sidebar-name-font-size, 1.5rem) + 1rem);
  z-index: 99;
  --plugin-search-input-border-color: transparent;
  --plugin-search-margin: 0;
}

.sidebar-nav > ul > li > a {
  font-weight: 500;
}

body.sidebar-chevron-right .sidebar-nav li:not(:has(> ul)) > a.page-link {
  background: none;
}

body.sidebar-chevron-right .sidebar-nav li:not(:has(> ul)).active > a.page-link {
  background: none;
}

body.sidebar-chevron-right .sidebar-nav li[aria-current="page"] > a.page-link {
  background: none;
}

.sidebar-nav .section-link {
  font-style: italic;
  line-height: 16px;
}

.search .results-panel:not(:empty) {
  border-top: 1px solid var(--color-mono-2);
  padding: 0 1em;
}

.search input {
  padding: 0.7em 1em !important;
}

.search input:placeholder-shown:focus {
  box-shadow: 0 0 5px var(--color-mono-3) !important;
}

.markdown-section h2 {
  margin: 1rem 0 0.8rem;
  padding: 45px 0 0;
}

.markdown-section h5 {
  margin: 1rem 0;
}

.markdown-section h5 > a {
  font-size: 0.9rem;
  opacity: 0.8;
}

.inline-image {
  vertical-align: sub;
  height: 16px;
}

h4 {
  margin: 8px 0;
}
