:root {
  --border: #f0f0f0;
  --bg: #fff;
  --text: #111;
  --text-muted: #333;
  --text-light: #999;
  --text-author: #333;
  --dropdown-strong: #111;
  --dropdown-span: #888;
  --btn-sec-bg: #ffffff;
  --btn-sec-text: #000;
  --btn-sec-hover: #e0e0e0;
  --sidebar-a: #000;
  --sidebar-hover: #f5f5f5;
  --toc-active: black;
  --content-a: #000;
  --table-border: #f5f5f5;
  --code-text: #555;
  --code-bg: #f5f5f5;
  --icon-filter: brightness(0);
  --nav-height: 64px;
  --btn-inverted-bg: #111;
  --btn-inverted-text: #fff;
  --btn-inverted-icon: brightness(0) invert(1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --border: #1f1f23;
    --bg: #000000;
    --text: #ffffff;
    --text-muted: #ffffff;
    --text-light: #777777;
    --text-author: #ffffff;
    --dropdown-strong: #ffffff;
    --dropdown-span: #777777;
    --btn-sec-bg: #1f1f23;
    --btn-sec-text: #ffffff;
    --btn-sec-hover: #2a2a2a;
    --sidebar-a: #ffffff;
    --sidebar-hover: #2a2a2a;
    --toc-active: #ffffff;
    --content-a: #ffffff;
    --table-border: #1f1f23;
    --code-text: #ffffff;
    --code-bg: #1b1b1b;
    --icon-filter: brightness(0) invert(1);
    --btn-inverted-bg: #ffffff;
    --btn-inverted-text: #000000;
    --btn-inverted-icon: brightness(0);
    .nav-logo img { filter: brightness(0) invert(1); }
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Geist', sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-left: 250px;
  padding-right: 250px;
}
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 1.5rem;
  z-index: 1000;
}
.nav-logo {
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-logo img {
  height: 40px;
  width: auto;
}
.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-item {
  position: relative;
  padding-bottom: 8px;
  margin-bottom: -8px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
  font-family: Arial, sans-serif;
}
.nav-link:hover {
  background: var(--sidebar-hover);
  color: var(--text);
}
.nav-link .chevron {
  font-size: 14px;
  color: var(--text-light);
}
.nav-item:hover .chevron {
  transform: rotate(180deg);
}
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  z-index: 1000;
  width: max-content;
  white-space: nowrap;
}
.nav-item:hover .nav-dropdown {
  display: block;
}
.dropdown-item {
  display: block;
  padding: 14px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 0;
}
.dropdown-item:first-child { border-top-left-radius: 8px; border-top-right-radius: 8px; }
.dropdown-item:last-child  { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.dropdown-item:hover       { background: var(--sidebar-hover); color: var(--text); }
.dropdown-item .di-icon { display: none; }
.dropdown-item .di-text strong {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--dropdown-strong);
  margin-bottom: 2px;
}
.dropdown-item .di-text span {
  line-height: 1.8;
  font-size: 14px;
  font-weight: 400;
  color: var(--dropdown-span);
}
.nav-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.nav-actions .navbar-button {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  background: var(--btn-inverted-bg);
  border: none;
  border-radius: 99rem;
  color: var(--btn-inverted-text);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s ease;
}
.nav-actions .navbar-button:hover {
  opacity: 0.9;
}
.nav-actions .navbar-button img,
.nav-actions .navbar-button svg,
.sidebar-actions button img,
.sidebar-actions button svg {
  filter: var(--btn-inverted-icon) !important;
}
.github-icon {
  height: 14px;
}
.sidebar {
  background: var(--bg);
  position: fixed;
  top: var(--nav-height);
  left: 0;
  z-index: 100;
  bottom: 0;
  width: 250px;
  padding: 25px;
  overflow: visible;
  display: flex;
  flex-direction: column;
}
.sidebar-actions {
  margin-top: auto;
  display: none;
  flex-direction: column;
  gap: 8px;
}
.sidebar-actions button {
  padding: 12px 16px;
  background: var(--btn-inverted-bg);
  color: var(--btn-inverted-text);
  border: none;
  cursor: pointer;
  font-size: 13px;
  border-radius: 99rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s ease;
}
.sidebar-actions button:hover {
  opacity: 0.9;
}
.sidebar p {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  margin-top: 12px;
  margin-bottom: 12px;
  color: var(--text-light);
}
.sidebar a {
  display: block;
  color: var(--sidebar-a);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
}
.sidebar a:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-a);
}
.sidebar ul {
  list-style: none;
  padding-left: 0;
  margin-left: -12px !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar ul li {
  gap: 4px;
}
.sidebar-item {
  position: relative;
}
.sidebar-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--sidebar-a);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 15px;
}
.sidebar-item > a:hover {
  background: var(--code-bg);
  color: var(--sidebar-a);
}
.sidebar-chevron {
  font-size: 14px;
  color: var(--text-light);
  flex-shrink: 0;
  margin-left: 4px;
  transition: color 0.15s;
}
.sidebar-item.hovered > a .sidebar-chevron {
  color: var(--text);
}
.sidebar-flyout {
  display: none;
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  background: var(--code-bg);
  border-radius: 10px;
  z-index: 9999 !important;
  width: 200px;
  padding: 6px;
  margin-left: -4px;
}
.sidebar-item.hovered .sidebar-flyout {
  display: block;
}
.sidebar-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 100%;
  width: 12px;
  height: 100%;
  display: none;
}
.sidebar-item.hovered::after {
  display: block;
}
.sidebar-flyout-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding: 8px 12px 2px;
}
.sidebar-flyout-desc {
  font-size: 12px;
  color: var(--text-light);
  padding: 0 12px 8px;
  line-height: 1.4;
}
.sidebar-flyout a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: 6px;
  text-decoration: none;
  margin-top: 2px;
}
.sidebar-flyout a:hover {
  background: var(--sidebar-hover);
  color: var(--text);
}
.sidebar-left {
  background: var(--bg);
  position: fixed;
  top: var(--nav-height);
  right: 0;
  bottom: 0;
  width: 250px;
  padding: 20px;
}
.content {
  font-size: 14px;
  margin-top: 82px;
  padding: 20px 30px;
  max-width: 1000px;
  width: 100%;
  margin-inline: auto;
}
.toc-wrapper {
  position: relative;
  padding-left: 16px;
}
.toc-track {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}
.toc-indicator {
  position: absolute;
  left: 0;
  width: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: top 0.25s ease, height 0.25s ease;
}
.toc a {
  display: block;
  text-decoration: none;
  color: var(--text-light);
  margin: 0;
  font-size: 15px;
  padding: 6px 0;
  transition: color 0.2s;
  line-height: 1.3;
}
.toc a.active { color: var(--toc-active); font-weight: 600; }
.toc .h2 { padding-left: 10px; }
.toc .h3 { padding-left: 20px; }
.meta-date {
  text-align: center;
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 8px;
}
.meta-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 15px;
  color: var(--text-author);
}
.meta-author .avatars {
  display: flex;
  align-items: center;
}
.meta-author .avatars .author-avatar {
  position: relative;
  margin-left: -8px;
}
.meta-author .avatars .author-avatar:first-child {
  margin-left: 0;
}
.meta-author .avatars .author-avatar:nth-child(1) { z-index: 4; }
.meta-author .avatars .author-avatar:nth-child(2) { z-index: 3; }
.meta-author .avatars .author-avatar:nth-child(3) { z-index: 2; }
.meta-author .avatars .author-avatar:nth-child(4) { z-index: 1; }
.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg);
  flex-shrink: 0;
  display: inline-block;
}
.author-avatar--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 400;
  color: #fff;
}

