/* Palantir-Inspired Site Overrides */

/* ===== NAVBAR ===== */
.navbar {
  height: 3.25rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--divider);
}

.navbar-brand .navbar-item:first-child {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.navbar-end .navbar-item.nav-tab {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0 1rem;
  opacity: 0.7;
}

.navbar-end .navbar-item.nav-tab:hover {
  opacity: 1;
}

.navbar-end .navbar-item.nav-tab.is-active {
  opacity: 1;
  border-bottom: 2px solid var(--primary-main);
}

/* ===== LEFT SIDEBAR NAV ===== */
.nav {
  border-right: 1px solid var(--divider);
}

@media screen and (min-width: 769px) {
  .nav-container {
    width: 16.5rem;
  }
}

.nav-component {
  padding-bottom: 0.25rem;
}

.nav-component + .nav-component {
  border-top: 1px solid var(--divider);
}

.nav-component.is-current-component {
  padding-bottom: 0.5rem;
}

.nav-menu h3.title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.75rem 1rem 0.25rem;
  margin: 0;
}

.nav-component.is-current-component h3.title {
  color: var(--primary-main);
}

.nav-component.is-current-component h3.title a {
  color: var(--primary-main) !important;
}

.nav-menu h3.title a {
  color: var(--text-secondary) !important;
  text-decoration: none;
}

.nav-menu h3.title a:hover {
  color: var(--primary-main) !important;
  text-decoration: none;
}

.nav-item {
  font-size: 0.8125rem;
  line-height: 1.4;
}

.nav-item a,
.nav-item .nav-text {
  padding: 0.25rem 1rem;
  border-radius: 0;
  border-left: 2px solid transparent;
  display: block;
}

.is-current-page > .nav-link,
.is-current-page > .nav-text {
  color: var(--primary-main) !important;
  border-left: 2px solid var(--primary-main);
  font-weight: 600;
}

/* ===== CONTENT AREA ===== */
.doc {
  font-size: 0.9375rem;
  line-height: 1.7;
  max-width: none;
}

@media screen and (min-width: 1024px) {
  .doc {
    margin: 0 2rem;
  }
}

.doc h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.doc h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
}

.doc h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.doc h4 {
  font-size: 1.0625rem;
  font-weight: 600;
}

/* Code blocks — dark background in both themes */
.doc .listingblock pre:not(.highlight),
.doc .literalblock pre,
.doc pre.highlight > code {
  border-radius: 6px;
  font-size: 0.8125rem;
  line-height: 1.6;
}

[data-theme="dark"] .doc .listingblock pre:not(.highlight),
[data-theme="dark"] .doc .literalblock pre,
[data-theme="dark"] .doc pre.highlight > code {
  background: #161b22;
  border-color: #30363d;
}

/* Highlight.js dark mode token colors (GitHub Dark palette) */
[data-theme="dark"] .hljs-keyword,
[data-theme="dark"] .hljs-selector-tag,
[data-theme="dark"] .hljs-deletion {
  color: #ff7b72;
}

[data-theme="dark"] .hljs-built_in,
[data-theme="dark"] .hljs-type,
[data-theme="dark"] .hljs-title.class_,
[data-theme="dark"] .hljs-title.function_ {
  color: #d2a8ff;
}

[data-theme="dark"] .hljs-string,
[data-theme="dark"] .hljs-attr,
[data-theme="dark"] .hljs-addition {
  color: #a5d6ff;
}

[data-theme="dark"] .hljs-comment,
[data-theme="dark"] .hljs-quote {
  color: #8b949e;
}

[data-theme="dark"] .hljs-number,
[data-theme="dark"] .hljs-literal,
[data-theme="dark"] .hljs-variable.constant_ {
  color: #79c0ff;
}

[data-theme="dark"] .hljs-symbol,
[data-theme="dark"] .hljs-meta,
[data-theme="dark"] .hljs-regexp {
  color: #ffa657;
}

[data-theme="dark"] .hljs-params {
  color: #e6edf3;
}

[data-theme="dark"] .hljs-name,
[data-theme="dark"] .hljs-tag {
  color: #7ee787;
}

.doc p code,
.doc thead code,
.doc .colist > table code {
  padding: 0.125em 0.375em;
  border-radius: 4px;
  font-size: 0.8125em;
}

/* ===== RIGHT TOC SIDEBAR ===== */
@media screen and (min-width: 1216px) {
  aside.toc.sidebar {
    flex-basis: 14rem;
  }
}

.toc-menu h3 {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.toc-menu a {
  font-size: 0.8125rem;
  padding: 0.25rem 0 0.25rem 0.75rem;
  border-left: 2px solid var(--divider);
  display: block;
  line-height: 1.4;
}

.toc-menu a.is-active {
  border-left-color: var(--primary-main);
  color: var(--primary-main);
  font-weight: 500;
}

/* ===== TABLES ===== */
.doc table.tableblock {
  font-size: 0.8125rem;
  border-radius: 6px;
  overflow: hidden;
}

.doc table.tableblock th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
}

/* ===== ADMONITIONS ===== */
.doc .admonitionblock {
  border-radius: 6px;
}

.doc .admonitionblock td.icon {
  top: 10px;
  left: 10px;
  transform: none;
}

.doc .admonitionblock td.content {
  border-radius: 6px;
  padding-top: 36px;
}

/* ===== FOOTER ===== */
footer.footer {
  font-size: 0.75rem;
  padding: 1.5rem 2rem;
  text-align: center;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  font-size: 0.75rem;
}

/* ===== TOOLBAR ===== */
.toolbar {
  font-size: 0.8125rem;
}

.edit-this-page {
  display: none;
}

/* ===== PAGINATION ===== */
nav.pagination {
  font-size: 0.8125rem;
  margin-top: 2rem;
}

/* ===== SEARCH BUTTON ===== */
.search-button {
  border-radius: 6px !important;
  font-size: 0.8125rem !important;
  min-width: 14rem !important;
}

/* ===== SCROLLBAR ===== */
@media (pointer: fine) {
  ::-webkit-scrollbar {
    width: 6px;
  }

  ::-webkit-scrollbar-thumb {
    border-radius: 3px;
  }
}
