/* 1) Let html/body fill the viewport */
html, body {
  height: 100%;
  margin: 0;
}

/* 2) Make the RTD “main” area a column-flex container */
.wy-nav-content {
  display: flex;
  flex-direction: column;
  height: 100vh;       /* span the full viewport height */
}

/* 3) Inside that, let the page content grow */
.rst-content {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;      /* fill available space above the footer */
}

/* 4) Push the Sphinx‐generated footer down */
.rst-footer {
  margin-top: auto;    /* this footer (copyright, authors…) sticks to bottom of .rst-content */
}

/* 5) Now push the RTD site‐footer down under everything */
footer.wy-nav-footer {
  margin-top: auto;    /* this footer (“Built with Sphinx…”) sticks to bottom of .wy-nav-content */
}

/* 6) Prevent your text from being hidden behind the bottom footer */
.rst-content {
  padding-bottom: 4rem;  /* adjust if your combined footers are taller */
}
