.testudos-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(221, 229, 246, 0.95);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .testudos-topbar {
  background: rgba(17, 23, 34, 0.9);
  border-bottom: 1px solid rgba(67, 78, 102, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.testudos-topbar__inner {
  box-sizing: border-box;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.testudos-topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.testudos-topbar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testudos-topbar__brand {
  display: inline-flex;
  align-items: center;
  color: #1d1d1b;
  text-decoration: none;
  white-space: nowrap;
}

.testudos-topbar__brand svg {
  display: block;
  width: 131px;
  height: 27px;
}

.testudos-topbar__brand-logo-dark {
  display: none;
  width: 131px;
  height: auto;
}

[data-theme="dark"] .testudos-topbar__brand-logo-light {
  display: none;
}

[data-theme="dark"] .testudos-topbar__brand-logo-dark {
  display: block;
}

.testudos-topbar__nav {
  display: none;
  align-items: center;
  gap: 32px;
}

.testudos-topbar__theme-slot {
  display: inline-flex;
  align-items: center;
}

.testudos-topbar__theme {
  position: relative;
  display: inline-flex;
}

.testudos-topbar__theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid #dde5f6;
  border-radius: 999px;
  background: #fff;
  color: #1d1d1b;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

[data-theme="dark"] .testudos-topbar__theme-toggle {
  background: rgba(25, 33, 47, 0.95);
  border-color: rgba(83, 97, 128, 0.65);
  color: #f5f7fb;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.testudos-topbar__theme-toggle:hover,
.testudos-topbar__theme-toggle:focus-visible,
.testudos-topbar__theme.is-open .testudos-topbar__theme-toggle {
  background: #f8fbff;
  border-color: #c7d5f3;
}

[data-theme="dark"] .testudos-topbar__theme-toggle:hover,
[data-theme="dark"] .testudos-topbar__theme-toggle:focus-visible,
[data-theme="dark"] .testudos-topbar__theme.is-open .testudos-topbar__theme-toggle {
  background: rgba(35, 45, 64, 0.98);
  border-color: rgba(120, 138, 178, 0.85);
}

.testudos-topbar__theme-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

.testudos-topbar__theme-menu {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  display: none;
  width: 224px;
  padding: 8px;
  border: 1px solid #eef2fb;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(30, 49, 91, 0.14);
}

[data-theme="dark"] .testudos-topbar__theme-menu {
  border-color: rgba(61, 74, 100, 0.9);
  background: #141b29;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.testudos-topbar__theme.is-open .testudos-topbar__theme-menu {
  display: block;
}

.testudos-topbar__theme-option {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  color: #1d1d1b;
  text-align: left;
  font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] .testudos-topbar__theme-option {
  color: #e8edf8;
}

.testudos-topbar__theme-option:hover,
.testudos-topbar__theme-option:focus-visible,
.testudos-topbar__theme-option.is-active {
  background: #f5f9ff;
  color: #2f54a1;
}

[data-theme="dark"] .testudos-topbar__theme-option:hover,
[data-theme="dark"] .testudos-topbar__theme-option:focus-visible,
[data-theme="dark"] .testudos-topbar__theme-option.is-active {
  background: rgba(56, 87, 159, 0.18);
  color: #b7cbff;
}

.testudos-topbar__theme-option-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #f3f6fc;
  color: currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .testudos-topbar__theme-option-icon {
  background: rgba(255, 255, 255, 0.06);
}

.testudos-topbar__theme-option-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.testudos-topbar__theme-native {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.testudos-topbar__link,
.testudos-topbar__dropdown-toggle,
.testudos-topbar__dropdown-link,
.testudos-topbar__mobile-link,
.testudos-topbar__mobile-dropdown-link {
  font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  color: #1d1d1b;
  text-decoration: none;
}

[data-theme="dark"] .testudos-topbar__link,
[data-theme="dark"] .testudos-topbar__dropdown-toggle,
[data-theme="dark"] .testudos-topbar__dropdown-link,
[data-theme="dark"] .testudos-topbar__mobile-link,
[data-theme="dark"] .testudos-topbar__mobile-dropdown-link {
  color: #e8edf8;
}

.testudos-topbar__link {
  transition: color 0.2s ease;
}

.testudos-topbar__link:hover,
.testudos-topbar__link:focus-visible,
.testudos-topbar__dropdown-link:hover,
.testudos-topbar__dropdown-link:focus-visible,
.testudos-topbar__mobile-link:hover,
.testudos-topbar__mobile-link:focus-visible,
.testudos-topbar__mobile-dropdown-link:hover,
.testudos-topbar__mobile-dropdown-link:focus-visible {
  color: #2f54a1;
}

.testudos-topbar__link.is-active {
  color: #2f54a1;
}

[data-theme="dark"] .testudos-topbar__link:hover,
[data-theme="dark"] .testudos-topbar__link:focus-visible,
[data-theme="dark"] .testudos-topbar__dropdown-link:hover,
[data-theme="dark"] .testudos-topbar__dropdown-link:focus-visible,
[data-theme="dark"] .testudos-topbar__mobile-link:hover,
[data-theme="dark"] .testudos-topbar__mobile-link:focus-visible,
[data-theme="dark"] .testudos-topbar__mobile-dropdown-link:hover,
[data-theme="dark"] .testudos-topbar__mobile-dropdown-link:focus-visible,
[data-theme="dark"] .testudos-topbar__link.is-active {
  color: #b7cbff;
}

.testudos-topbar__dropdown {
  position: relative;
}

.testudos-topbar__dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 12px 24px;
  border: 1px solid #dde5f6;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] .testudos-topbar__dropdown-toggle {
  background: rgba(25, 33, 47, 0.95);
  border-color: rgba(83, 97, 128, 0.65);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.testudos-topbar__dropdown-toggle:hover,
.testudos-topbar__dropdown-toggle:focus-visible {
  background: #f8fbff;
  border-color: #c7d5f3;
}

[data-theme="dark"] .testudos-topbar__dropdown-toggle:hover,
[data-theme="dark"] .testudos-topbar__dropdown-toggle:focus-visible {
  background: rgba(35, 45, 64, 0.98);
  border-color: rgba(120, 138, 178, 0.85);
}

.testudos-topbar__dropdown-caret {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.testudos-topbar__dropdown.is-open .testudos-topbar__dropdown-caret {
  transform: rotate(-135deg) translateY(-1px);
}

.testudos-topbar__dropdown-menu {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  display: none;
  width: 288px;
  padding: 8px;
  border: 1px solid #eef2fb;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(30, 49, 91, 0.14);
}

[data-theme="dark"] .testudos-topbar__dropdown-menu {
  border-color: rgba(61, 74, 100, 0.9);
  background: #141b29;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.testudos-topbar__dropdown.is-open .testudos-topbar__dropdown-menu {
  display: block;
}

.testudos-topbar__dropdown-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.testudos-topbar__dropdown-link:hover,
.testudos-topbar__dropdown-link:focus-visible {
  background: #f5f9ff;
}

[data-theme="dark"] .testudos-topbar__dropdown-link:hover,
[data-theme="dark"] .testudos-topbar__dropdown-link:focus-visible {
  background: rgba(56, 87, 159, 0.18);
}

.testudos-topbar__dropdown-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #f3f6fc;
  color: #2f54a1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .testudos-topbar__dropdown-icon {
  background: rgba(255, 255, 255, 0.06);
  color: #b7cbff;
}

.testudos-topbar__dropdown-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.testudos-topbar__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  background: linear-gradient(180deg, #2f54a1 0%, #1e315b 100%);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.testudos-topbar__cta:hover,
.testudos-topbar__cta:focus-visible {
  opacity: 0.92;
  transform: translateY(-1px);
}

[data-theme="dark"] .testudos-topbar__cta {
  box-shadow: 0 10px 28px rgba(22, 42, 96, 0.45);
}

.testudos-topbar__mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #dde5f6;
  border-radius: 14px;
  background: #fff;
  color: #1d1d1b;
  cursor: pointer;
}

[data-theme="dark"] .testudos-topbar__mobile-toggle {
  background: rgba(25, 33, 47, 0.95);
  border-color: rgba(83, 97, 128, 0.65);
  color: #f5f7fb;
}

.testudos-topbar__mobile-toggle-line {
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.2s ease;
}

.testudos-topbar__mobile-toggle-line::before,
.testudos-topbar__mobile-toggle-line::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.testudos-topbar__mobile-toggle-line::before {
  top: -6px;
}

.testudos-topbar__mobile-toggle-line::after {
  top: 6px;
}

.testudos-topbar__mobile-panel {
  display: none;
  padding: 0 0 16px;
}

.testudos-topbar.is-mobile-open .testudos-topbar__mobile-panel {
  display: block;
}

.testudos-topbar__mobile-shell {
  border-top: 1px solid #eef2fb;
  padding-top: 12px;
}

[data-theme="dark"] .testudos-topbar__mobile-shell {
  border-top-color: rgba(61, 74, 100, 0.9);
}

.testudos-topbar__mobile-theme {
  padding: 12px 12px 4px;
  display: flex;
  justify-content: flex-start;
}

.testudos-topbar__mobile-link,
.testudos-topbar__mobile-dropdown-link {
  display: block;
  padding: 14px 12px;
  border-bottom: 1px solid #f3f5fa;
}

[data-theme="dark"] .testudos-topbar__mobile-link,
[data-theme="dark"] .testudos-topbar__mobile-dropdown-link {
  border-bottom-color: rgba(61, 74, 100, 0.55);
}

.testudos-topbar__mobile-label {
  padding: 16px 12px 8px;
  font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a869c;
}

[data-theme="dark"] .testudos-topbar__mobile-label {
  color: #9cabca;
}

.testudos-topbar__mobile-cta {
  margin-top: 16px;
  width: 100%;
}

[data-theme="dark"] .testudos-sidebar-search button[data-open-modal] {
  background: #141b29;
  border-color: rgba(61, 74, 100, 0.9);
  color: #e8edf8;
}

[data-theme="dark"] .testudos-sidebar-search button[data-open-modal]:hover,
[data-theme="dark"] .testudos-sidebar-search button[data-open-modal]:focus-visible {
  border-color: rgba(120, 138, 178, 0.85);
}

[data-theme="light"] .section-switcher-icon img {
  filter: brightness(0);
}

body.has-testudos-topbar .page > header {
  display: none;
}

body.has-testudos-topbar .page > .main-frame {
  padding-top: var(--sl-mobile-toc-height);
}

.testudos-sidebar-search {
  width: 100%;
}

.testudos-sidebar-search site-search {
  display: block;
  width: 100%;
}

.testudos-sidebar-search button[data-open-modal] {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  min-height: 2.75rem;
  border: 1px solid var(--sl-color-hairline);
  border-radius: 0.75rem;
  background: var(--sl-color-bg-nav);
  color: var(--sl-color-text);
  padding: 0.75rem 0.9rem;
}

.testudos-sidebar-search button[data-open-modal]:hover,
.testudos-sidebar-search button[data-open-modal]:focus-visible {
  border-color: var(--sl-color-accent);
}

.testudos-sidebar-search .search-container {
  width: 100%;
}

.testudos-sidebar-search kbd {
  margin-left: auto;
}

body.has-testudos-topbar nav.astro-doynk5tl {
  top: calc(var(--testudos-topbar-height, 0px) - 1px);
}

.testudos-sidebar-search--mobile {
  padding: 0.875rem 1rem 0;
  position: sticky;
  top: calc(var(--testudos-topbar-height, 0px) + var(--sl-mobile-toc-height));
  z-index: var(--sl-z-index-toc);
  background: var(--sl-color-bg);
}

.testudos-sidebar-search--desktop {
  padding: 1rem 0 0;
  margin-bottom: 1rem;
}

.testudos-sidebar-search--desktop site-search {
  max-width: calc(var(--sl-sidebar-width) - 2 * var(--sl-sidebar-pad-x));
  margin: 0 auto;
}

@media (min-width: 768px) {
  .testudos-topbar__inner {
    padding: 0 120px;
  }

  .testudos-topbar__nav {
    display: flex;
  }

  .testudos-topbar__mobile-toggle,
  .testudos-topbar__mobile-panel {
    display: none !important;
  }
}

@media (min-width: 72rem) {
  body.has-testudos-topbar .page > .main-frame {
    padding-top: 0;
  }

  body.has-testudos-topbar .right-sidebar:where(.astro-67yu43on) {
    top: var(--testudos-topbar-height, 0px);
    height: calc(100vh - var(--testudos-topbar-height, 0px));
    padding-top: 0;
  }

  .testudos-sidebar-search--mobile {
    display: none;
  }
}

@media (min-width: 1200px) {
  .testudos-topbar__inner {
    padding: 0 220px;
  }
}

@media (max-width: 71.999rem) {
  .testudos-sidebar-search--desktop {
    display: none;
  }
}