.meta-actions-row {
  display: flex;
  align-items: left;
  justify-content: start;
  gap: 0;
  padding-bottom: 10px;
  margin-top: 30px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.meta-read-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-light);
  font-size: 15px;
  padding: 0 14px 0 0 ;
}
.meta-actions-row .meta-read-time + .meta-action-btn,
.meta-actions-row .meta-action-btn + .meta-action-btn {
  border-left: 1px solid var(--border);
}
.meta-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-light);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.meta-action-btn:hover {
  color: var(--text);
}
.meta-action-btn i {
  font-size: 15px;
}

.content h1 { text-align: center; margin-top: 10px; margin-bottom: 20px; font-weight: 500; font-size: 36px; }
.content h2 { margin-top: 30px; margin-bottom: 10px; font-weight: 500; font-size: 28px; }
.content h3 { margin-top: 30px; font-weight: 500; font-size: 22px; }
.content h2,
.content h3 {
  scroll-margin-top: calc(var(--nav-height) + 24px);
}
.content p  { margin-bottom: 20px; margin-top: 10px; line-height: 1.6; font-size: 15px; }
.content a { color: var(--content-a); font-size: 15px !important; }
.content hr { border: 0; border-top: 1px solid var(--border); margin-top: 30px; margin-bottom: 30px; }
.content > img,
.content p img,
.content h1 img, .content h2 img, .content h3 img {
  max-width: 100%; height: auto; margin: 20px 0; border-radius: 8px;
}
.content ul,
.content ol {
  padding-left: 24px;
  margin-top: 20px;
  margin-bottom: 20px;
  line-height: 1.6;
}
.content table {
  border-collapse: collapse;
  width: 100%;
}
.content th,
.content td {
  border: none;
  border-bottom: 1px solid var(--table-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.content thead th {
  border-bottom: 1px solid var(--table-border);
  font-weight: 600;
}
.content :not(pre) > code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--text);
}
.content pre {
  border-radius: 8px;
  margin: 10px 0;
  width: 100%;
  overflow: hidden;
}
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--code-text);
  font-family: 'JetBrains Mono', monospace;
  background: var(--code-bg);
  border-bottom: none;
}
.copy-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  margin: 5px;
  padding: 2px 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}
