/* Adjust primary sidebar width */
.bd-sidebar {
    flex: 0 0 250px; /* Adjust the 250px value to set desired width */
}


/* Custom color for "grey-ed out" grid cards */
.grey-card {
    color: #848884;
}


button.expandall-toggle {
    background: none;        /* invisible button */
    border: none;
    font-size: 1.1rem;       /* a touch larger than body text */
    cursor: pointer;
    margin: 0.25rem 0 0.75rem 0;   /* spacing under <h2> */
  }
  
  button.expandall-toggle:hover {
    color: var(--pst-color-link, #1a73e8);             /* theme link color */
  }
/* MemryX branding for the global Sphinx back-to-top control. */
#pst-back-to-top {
    background-color: #2caaca;
    color: #10243a;
}
#pst-back-to-top:hover {
    background-color: #65cde1;
    color: #10243a;
}
#pst-back-to-top:focus-visible {
    outline-color: #2caaca;
}

/* Shared DevHub styling. Override theme tokens instead of replacing page templates. */
html {
  --pst-font-family-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pst-font-family-heading: var(--pst-font-family-base);
  --pst-font-weight-heading: 650;
  --pst-font-size-h1: 2.25rem;
  --pst-font-size-h2: 1.85rem;
  --pst-font-size-h3: 1.35rem;
  --pst-font-size-h4: 1.125rem;
}
html[data-theme="light"] {
  --pst-color-primary: #007c91;
  --pst-color-primary-bg: #e8f5f7;
  --pst-color-primary-text: #ffffff;
  --pst-color-primary-highlight: #006779;
  --pst-color-primary-highlight-text: #ffffff;
  --pst-color-secondary: #007c91;
  --pst-color-secondary-bg: #e8f5f7;
  --pst-color-secondary-text: #ffffff;
  --pst-color-secondary-highlight: #006779;
  --pst-color-secondary-highlight-text: #ffffff;
  --pst-color-accent: #007c91;
  --pst-color-accent-bg: #e8f5f7;
  --pst-color-link: #007c91;
  --pst-color-link-hover: #005d70;
  --pst-color-link-higher-contrast: #005d70;
  --pst-color-heading: #152d48;
  --pst-color-text-base: #243b50;
  --pst-color-text-muted: #536678;
  --pst-color-background: #ffffff;
  --pst-color-on-background: #ffffff;
  --pst-color-surface: #f3f6f8;
  --pst-color-on-surface: #e8eef2;
  --pst-color-border: #dce5eb;
  --pst-color-border-muted: #e8eef2;
  --pst-color-inline-code: #006d80;
  --pst-color-target: #e8f5f7;
  --pst-color-table-heading-bg: #edf2f5;
  --pst-color-table-row-zebra-low-bg: #ffffff;
  --pst-color-table-row-zebra-high-bg: #f7f9fa;
  --pst-color-table-row-hover-bg: #e8f5f7;
  --pst-color-table-inner-border: #dce5eb;
  --pst-color-table-outer-border: #dce5eb;
  --mx-global-code-bg: #f3f6f8;
}
html[data-theme="dark"] {
  --pst-color-primary: #79cedb;
  --pst-color-primary-bg: #253a40;
  --pst-color-primary-text: #12282e;
  --pst-color-primary-highlight: #a2e1eb;
  --pst-color-primary-highlight-text: #12282e;
  --pst-color-secondary: #79cedb;
  --pst-color-secondary-bg: #253a40;
  --pst-color-secondary-text: #12282e;
  --pst-color-secondary-highlight: #a2e1eb;
  --pst-color-secondary-highlight-text: #12282e;
  --pst-color-accent: #79cedb;
  --pst-color-accent-bg: #253a40;
  --pst-color-link: #79cedb;
  --pst-color-link-hover: #a2e1eb;
  --pst-color-link-higher-contrast: #a2e1eb;
  --pst-color-heading: #e8edf2;
  --pst-color-text-base: #d4dde5;
  --pst-color-text-muted: #b2bbc5;
  --pst-color-background: #14191f;
  --pst-color-on-background: #22282f;
  --pst-color-surface: #22282f;
  --pst-color-on-surface: #272e36;
  --pst-color-border: #343b44;
  --pst-color-border-muted: #2c333b;
  --pst-color-inline-code: #8cdae5;
  --pst-color-target: #253a40;
  --pst-color-table-heading-bg: #272e36;
  --pst-color-table-row-zebra-low-bg: #191e24;
  --pst-color-table-row-zebra-high-bg: #22282f;
  --pst-color-table-row-hover-bg: #253a40;
  --pst-color-table-inner-border: #343b44;
  --pst-color-table-outer-border: #343b44;
  --mx-global-code-bg: #151a20;
}
/* Sphinx Design has its own color tokens for cards, tabs, and badges. */
html[data-theme] {
  --sd-color-primary: var(--pst-color-primary);
  --sd-color-primary-text: var(--pst-color-primary-text);
  --sd-color-primary-highlight: var(--pst-color-primary-highlight);
  --sd-color-secondary: var(--pst-color-secondary);
  --sd-color-secondary-text: var(--pst-color-secondary-text);
  --sd-color-secondary-highlight: var(--pst-color-secondary-highlight);
  --sd-color-card-background: var(--pst-color-on-background);
  --sd-color-card-border: var(--pst-color-border);
  --sd-color-card-header: var(--pst-color-surface);
  --sd-color-card-footer: var(--pst-color-surface);
}
.bd-header { background: var(--pst-color-background); border-bottom: 1px solid var(--pst-color-border); box-shadow: 0 1px 4px #10243a0a; }
.bd-header .navbar-nav li a.nav-link:hover { color: var(--pst-color-link-hover); }
.bd-sidebar-primary,.bd-sidebar-secondary { border-color: var(--pst-color-border); }
.bd-sidebar-primary .current > a { color: var(--pst-color-primary); }
.bd-article > :is(h1,h2,h3,h4), .bd-article section > :is(h1,h2,h3,h4) { letter-spacing: -.025em; line-height: 1.25; }
.bd-article p { line-height: 1.65; }
.bd-article a { text-underline-offset: .2em; }
/* Documentation cards: quiet surfaces and the same border-only feedback as the landing page.
   Dropdowns also use sd-card; retain their semantic colors and disclosure styling. */
.bd-article .sd-card:not(.sd-dropdown) {
  border: 1px solid var(--pst-color-border);
  border-radius: 16px;
  background-color: var(--pst-color-on-background);
  color: var(--pst-color-text-base);
  box-shadow: none !important;
  overflow: hidden;
  transition: border-color .18s ease;
}
.bd-article .sd-card:not(.sd-dropdown) > .sd-card-body {
  padding: 1.25rem 1.5rem;
}
.bd-article .sd-card:not(.sd-dropdown) .sd-card-title {
  color: var(--pst-color-heading);
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.4;
  margin-bottom: .5rem;
}
.bd-article .sd-card:not(.sd-dropdown) .sd-card-text {
  color: var(--pst-color-text-muted);
}
.bd-article .sd-card:not(.sd-dropdown) > :is(.sd-card-header, .sd-card-footer) {
  padding: .875rem 1.5rem;
  border-color: var(--pst-color-border);
}
.bd-article .sd-card-hover:not(.sd-dropdown):is(:hover, :focus-within) {
  border-color: var(--pst-color-primary);
  box-shadow: none !important;
  transform: none;
}
.bd-article .sd-card-hover:not(.sd-dropdown):focus-within {
  outline: 2px solid var(--pst-color-primary);
  outline-offset: 3px;
}
/* Give tightly stacked, single-column navigation cards breathing room. */
.bd-article .sd-row.sd-row-cols-1:has(> .sd-col > .sd-card) {
  --sd-gutter-y: 1rem;
}
@media (max-width: 575px) {
  .bd-article .sd-card:not(.sd-dropdown) > .sd-card-body { padding: 1rem; }
  .bd-article .sd-card:not(.sd-dropdown) > :is(.sd-card-header, .sd-card-footer) { padding: .75rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bd-article .sd-card:not(.sd-dropdown) { transition: none; }
}
.bd-article .admonition { border-radius: 10px; box-shadow: none; }
.bd-article div.highlight { border-radius: 10px; border: 1px solid var(--pst-color-border); background: var(--mx-global-code-bg); }
.bd-article div.highlight pre { background: transparent; border: 0; line-height: 1.6; }
.bd-search-container input { border-radius: 8px; }
.bd-footer { border-top: 1px solid var(--pst-color-border); color: var(--pst-color-text-muted); }

/* Sphinx Design tabs: readable labels and a quiet panel, with a cyan active rule. */
html[data-theme] .bd-article .sd-tab-set > label {
  background: transparent;
  color: var(--pst-color-text-muted);
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 8px 8px 0 0;
  margin: 0 .25rem 0 0;
  padding: .65rem 1rem;
  line-height: 1.5;
  font-weight: 600;
  transform: none;
}
html[data-theme] .bd-article .sd-tab-set > input:checked + label {
  background: var(--pst-color-primary-bg);
  color: var(--pst-color-primary);
  border: 0;
  border-bottom: 3px solid var(--pst-color-primary);
  border-radius: 8px 8px 0 0;
  transform: none;
}
html[data-theme] .bd-article .sd-tab-set > input:not(:checked) + label:hover {
  background: var(--pst-color-surface);
  color: var(--pst-color-heading);
  border-color: var(--pst-color-border);
  text-decoration: none;
}
html[data-theme] .bd-article .sd-tab-set > input:focus-visible + label {
  outline: 2px solid var(--pst-color-primary);
  outline-offset: -3px;
}
html[data-theme] .bd-article .sd-tab-set > .sd-tab-content {
  background: var(--pst-color-on-background);
  border: 1px solid var(--pst-color-border);
  border-radius: 0 12px 12px 12px;
  box-shadow: none;
  padding: 1.25rem;
  min-width: 0;
}

/* Expandable sections retain their native details/summary keyboard behavior.
   Important declarations override PyData's important borders and utility colors. */
.bd-article details.sd-dropdown {
  border: 1px solid var(--pst-color-border) !important;
  border-radius: 12px;
  background: var(--pst-color-on-background);
  box-shadow: none !important;
  margin-block: 1rem;
}
html[data-theme] .bd-article details.sd-dropdown > summary.sd-card-header {
  background: var(--pst-color-surface) !important;
  color: var(--pst-color-heading) !important;
  border: 0 !important;
  border-radius: 11px;
  padding: .875rem 1rem;
  min-height: 48px;
  gap: .25rem;
}
html[data-theme] .bd-article details.sd-dropdown[open] > summary.sd-card-header {
  border-bottom: 1px solid var(--pst-color-border) !important;
  border-radius: 11px 11px 0 0;
}
html[data-theme] .bd-article details.sd-dropdown > summary.sd-card-header:hover {
  filter: none;
  background: var(--pst-color-on-surface) !important;
}
.bd-article details.sd-dropdown > summary.sd-card-header:focus-visible {
  outline: 2px solid var(--pst-color-primary);
  outline-offset: -3px;
}
.bd-article details.sd-dropdown > summary.sd-card-header + .sd-summary-content {
  border: 0 !important;
  border-radius: 0 0 11px 11px;
  padding: 1.25rem;
  color: var(--pst-color-text-base);
}
.bd-article details.sd-dropdown > summary .sd-summary-text { min-width: 0; }
.bd-article details.sd-dropdown > summary .sd-summary-state-marker { flex-shrink: 0; }
@media (max-width: 575px) {
  html[data-theme] .bd-article .sd-tab-set > label { padding: .6rem .75rem; }
  html[data-theme] .bd-article .sd-tab-set > .sd-tab-content,
  .bd-article details.sd-dropdown > summary.sd-card-header + .sd-summary-content { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bd-article .sd-tab-set > label,
  .bd-article details.sd-dropdown .sd-summary-chevron-right { transition: none; }
  .bd-article details.sd-dropdown[open] > .sd-summary-content { animation: none; }
}

/* Header navigation and branded utility icons. */
.mx-applications-link { display: inline-flex; align-items: center; gap: .3rem; }
.mx-external-icon { flex-shrink: 0; }
.bd-header .nav-item > button.nav-link { background: none; border: 0; font: inherit; }
/* Leave room for the unchanged version selector and search on narrow screens. */
@media (max-width: 575px) {
  .bd-header .navbar-brand img { max-width: 110px; height: auto; }
}

/* Compact Material-inspired header. */
.bd-header { box-shadow: none; }
.bd-header .bd-header__inner { gap: .75rem; padding-inline: 1.25rem; }
.bd-header .navbar-brand { margin: 0; }
.bd-header .navbar-brand img { max-height: 36px; }
.bd-header .navbar-nav { align-items: center; gap: .125rem; }
.bd-header .navbar-nav > .nav-item > .nav-link {
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.5;
  padding: .65rem .65rem;
  border-radius: 8px;
  color: var(--pst-color-text-muted);
}
.bd-header .navbar-nav > .nav-item > .nav-link:hover {
  background: var(--pst-color-surface);
  color: var(--pst-color-heading);
}
.bd-header .navbar-nav > .current > .nav-link {
  color: var(--pst-color-primary);
  box-shadow: inset 0 -2px var(--pst-color-primary);
}
.bd-header .navbar-icon-links { gap: .125rem; }
.bd-header .pst-navbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: .5rem;
  border-radius: 50%;
  color: var(--pst-color-text-muted);
}
.bd-header .pst-navbar-icon:hover {
  background: var(--pst-color-surface);
  color: var(--pst-color-primary);
}
.bd-header .pst-navbar-icon :is(svg, i) { font-size: 20px; width: 20px; height: 20px; }
.bd-header .search-button-field {
  border: 1px solid var(--pst-color-border);
  border-radius: 10px;
  background: var(--pst-color-surface);
  box-shadow: none;
  font-size: .875rem;
  min-height: 36px;
}
.bd-header .dropdown-menu {
  padding: .5rem;
  border: 1px solid var(--pst-color-border);
  border-radius: 12px;
  background: var(--pst-color-on-background);
  box-shadow: 0 6px 18px #00000014;
}
html[data-theme="light"] .bd-navbar-elements .dropdown-menu {
  --bs-dropdown-link-active-color: var(--pst-color-link-higher-contrast);
}
.bd-header .dropdown-item { border-radius: 6px; padding: .5rem .75rem; }
.bd-header :is(a, button):focus-visible {
  outline: 2px solid var(--pst-color-primary);
  outline-offset: 2px;
}
@media (min-width: 1200px) {
  .bd-header .bd-header__inner { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); }
  .bd-header .navbar-header-items__start { width: auto; min-width: 0; gap: .5rem; }
  .bd-header .navbar-header-items { display: contents !important; }
  .bd-header .navbar-header-items__center { justify-self: center; margin: 0 !important; }
  .bd-header .navbar-header-items__end { justify-self: end; margin: 0; gap: .25rem; }
  .bd-header .navbar-brand img { max-width: 150px; }
  .bd-header .version-switcher__button { font-size: .8125rem; }
  .bd-header .search-button-field { padding-inline: .65rem; }
  .bd-header .search-button-field .search-button__kbd-shortcut { display: none; }
}
@media (max-width: 575px) {
  .bd-header .bd-header__inner { padding-inline: .5rem; gap: .25rem; }
}


/* A flatter, shorter header, with an explicit blog label beside the brand icon. */
html { --pst-header-height: 4rem; }
.bd-header .bd-header__inner { min-height: 64px; padding-block: 0; }
.bd-header .navbar-brand { height: 48px; padding-block: 0; }
.bd-header .navbar-nav > .nav-item > .nav-link { border-radius: 4px; }
.bd-header .search-button-field { border-color: transparent; border-radius: 4px; }
.navbar-icon-links .mx-devblog-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  width: auto;
  white-space: nowrap;
  border-radius: 6px;
  padding-inline: .5rem;
}
.mx-devblog-label { font-size: .8125rem; font-weight: 500; }
.navbar-icon-links img[src$="memryx-icon.ico"] {
  width: 24px;
  height: 24px;
  object-fit: contain;
  background: transparent !important;
  filter: none !important;
}
@media (min-width: 1200px) and (max-width: 1299px) {
  .bd-header .navbar-header-items__end { gap: 0; }
  .bd-header .pst-navbar-icon { width: 32px; padding: .375rem; }
  .bd-header .mx-devblog-link { width: auto; }
  .bd-header .search-button-field { padding-inline: .4rem; }
}

