/* Wider main documentation body for API tables, option lists, and build logs. */
:root {
  --content-width: 72em;
}

article[role="main"],
.article-container {
  max-width: var(--content-width);
}

/* Softer dark mode: breeze's default page (oklch L = 0.175) is close to black,
   which makes the thin body text hard to read. Lift the surfaces and the text.
   The page (surface-1 = surface - 0.045 L) matches the slate navy #222d3d of
   ttadano.github.io. */
:root[data-theme="dark"] {
  --bz-color-surface: oklch(.339 .038 258);
  --bz-color-text: oklch(.95 .004 265);
  --bz-color-muted: oklch(.85 .004 265);
}

/* A slightly larger header logo; it still fits the 3.5rem header. */
.bz-header-brand > img {
  height: 2.5rem;
}

/* The :red: role (file names in the tutorials) is pure red, which is hard to read
   on the dark page. */
:root[data-theme="dark"] .red {
  color: #ff8a80;
}

/* Tutorial index cards: same-height thumbnails. Several plots have a
   transparent background, so give them a white one (dark axis labels stay
   readable in dark mode). */
.tutorial-grid .sd-card-img-top {
  height: 11rem;
  object-fit: contain;
  background: #fff;
  padding: 0.5rem;
}

/* Interactive Plotly figures (sphinxext/alamode_plots.py). */
figure.alamode-plot {
  width: 100%;
  max-width: 820px;
  margin: 1.5rem auto;
}
figure.alamode-plot .alamode-plot-canvas {
  width: 100%;
}
figure.alamode-plot figcaption {
  margin-top: 0.5rem;
}

/* 3D structures and mode animations (sphinxext/alamode_structures.py). */
figure.alamode-structure {
  width: 100%;
  max-width: 820px;
  margin: 1.5rem auto;
}
figure.alamode-structure .alamode-structure-canvas {
  position: relative;
  width: 100%;
}
figure.alamode-structure .alamode-structure-gl {
  position: absolute;
  inset: 0;
}
figure.alamode-structure .alamode-structure-legend,
figure.alamode-structure .alamode-structure-controls {
  position: absolute;
  top: 0.4rem;
  z-index: 1;
  display: flex;
  gap: 0.6rem;
  font-size: 0.85rem;
}
figure.alamode-structure .alamode-structure-legend {
  left: 0.5rem;
  pointer-events: none;
}
figure.alamode-structure .alamode-structure-controls {
  right: 0.5rem;
  gap: 0.3rem;
}
figure.alamode-structure .alamode-structure-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
figure.alamode-structure .alamode-structure-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  border: 1px solid rgba(128, 128, 128, 0.6);
}
figure.alamode-structure .alamode-structure-controls button {
  min-width: 2rem;
  padding: 0.1rem 0.4rem;
  font: inherit;
  line-height: 1.2;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(128, 128, 128, 0.5);
  border-radius: 4px;
  cursor: pointer;
}
figure.alamode-structure figcaption {
  margin-top: 0.5rem;
}