.copy-btn img {
  height: 13px;
  width: auto;
  display: block;
  filter: var(--icon-filter) opacity(0.4);
}
.copy-btn:hover img {
  filter: var(--icon-filter) opacity(0.8);
}
.code-body {
  padding: 14px;
  width: 100%;
  display: block;
  overflow-x: auto;
  background-color: var(--code-bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
}
.code-body.hljs,
.code-body .hljs {
  padding: 0;
}
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: auto;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 6px;
}
.hamburger img {
  height: 14px !important;
  width: auto;
  filter: var(--icon-filter);
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
body.sidebar-open { overflow: hidden; }
@media (max-width: 1280px) {
  .sidebar-left { display: none; }
  body { padding-right: 0; }
}
@media (max-width: 1100px) {
  .nav-center { display: none; }
}
@media (max-width: 1024px) {
  .sidebar { width: 200px; }
  body { padding-left: 200px; }
}
@media (max-width: 860px) {
  .sidebar { width: 160px; }
  body { padding-left: 160px; }
}
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-actions .navbar-button { display: none; }
  body { padding-left: 0; padding-right: 0; }
  .nav-logo img { height: 40px; }
  .sidebar {
    left: auto;
    right: 0;
    width: 100%;
    border-left: none;
    transform: translateX(100%);
    z-index: 1001;
    transition: transform 0.3s ease;
  }
  .sidebar a { font-size: 20px; }
  .sidebar p { font-size: 20px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar ul { font-size: 16px !important; }
  .sidebar-actions { display: flex; }
  .sidebar-actions button {
    font-size: 16px;
    padding: 16px 20px;
  }
  .content {
    padding: 16px;
    padding-inline: 30px !important;
  }
  .meta-action-btn {
    display: none;
  }
  .meta-actions-row {
    margin-top: 10px;
  }

  .content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    width: max-content;
    max-width: 100%;
  }
}

.search-container {
  position: relative;
  width: 450px;
}
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-light);
  font-size: 16px;
  pointer-events: none;
  display: flex;
  align-items: center;
}
#docsSearchInput {
  width: 100%;
  padding: 10px 14px 10px 42px;
  font-size: 14px;
  font-family: inherit;
  background: var(--code-bg);
  color: var(--text);
  border: transparent;
  border-radius: 99rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-results-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 450px;
  max-height: 350px;
  overflow-y: auto;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 1100;
}
.search-results-dropdown.open {
  display: block;
}
.search-result-item {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover {
  background: rgba(0, 0, 0, 0.05);
}
.search-result-item strong {
  display: block;
  font-size: 14px;
  color: var(--dropdown-strong);
  margin-bottom: 2px;
}
.search-result-item span {
  display: block;
  font-size: 12px;
  color: var(--dropdown-span);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-no-results {
  padding: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
}
.search-result-item mark {
  background: transparent;
  font-weight: 700;
}
@media (prefers-color-scheme: dark) {
  #docsSearchInput {
    background: var(--code-bg);
  }
  .search-results-dropdown {
    background: var(--code-bg);
  }
  .search-result-item:hover {
    background: var(--sidebar-hover);
  }
}
@media (prefers-color-scheme: light) {
  .search-result-item mark { color: #000000; }
}
@media (prefers-color-scheme: dark) {
  .search-result-item mark { color: #ffffff; }
}
@media (max-width: 768px) {
  .search-container {
    width: 100%;
    padding: 0 10px;
  }
  .search-results-dropdown {
    width: calc(100% - 20px);
    left: 10px;
    transform: none;
  }
}