.wy-nav-content {
  max-width: 1180px;
}

.rst-content .section,
.rst-content section {
  line-height: 1.65;
}

.wy-menu-vertical p.caption {
  margin-top: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.wy-menu-vertical li.toctree-l1 > a {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  font-size: 14px;
}

.wy-menu-vertical li.toctree-l2 > a {
  font-size: 13px;
  line-height: 1.35;
}

.wy-menu-vertical li.toctree-l3 > a {
  font-size: 12px;
}

.wy-breadcrumbs {
  font-size: 13px;
}

.rst-content table.docutils {
  width: 100%;
}

.doc-search-button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.doc-search-button:hover,
.doc-search-button:focus {
  outline: 0;
}

.doc-search-button kbd {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.doc-search-open {
  overflow: hidden;
}

.doc-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 8vh 18px 32px;
  background: rgba(15, 23, 42, 0.62);
}

.doc-search-overlay[hidden] {
  display: none;
}

.doc-search-modal {
  width: min(780px, 100%);
  max-height: min(760px, 84vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.36);
}

.doc-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 10px;
}

.doc-search-title {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 700;
}

.doc-search-close {
  width: 32px;
  height: 32px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  color: #4b5563;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.doc-search-close:hover,
.doc-search-close:focus {
  border-color: #94a3b8;
  color: #111827;
}

.doc-search-box {
  position: relative;
  margin: 0 18px 10px;
}

.doc-search-input {
  width: 100%;
  height: 48px;
  padding: 0 82px 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  font-size: 16px;
  line-height: 48px;
}

.doc-search-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
  outline: 0;
}

.doc-search-shortcut {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  padding: 3px 7px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.doc-search-status {
  min-height: 20px;
  padding: 0 18px 10px;
  color: #64748b;
  font-size: 13px;
}

.doc-search-results {
  overflow: auto;
  padding: 0 10px 12px;
}

.doc-search-result {
  margin: 0;
}

.doc-search-result__link {
  display: block;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}

.doc-search-result__link:hover,
.doc-search-result__link:focus,
.doc-search-result__link.is-active {
  border-color: #bae6fd;
  background: #eff6ff;
  text-decoration: none;
}

.doc-search-result__title {
  display: block;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.doc-search-result__path {
  display: block;
  margin-top: 3px;
  color: #0369a1;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.doc-search-result__snippet {
  display: block;
  margin-top: 7px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
}

.doc-search-result__match {
  padding: 0 2px;
  border-radius: 3px;
  background: #fef3c7;
  color: inherit;
  font-weight: 700;
}

@media screen and (max-width: 768px) {
  .wy-nav-content {
    max-width: none;
  }

  .doc-search-overlay {
    padding-top: 4vh;
  }
}
