/* The same control appears on website pages and the standalone report viewer. */
.back-to-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #bac9ba;
  border-radius: 999px;
  background: #fffef8;
  color: #214f42;
  box-shadow: 0 3px 16px #193a291b;
  font: 600 14px/1.3 system-ui, "Microsoft YaHei", sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.back-to-top[hidden] { display: none; }
.back-to-top:hover { background: #e7efe3; }
.back-to-top:focus-visible { outline: 2px solid #975131; outline-offset: 2px; }
.back-to-top svg { flex: none; }
dialog .back-to-top.back-to-top--reader {
  position: static;
  flex: none;
  width: 44px;
  padding: 0;
  margin-inline-start: auto;
  border-radius: 50%;
  box-shadow: none;
}
.back-to-top--reader span { display: none; }
body:has(dialog[open]) .back-to-top:not(.back-to-top--reader) { visibility: hidden; }
@media (max-width: 600px) {
  .back-to-top { width: 44px; padding: 0; }
  .back-to-top span { display: none; }
  body:has([role="combobox"][aria-expanded="true"]) .back-to-top:not(.back-to-top--reader) {
    visibility: hidden;
  }
  body .site-footer { padding-bottom: max(70px, calc(54px + env(safe-area-inset-bottom))); }
}
@media (forced-colors: active) {
  .back-to-top { background: ButtonFace; color: ButtonText; border-color: ButtonText; box-shadow: none; }
}
@media print { .back-to-top { display: none !important; } }
