diff --git a/assets/js/offline-search.js b/assets/js/offline-search.js
index e97742fc..ebf65adf 100644
--- a/assets/js/offline-search.js
+++ b/assets/js/offline-search.js
@@ -179,7 +179,7 @@ search backend.
$searchResultBody.append($("
").append($expander));
$wrapper = $("
")
- .addClass("collapse")
+ .addClass("collapse td-offline-search-results__subresults")
.attr("id", wrapper_id)
.on("hide.bs.collapse", _ => $action.text("▶ Show"))
.on("show.bs.collapse", _ => $action.text("▼ Hide"));
diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss
index bf2c2ba3..f6a4897f 100644
--- a/assets/scss/_styles_project.scss
+++ b/assets/scss/_styles_project.scss
@@ -668,6 +668,12 @@ dd {
max-width: 460px;
}
+.td-offline-search-results .td-offline-search-results__subresults.collapse.show {
+ // Prevent the first child margin from collapsing upward when Bootstrap
+ // finishes the collapse animation, which otherwise causes a small jump.
+ display: flow-root;
+}
+
.td-offline-search-results .spinner-container {
text-align: center;
}