/* A shared external-site marker, separate from card stretched-link overlays. */
.mx-external-mark {
  display: inline-flex;
  align-items: center;
  margin-inline-start: .25em;
  vertical-align: -.08em;
  flex: 0 0 auto;
  line-height: 1;
}
.mx-external-mark > svg { width: .85em; height: .85em; }
a.mx-external-visual { position: relative; }
a.mx-external-visual > .mx-external-mark {
  position: absolute;
  inset-block-start: 3px;
  inset-inline-end: 3px;
  margin: 0;
  padding: 2px;
  border-radius: 3px;
  background: var(--pst-color-on-background);
  color: var(--pst-color-link);
  z-index: 2;
}
.bd-header .pst-navbar-icon .mx-external-mark > svg { width: 10px; height: 10px; }
.nav-link.nav-external.mx-external-link::after,
nav.bd-links li > a.reference.external.mx-external-link::after { content: none; }
@media (max-width: 575px) {
  /* Documentation pages also have an on-this-page toggle; reserve its space. */
  .bd-header:has(.secondary-toggle) .navbar-brand img { max-width: 80px; }
  .bd-header:has(.secondary-toggle) .version-switcher__button { font-size: .75rem; }
}

/* Keep the DevHub identity beside the MemryX logo in the shared header. */
@font-face {
  font-family: "MemryX Neuropol";
  src: url("neuropol.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
.bd-header .navbar-brand { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.mx-header-brand-text {
  font-family: "MemryX Neuropol", sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #007c91;
}
html[data-theme="dark"] .mx-header-brand-text { color: #65cde1; }
.bd-header .navbar-brand img { width: 100px; height: auto; }
@media (min-width: 1400px) {
  .bd-header .navbar-brand img { width: 125px; }
  .mx-header-brand-text { font-size: 15px; }
}
@media (max-width: 575px) {
  .bd-header .navbar-brand { gap: 3px; }
  .bd-header .navbar-brand img { width: 50px; }
  .mx-header-brand-text { font-size: 7px; }
}
@media (max-width: 575px) {
  .bd-header .version-switcher__button { font-size: .75rem; padding-inline: .375rem; }
  .bd-header:has(.secondary-toggle) .version-switcher__button { font-size: .6875rem; padding-inline: .25rem; }
  .bd-header:has(.secondary-toggle) .mx-header-brand-text { font-size: 6px; }
}

/* Brand and navigation flow from the left; search, version and utilities sit right. */
.bd-header .bd-header__inner { max-width: none; width: 100%; }
@media (min-width: 960px) {
  .bd-header .bd-header__inner { display: flex; gap: 1rem; padding-inline: 1.25rem; }
  .bd-header .navbar-header-items__start { flex: 0 0 auto; width: auto; }
  .bd-header .navbar-header-items { display: flex !important; flex: 1 1 auto; min-width: 0; }
  .bd-header .navbar-header-items__center { margin: 0 !important; flex: 0 0 auto; }
  .bd-header .navbar-header-items__end { margin-inline-start: auto; gap: .25rem; }
  .bd-header .navbar-nav > .nav-item > .nav-link { font-size: .9375rem; padding-inline: .6rem; }
  .bd-header .version-switcher__button,
  .bd-header .search-button-field { font-size: .875rem; }
}
@media (min-width: 960px) and (max-width: 1199px) {
  .bd-header .bd-header__inner { gap: .5rem; padding-inline: .75rem; }
  .bd-header .navbar-brand img { width: 80px; }
  .mx-header-brand-text { font-size: 10px; }
  .bd-header .navbar-nav > .nav-item > .nav-link { font-size: .8125rem; padding-inline: .4rem; }
  .bd-header .navbar-header-items__end { gap: 0; }
  .bd-header .pst-navbar-icon { width: 30px; padding: .3rem; }
  .bd-header .search-button-field .search-button__kbd-shortcut { display: none; }
  .bd-header .version-switcher__button { font-size: .75rem; }
}
@media (max-width: 959px) {
  .bd-header .navbar-brand img { width: 100px; max-width: 100px; }
  .bd-header .mx-header-brand-text { font-size: 12px; }
}
@media (max-width: 575px) {
  .bd-header .navbar-brand img,
  .bd-header:has(.secondary-toggle) .navbar-brand img { width: 85px; max-width: 85px; }
  .bd-header .mx-header-brand-text,
  .bd-header:has(.secondary-toggle) .mx-header-brand-text { font-size: 10px; }
}
@media (min-width: 960px) {
  .bd-header .navbar-header-items { flex-wrap: nowrap; }
}
@media (min-width: 960px) and (max-width: 1199px) {
  .bd-header .navbar-brand img { width: 65px; }
  .bd-header .mx-header-brand-text { font-size: 9px; }
  .bd-header .navbar-nav > .nav-item > .nav-link { font-size: .78125rem; padding-inline: .25rem; }
}

/* The header brand is a single logo lockup, not an underlined text link. */
.bd-header a.navbar-brand:is(:link, :visited, :hover, :focus, :active),
.bd-header a.navbar-brand .mx-header-brand-text {
  text-decoration: none;
}

/* Header selection: one clean inset underline, without a filled pill. */
html[data-theme] nav[aria-label="Main navigation"] .navbar-nav > .nav-item > .nav-link {
  border-radius: 0;
}
html[data-theme] nav[aria-label="Main navigation"] .navbar-nav > .nav-item.current > .nav-link {
  position: relative;
  background: transparent;
  box-shadow: none;
  color: var(--pst-color-primary);
}
html[data-theme] nav[aria-label="Main navigation"] .navbar-nav > .nav-item.current > .nav-link::before {
  content: "";
  position: absolute;
  inset: auto .6rem 0;
  height: 2px;
  border: 0;
  border-radius: 2px;
  background: currentColor;
  pointer-events: none;
}

/* Keep the two adjacent header controls on the same 40px baseline. */
.bd-header .search-button-field,
.bd-header .version-switcher__button {
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-block: 0;
  line-height: 1.25;
}
/* Render the actual favicon instead of an ICO mask, which some browsers omit. */
html[data-theme] .navbar-icon-links img[src$="memryx-icon.ico"] {
  position: static;
  display: block;
  width: 28px;
  height: 28px;
  max-width: none;
  flex: 0 0 28px;
  clip-path: none;
  object-fit: contain;
  filter: brightness(0) invert(.38) !important;
}
html[data-theme="dark"] .navbar-icon-links img[src$="memryx-icon.ico"] {
  filter: brightness(0) invert(.72) !important;
}

/* Bold navigation with an underline for open Docs, including keyboard focus. */
html[data-theme] nav[aria-label="Main navigation"] .navbar-nav > .nav-item > .nav-link {
  font-weight: 650;
}
html[data-theme] nav[aria-label="Main navigation"] .navbar-nav > .nav-item > button.nav-link:is([aria-expanded="true"], :focus, :focus-visible) {
  position: relative;
  outline: none;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: var(--pst-color-primary);
}
html[data-theme] nav[aria-label="Main navigation"] .navbar-nav > .nav-item > button.nav-link:is([aria-expanded="true"], :focus-visible)::before {
  content: "";
  position: absolute;
  inset: auto .6rem 0;
  height: 2px;
  border: 0;
  border-radius: 2px;
  background: currentColor;
  pointer-events: none;
}

/* Utility brands reveal their colors on hover and keyboard focus. */
html[data-theme="light"] .navbar-icon-links a[href="https://github.com/MemryX"]:is(:hover, :focus-visible) { color: #181717; }
html[data-theme="dark"] .navbar-icon-links a[href="https://github.com/MemryX"]:is(:hover, :focus-visible) { color: #ffffff; }
.navbar-icon-links a[href="https://community.memryx.com/"]:is(:hover, :focus-visible) { color: #00aeef; }
html[data-theme="light"] .navbar-icon-links a[href="https://devblog.memryx.com/"]:is(:hover, :focus-visible) { color: #15171a; }
html[data-theme="dark"] .navbar-icon-links a[href="https://devblog.memryx.com/"]:is(:hover, :focus-visible) { color: #ffffff; }
html[data-theme] .navbar-icon-links a:is(:hover, :focus-visible) img[src$="memryx-icon.ico"] {
  filter: none !important;
}

/* Lighter navigation labels, with a small size increase on roomy headers. */
html[data-theme] nav[aria-label="Main navigation"] .navbar-nav > .nav-item > .nav-link {
  font-weight: 400;
  font-size: 1rem;
}
@media (min-width: 960px) and (max-width: 1199px) {
  html[data-theme] nav[aria-label="Main navigation"] .navbar-nav > .nav-item > .nav-link {
    font-size: .8125rem;
  }
}

/* Documentation navigation: compact Material surfaces and clear selection. */
.bd-sidebar-primary .bd-links__title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--pst-color-text-muted);
  margin: 0 0 1rem;
  padding-inline: .7rem;
}
.bd-sidebar-primary .bd-links .caption {
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--pst-color-heading);
  margin: 1.25rem 0 .35rem;
  padding-inline: .7rem;
}
.bd-sidebar-primary .bd-links .bd-sidenav li > a {
  border: 0;
  border-radius: 8px;
  padding: .5rem .7rem;
  margin: .15rem 0;
  font-size: .875rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--pst-color-text-muted);
  text-decoration: none;
  box-shadow: none;
}
.bd-sidebar-primary .bd-links .bd-sidenav li.has-children > a { padding-inline-end: 2rem; }
.bd-sidebar-primary .bd-links .bd-sidenav li > a:hover {
  background: var(--pst-color-surface);
  color: var(--pst-color-primary);
}
.bd-sidebar-primary .bd-links .bd-sidenav li > a[aria-current="page"] {
  background: var(--pst-color-primary-bg);
  color: var(--pst-color-primary);
  font-weight: 600;
  box-shadow: inset 3px 0 var(--pst-color-primary);
}
.bd-sidebar-primary .bd-links .toctree-toggle {
  border-radius: 6px;
  color: var(--pst-color-text-muted);
}
.bd-sidebar-primary .bd-links .toctree-toggle:hover { background: var(--pst-color-primary-bg); }
.bd-sidebar-secondary .sidebar-secondary-item:has(> #pst-page-toc-nav) {
  border: 1px solid var(--pst-color-border);
  border-radius: 16px;
  background: var(--pst-color-surface);
  padding: 1rem .7rem;
}
.bd-sidebar-secondary .sidebar-secondary-item:has(> #pst-page-toc-nav) > .onthispage {
  font-size: .85rem;
  font-weight: 600;
  color: var(--pst-color-heading);
  padding: 0 .5rem .6rem;
  margin: 0;
  border: 0;
}
.bd-sidebar-secondary .sidebar-secondary-item:has(> #pst-page-toc-nav) > .onthispage i { display: none; }
.bd-sidebar-secondary #pst-page-toc-nav { padding: 0; }
.bd-sidebar-secondary #pst-page-toc-nav .nav-link {
  border: 0;
  border-radius: 8px;
  padding: .45rem .55rem;
  margin: .15rem 0;
  font-size: .825rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--pst-color-text-muted);
  text-decoration: none;
  box-shadow: none;
}
.bd-sidebar-secondary #pst-page-toc-nav .nav-link:hover,
.bd-sidebar-secondary #pst-page-toc-nav .nav-link.active {
  background: var(--pst-color-primary-bg);
  color: var(--pst-color-primary);
}
.bd-sidebar-secondary #pst-page-toc-nav .nav-link.active { box-shadow: inset 2px 0 var(--pst-color-primary); font-weight: 600; }
.bd-sidebar-primary .bd-links a:focus-visible,
.bd-sidebar-secondary #pst-page-toc-nav a:focus-visible {
  outline: 2px solid var(--pst-color-primary);
  outline-offset: 2px;
}

/* Code blocks share the landing page's dark code surface in both themes. */
html[data-theme] {
  --mx-code-bg: #14283b;
  --mx-code-toolbar: #1b3248;
  --mx-code-border: #385066;
  --mx-code-text: #edf5fb;
  --mx-code-muted: #a6baca;
}
html[data-theme="dark"] {
  --mx-code-bg: #151a20;
  --mx-code-toolbar: #292f37;
  --mx-code-border: #3a424c;
}
html[data-theme] .bd-article div.highlight {
  background: var(--mx-code-bg);
  color: var(--mx-code-text);
  border: 1px solid var(--mx-code-border);
  border-radius: 12px;
}
html[data-theme] .bd-article div.highlight pre {
  background: transparent;
  color: var(--mx-code-text);
  border: 0;
  margin: 0;
  padding: 1rem;
  font-size: .84rem;
  line-height: 1.65;
  white-space: pre;
  overflow-x: auto;
}
html[data-theme] .bd-article div.highlight pre code { background: transparent; color: inherit; }
html[data-theme] .bd-article .highlight :is(.n,.na,.nx,.nn,.p,.o,.w,.bp) { color: var(--mx-code-text); }
html[data-theme] .bd-article .highlight :is(.c,.c1,.cm,.cp,.cs,.ch) { color: var(--mx-code-muted); }
html[data-theme] .bd-article .highlight :is(.k,.kc,.kd,.kn,.kp,.kr,.kt,.ow) { color: #d8afff; }
html[data-theme] .bd-article .highlight :is(.nf,.fm,.nb,.nc,.nd,.nt) { color: #79d9ed; }
html[data-theme] .bd-article .highlight :is(.s,.s1,.s2,.sa,.sb,.sc,.sd,.se,.sh,.si,.sr,.ss,.sx) { color: #a8ddb5; }
html[data-theme] .bd-article .highlight :is(.m,.mb,.mf,.mh,.mi,.mo,.il) { color: #f2c48d; }
html[data-theme] .bd-article .highlight :is(.nv,.vc,.vg,.vi,.vm,.no,.ne) { color: #edf5fb; }
html[data-theme] .bd-article .highlight :is(.gp,.go,.gh,.gu) { color: #a6baca; }
html[data-theme] .bd-article .highlight :is(.err,.gr,.gt) { color: #ffb4b4; background: transparent; border: 0; }
html[data-theme] .bd-article .highlight .gd { color: #ffb4b4; background: #492c36; }
html[data-theme] .bd-article .highlight .gi { color: #a8ddb5; background: #203d35; }
html[data-theme] .bd-article .highlight .hll { background: #30495b; }
html[data-theme] .bd-article .highlight :is(.linenos,.linenodiv) { color: var(--mx-code-muted); background: transparent; }
html[data-theme] .bd-article div.code-block-caption {
  background: var(--mx-code-toolbar);
  color: var(--mx-code-text);
  border: 1px solid var(--mx-code-border);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  padding: .65rem 1rem;
  font-size: .85rem;
}
html[data-theme] .bd-article .literal-block-wrapper:has(> .code-block-caption) div.highlight { border-radius: 0 0 12px 12px; }
html[data-theme] .bd-article div.highlight button.copybtn {
  background: var(--mx-code-toolbar);
  color: var(--mx-code-text);
  border: 1px solid var(--mx-code-border);
  border-radius: 8px;
  width: 2rem;
  height: 2rem;
  top: .45rem;
  right: .45rem;
}
html[data-theme] .bd-article div.highlight button.copybtn:hover { background: #30495b; border-color: #79d9ed; }
html[data-theme] .bd-article div.highlight button.copybtn:focus-visible { opacity: 1; outline: 2px solid #79d9ed; outline-offset: 2px; }
html[data-theme] .bd-article div.highlight button.copybtn img { filter: brightness(0) invert(1); }

/* Flat documentation sidebars: compact hierarchy, no competing card surfaces. */
.bd-sidebar-primary .bd-links__title {
  color: var(--pst-color-heading);
  font-size: 1rem;
  font-weight: 600;
  padding: .25rem .65rem;
  margin: 0 0 .75rem;
}
.bd-sidebar-primary .bd-links .caption {
  margin: .5rem 0 .2rem;
  padding: 0;
  font-size: .875rem;
}
.mx-nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  padding: .65rem;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--pst-color-heading);
  font: inherit;
  font-weight: 600;
  text-align: left;
}
.mx-nav-group-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  margin-right: .2rem;
  flex-shrink: 0;
}
.mx-nav-group-toggle[aria-expanded="true"]::after { transform: rotate(45deg); }
.mx-nav-group-toggle:hover { background: var(--pst-color-surface); }
.mx-nav-group-toggle:focus-visible { outline: 2px solid var(--pst-color-primary); outline-offset: 2px; }
.bd-sidebar-primary .bd-links ul.bd-sidenav[hidden] { display: none; }
.bd-sidebar-primary .bd-links .bd-sidenav li > a {
  padding: .45rem .75rem;
  margin: .1rem 0;
  font-size: .875rem;
  line-height: 1.5;
  border-radius: 6px;
}
.bd-sidebar-primary .bd-links .bd-sidenav li > a[aria-current="page"] {
  box-shadow: none;
  font-weight: 500;
}
.bd-sidebar-secondary .sidebar-secondary-item:has(> #pst-page-toc-nav) {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: .3rem 0;
}
.bd-sidebar-secondary .sidebar-secondary-item:has(> #pst-page-toc-nav) > .onthispage {
  padding: 0 .75rem .65rem;
  font-size: .875rem;
  font-weight: 600;
}
.bd-sidebar-secondary .onthispage > :is(i,svg) { display: none; }
.bd-sidebar-secondary #pst-page-toc-nav .nav-link {
  padding: .4rem .75rem;
  font-size: .875rem;
  line-height: 1.5;
  border-radius: 0;
}
.bd-sidebar-secondary #pst-page-toc-nav .nav-link:hover {
  background: var(--pst-color-surface);
  border-radius: 6px;
}
.bd-sidebar-secondary #pst-page-toc-nav .nav-link.active {
  background: transparent;
  font-weight: 500;
  color: var(--pst-color-primary);
  box-shadow: inset 2px 0 var(--pst-color-primary);
}

/* Navigation uses the same quiet surface as the DevHub cards. */
html[data-theme] .bd-sidebar-primary {
  background: var(--pst-color-surface);
  border-right: 1px solid var(--pst-color-border);
}
html[data-theme] .bd-sidebar-primary .mx-nav-group-toggle:hover,
html[data-theme] .bd-sidebar-primary .bd-links .bd-sidenav li > a:hover {
  background: var(--pst-color-primary-bg);
}

/* Replace the legacy tinted title strips and shadows on documentation callouts. */
html[data-theme] .bd-article .admonition {
  background: var(--pst-color-surface);
  color: var(--pst-color-text-base);
  border: 1px solid var(--pst-color-border);
  border-radius: 12px;
  box-shadow: none !important;
  overflow: hidden;
}
html[data-theme] .bd-article .admonition > .admonition-title {
  background: transparent;
  color: var(--pst-color-heading);
  border: 0;
  box-shadow: none !important;
  font-weight: 600;
}
html[data-theme] .bd-article .admonition.note > .admonition-title::before {
  color: var(--pst-color-primary);
}
/* Keep warning/error icons meaningful without the old colored title bars. */
html[data-theme] .bd-article .admonition:is(.warning,.caution,.attention,.important) {
  border-inline-start: 3px solid var(--pst-color-warning);
}
html[data-theme] .bd-article .admonition:is(.danger,.error) {
  border-inline-start: 3px solid var(--pst-color-danger);
}

/* Carry the left navigation surface through the centered page's outer gutter. */
@media (min-width: 1200px) {
  .bd-container__inner:has(> .bd-sidebar-primary:not(.hide-on-wide):not(.pst-squeeze) .bd-links) { position: relative; }
  .bd-container__inner:has(> .bd-sidebar-primary:not(.hide-on-wide):not(.pst-squeeze) .bd-links)::before {
    content: "";
    position: absolute;
    inset-block: 0;
    right: 100%;
    width: max(0px, calc((100vw - 100%) / 2));
    background: var(--pst-color-surface);
    pointer-events: none;
  }
}

/* Keep copy feedback readable against the dark code surface in either theme. */
html[data-theme] .bd-article div.highlight button.copybtn::after {
  background: var(--mx-code-toolbar);
  color: var(--mx-code-text);
  border: 1px solid var(--mx-code-border);
  border-radius: 6px;
  padding: .35rem .55rem;
  font-family: var(--pst-font-family-base);
  font-size: .75rem;
  line-height: 1.4;
  box-shadow: none;
}
html[data-theme] .bd-article div.highlight button.copybtn:is(:not([data-tooltip]), [data-tooltip=""])::after {
  display: none;
}
html[data-theme] .bd-article div.highlight button.copybtn:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

/* Generated wordmark paired with the original brain; crop transparent canvas in CSS. */
.mx-developer-brand { --mx-word-width: 160px; --mx-brain-size: 36px; }
.bd-header .mx-developer-brand,
.mx-landing .mx-hero-brand.mx-developer-brand { display: inline-flex; align-items: center; gap: 10px; }
.bd-header .mx-developer-brand img.mx-developer-brain,
.mx-landing .mx-hero-brand img.mx-developer-brain { width: var(--mx-brain-size); height: var(--mx-brain-size); object-fit: contain; flex-shrink: 0; }
.bd-header .mx-developer-brand .mx-developer-wordmark,
.mx-landing .mx-hero-brand .mx-developer-wordmark {
  display: block;
  position: relative;
  width: var(--mx-word-width);
  height: calc(var(--mx-word-width) * .145);
  overflow: hidden;
  flex-shrink: 0;
}
.bd-header .mx-developer-brand .mx-developer-wordmark img,
.mx-landing .mx-hero-brand .mx-developer-wordmark img {
  position: absolute;
  width: calc(var(--mx-word-width) * 1.033);
  max-width: none;
  height: auto;
  left: calc(var(--mx-word-width) * -.016);
  top: calc(var(--mx-word-width) * -.099);
  padding: 0;
  background: transparent;
}
.mx-landing .mx-hero-brand.mx-developer-brand { --mx-word-width: 240px; --mx-brain-size: 48px; }
@media (max-width: 575px) {
  .bd-header .mx-developer-brand { --mx-word-width: 105px; --mx-brain-size: 28px; gap: 5px; }
  .mx-landing .mx-hero-brand.mx-developer-brand { --mx-word-width: 190px; --mx-brain-size: 40px; }
}
/* The theme's header image height limit must not squash the full transparent canvas. */
.bd-header .mx-developer-brand .mx-developer-wordmark img {
  height: calc(var(--mx-word-width) * .3445);
  max-height: none;
}

/* Recolor the visible image directly; avoid masks hiding the wordmark. */
.bd-header .mx-developer-brand .mx-developer-wordmark img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(14%) sepia(29%) saturate(1162%) hue-rotate(173deg) brightness(94%) contrast(94%);
}
html[data-theme="dark"] .bd-header .mx-developer-brand .mx-developer-wordmark img,
html[data-theme] .mx-landing .mx-hero-brand .mx-developer-wordmark img {
  opacity: 1;
  filter: brightness(0) invert(1);
}

/* Follow the original logo lockup: raised brain, smaller wordmark set lower. */
.bd-header .mx-developer-brand {
  --mx-word-width: 145px;
  align-items: flex-start;
  gap: 4px;
  min-height: 42px;
}
.bd-header .mx-developer-brand .mx-developer-wordmark { margin-top: 18px; }
.mx-landing .mx-hero-brand.mx-developer-brand {
  --mx-word-width: 215px;
  align-items: flex-start;
  gap: 4px;
  min-height: 60px;
}
.mx-landing .mx-hero-brand .mx-developer-wordmark { margin-top: 25px; }
@media (max-width: 575px) {
  .bd-header .mx-developer-brand { --mx-word-width: 95px; min-height: 31px; gap: 3px; }
  .bd-header .mx-developer-brand .mx-developer-wordmark { margin-top: 14px; }
  .mx-landing .mx-hero-brand.mx-developer-brand { --mx-word-width: 170px; min-height: 48px; }
  .mx-landing .mx-hero-brand .mx-developer-wordmark { margin-top: 21px; }
}

/* Scale the hero lockup to 75% while preserving its brain/text proportions. */
.mx-landing .mx-hero-brand.mx-developer-brand {
  --mx-word-width: 161.25px;
  --mx-brain-size: 36px;
  gap: 3px;
  min-height: 45px;
}
.mx-landing .mx-hero-brand .mx-developer-wordmark { margin-top: 18.75px; }
@media (max-width: 575px) {
  .mx-landing .mx-hero-brand.mx-developer-brand {
    --mx-word-width: 127.5px;
    --mx-brain-size: 30px;
    min-height: 36px;
  }
  .mx-landing .mx-hero-brand .mx-developer-wordmark { margin-top: 15.75px; }
}

/* Breathing room around standalone diagrams (wrap in `.. container:: mx-diagram`) */
.mx-diagram { margin: 2rem 0; }
