/* Colors: change them here */
.rst-content {
  --h2-color: #2980b9;  --h2-open: #1a5276;   /* sections: Sphinx theme blue, darker when open */
  --h3-color: #00695c;  --h3-tint: #dff2ef;   /* subsections: green */
  --h4-color: #8a4b08;  --h4-tint: #fbeedd;   /* sub-subsections: brown */
}
.rst-content h2 { color: var(--h2-color); }
.rst-content h3 { color: var(--h3-color); }

/* Collapsible headings are colored bars; the whole bar can be clicked */
.section-collapsible > h2, .section-collapsible > h3, .section-collapsible > h4 {
  display: flex; align-items: center; padding-right: .5em;
  border-left: 5px solid; border-radius: 3px; margin-bottom: 10px;
}
.section-collapsible > h2 { background: var(--h2-color); border-color: var(--h2-open); color: #fff; }
.section-collapsible > h2 > .headerlink { color: #fff; }
.section-collapsible > h3 { background: var(--h3-tint); border-color: var(--h3-color); }
.section-collapsible > h4 { background: var(--h4-tint); border-color: var(--h4-color); color: var(--h4-color); }
/* Open sections get a solid bar and a line along the contents */
.section-open > h2 { background: var(--h2-open); }
.section-open > h3 { background: var(--h3-color); color: #fff; }
.section-open > h4 { background: var(--h4-color); color: #fff; }
.section-open > h3 > .headerlink, .section-open > h4 > .headerlink { color: #fff; }
.section-open > .section-body { padding: 10px 0 1px 16px; margin-bottom: 24px; border-left: 2px solid; }
.section-open > h2 + .section-body { border-left-color: var(--h2-color); }
.section-open > h3 + .section-body { border-left-color: var(--h3-color); }
.section-open > h4 + .section-body { border-left-color: var(--h4-color); }

.section-toggle { font: inherit; color: inherit; background: none; border: 0; flex: 1;
                  padding: .3em .5em .3em 1.6em; text-indent: -1.2em;
                  text-align: left; cursor: pointer; }
.section-toggle::before { content: "\25B8"; display: inline-block; width: 1.2em; text-indent: 0; }
.section-toggle[aria-expanded="true"]::before { content: "\25BE"; }
.section-collapsible > h2:hover, .section-collapsible > h3:hover, .section-collapsible > h4:hover { filter: brightness(.95); }
.section-toggle:focus-visible { outline: 2px solid #e67e22; outline-offset: 2px; }

/* The "Expand all" and "Collapse all" buttons */
.section-toggle-all { font: inherit; font-size: 90%; color: #fff; background: var(--h2-color);
                      border: 0; border-radius: 3px; padding: .25em .8em; cursor: pointer; }
.section-toggle-all:hover, .section-toggle-all:focus-visible { background: var(--h2-open); }

/* Print dark headings without bars and buttons */
@media print {
  .rst-content .section-collapsible > :is(h2, h3, h4) {
    background: none; color: #000; border: 0; padding: 0; break-after: avoid;
  }
  .section-open > .section-body { border: 0; padding: 0; margin-bottom: 0; }
  .section-toggle { padding: 0; text-indent: 0; }
  .rst-content .section-toggle::before, .section-toggle-all, .copybtn { display: none; }
  .wy-nav-content { max-width: none; }
}

/* Override the theme's [hidden] rule so that Ctrl+F can search collapsed text */
.rst-content [hidden="until-found"] { display: block; }
