/* Keep equations and wide numerical tables usable on small screens. */
.wy-table-responsive table td,
.wy-table-responsive table th {
  white-space: normal;
}

.math {
  overflow-x: auto;
}

/* Give bibliography labels enough room for author--year citations. */
div.citation > span.label {
  width: 8rem;
}

/* Match code blocks to the width of the documentation content. */
div.highlight pre {
  overflow-x: auto;
}

/* Let implementation diagrams use the content width without being clipped. */
img.implementation-flow {
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid #d8dee9;
  background: #f8fafc;
}

/* Sphinx-Gallery: make the scientific result the visual entry point. */
.sphx-glr-thumbnails {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0 2rem;
}

.sphx-glr-thumbcontainer {
  align-items: stretch;
  gap: 0.75rem;
  min-height: 100%;
  padding: 0.8rem;
  border: 1px solid #e1e6eb;
  border-radius: 0.45rem;
  background: #fff;
  box-shadow: 0 0.25rem 1rem rgba(32, 45, 58, 0.10);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.sphx-glr-thumbcontainer:hover {
  border-color: #2980b9;
  box-shadow: 0 0.45rem 1.35rem rgba(32, 45, 58, 0.16);
  transform: translateY(-2px);
}

.sphx-glr-thumbcontainer img {
  display: block;
  width: 100%;
  max-width: none;
  height: 175px;
  max-height: none;
  object-fit: contain;
  object-position: center;
  border-radius: 0.25rem;
  background: #fff;
}

.sphx-glr-thumbnail-title {
  min-height: 3.1em;
  color: #2f3b46;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.otter-gallery-run-note {
  margin: 0.9rem 0 0;
  color: #56616b;
}

/* Inserted by gallery_results_first.js on generated example detail pages. */
.otter-results-first {
  margin: 1.5rem 0 2rem;
  padding-top: 0.15rem;
}

.otter-results-first > h2 {
  margin: 0 0 0.9rem;
}

.otter-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.15rem;
}

.otter-result-card {
  margin: 0;
  padding: 0.65rem;
  border: 1px solid #e1e6eb;
  border-radius: 0.35rem;
  background: #fff;
}

.otter-result-card img.sphx-glr-single-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.otter-result-card figcaption {
  margin-top: 0.55rem;
  color: #56616b;
  font-size: 0.9rem;
  line-height: 1.35;
}

.otter-terminal-results {
  margin-top: 1.15rem;
}

.otter-terminal-results > h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.otter-terminal-results .sphx-glr-script-out {
  margin-bottom: 0.8rem;
}

@media (max-width: 640px) {
  .sphx-glr-thumbnails {
    grid-template-columns: minmax(0, 1fr);
  }

  .sphx-glr-thumbcontainer img {
    height: auto;
    max-height: 220px;
  }
}
