:root {
  /* Overall navbar height */
  --pst-navbar-height: 64px;

  /* Brand palette (black / dark gray accent) */
  --dao-accent-color: #1A1A1A;
  --dao-accent-color-hover: #000000;

  /* Border for cards and outlines */
  --dao-border: #E5E5E5;
}

/* In light mode, map the theme's "primary" to our brand accent. */
html[data-theme="light"] {
  --pst-color-primary        : var(--dao-accent-color);
  --pst-color-primary-light  : #2A2A2A;            /* hover/active ramps */
  --pst-color-primary-dark   : var(--dao-accent-color-hover);
  --pst-color-primary-invert : #FFFFFF;            /* text on primary bg */
}

/* Make article column fill the viewport so prev/next can pin to the bottom. */
.bd-article-container {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--pst-navbar-height) - 120px);
}

/* Push the prev/next footer to the bottom when content is short. */
.prev-next-footer {
  margin-top: auto;
}

/* Smaller H1 on inner pages */
.bd-content .bd-article h1 {
  font-size: 1.6rem;
  line-height: 1.2;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

/* Responsive adjustments for Mobile viewports */
@media (max-width: 768px) {
  .bd-article-container {
    min-height: calc(100vh - var(--pst-navbar-height) - 160px);
  }
}

/* Brand logo sizing */
.navbar-brand .logo__image {
  height: var(--pst-navbar-height);
  max-height: var(--pst-navbar-height);
  max-width: 220px;                 /* prevent oversized wide logos */
  width: auto;
  object-fit: contain;
}

/* Slightly tighter spacing between top-level navbar links. */
.bd-navbar .nav-link {
  padding-left: 0.6rem;
  padding-right: 0.6rem;
}

/* Hide theme switcher */
.theme-switch-button {
  display: none !important;
}

/* Search button: show only the magnifier icon */
.search-button__default-text,
.search-button__kbd-shortcut,
.navbar-persistent--container .search-button-field {
  display: none !important;
}

/* keeps logo from crowding the first nav link */
.navbar-brand {
  padding-right: 0.75rem;
}

/* Display the labels as text beside icons. */
.navbar-icon-links .nav-link {
  display: inline-flex;
  align-items: center;
}

.navbar-icon-links .sr-only {
  position: static !important;  /* un-hide */
  width: auto;
  height: auto;
  clip: auto;
  clip-path: none;
  display: inline !important;
  white-space: nowrap;
  margin-left: 0.35rem;          /* gap between icon and label */
}

/* Links in content */
.bd-content a,
.toctree-wrapper a {
  color: var(--dao-accent-color);
  text-decoration: none;
}

.bd-content a:hover,
.bd-content a:focus,
.toctree-wrapper a:hover,
.toctree-wrapper a:focus {
  color: var(--dao-accent-color-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Cards */
.sd-card {
  border: 1px solid var(--dao-border) !important;
  box-shadow: none !important;
  background: #FFFFFF !important;
}

.sd-card .sd-card-title {
  color: #111111 !important;
  font-weight: 600 !important;
}

/* Brand button. */
.sd-btn {
  background-color: var(--dao-accent-color) !important;
  color: #FFFFFF !important;
  border: none !important;
}

.sd-btn:hover,
.sd-btn:focus {
  background-color: var(--dao-accent-color-hover) !important;
  color: #FFFFFF !important;
}

/* Outline button variant */
.sd-btn-outline {
  background: transparent !important;
  color: var(--dao-accent-color) !important;
  border: 1px solid var(--dao-accent-color) !important;
}

.sd-btn-outline:hover,
.sd-btn-outline:focus {
  color: #FFFFFF !important;
  background: var(--dao-accent-color) !important;
}

/* Center the landing page H1 and give it extra space down. */
section.home-landing > h1 {
  text-align: center;
}

.bd-content .bd-article .home-landing > h1 {
  text-align: center;
  margin-bottom: 2.25rem;
  padding-bottom: 0.25rem;
}

.bd-content .bd-article .home-landing > .sd-container,
.bd-content .bd-article .home-landing > .sd-container-fluid {
  margin-top: 1rem;
}

/* Small footer text for copyright/credits. */
.bd-footer .footer-item p {
  font-size: 0.85rem;
  line-height: 1.3;
  margin: 0.1rem 0;
}

/* Hide theme/version boilerplate. */
.bd-footer .theme-version {
  display: none !important;
}

.bd-footer .sphinx-version {
  display: none !important;
}